ElasticEmail 4.0.21 → 4.0.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ElasticEmail.gemspec +2 -2
- data/README.md +5 -4
- data/VERSION +1 -1
- data/docs/BodyPart.md +1 -1
- data/docs/EmailPredictedValidationStatus.md +15 -0
- data/docs/EmailValidationResult.md +5 -1
- data/docs/MessageAttachment.md +3 -1
- data/docs/VerificationsApi.md +4 -4
- data/lib/ElasticEmail/api/campaigns_api.rb +1 -1
- data/lib/ElasticEmail/api/contacts_api.rb +1 -1
- data/lib/ElasticEmail/api/emails_api.rb +1 -1
- data/lib/ElasticEmail/api/events_api.rb +1 -1
- data/lib/ElasticEmail/api/files_api.rb +1 -1
- data/lib/ElasticEmail/api/inbound_route_api.rb +1 -1
- data/lib/ElasticEmail/api/lists_api.rb +1 -1
- data/lib/ElasticEmail/api/security_api.rb +1 -1
- data/lib/ElasticEmail/api/segments_api.rb +1 -1
- data/lib/ElasticEmail/api/statistics_api.rb +1 -1
- data/lib/ElasticEmail/api/sub_accounts_api.rb +1 -1
- data/lib/ElasticEmail/api/suppressions_api.rb +1 -1
- data/lib/ElasticEmail/api/templates_api.rb +1 -1
- data/lib/ElasticEmail/api/verifications_api.rb +9 -9
- data/lib/ElasticEmail/api_client.rb +1 -1
- data/lib/ElasticEmail/api_error.rb +2 -1
- data/lib/ElasticEmail/configuration.rb +12 -1
- data/lib/ElasticEmail/models/access_level.rb +6 -4
- data/lib/ElasticEmail/models/account_status_enum.rb +1 -1
- data/lib/ElasticEmail/models/api_key.rb +1 -1
- data/lib/ElasticEmail/models/api_key_payload.rb +1 -1
- data/lib/ElasticEmail/models/body_content_type.rb +1 -1
- data/lib/ElasticEmail/models/body_part.rb +24 -2
- data/lib/ElasticEmail/models/campaign.rb +23 -1
- data/lib/ElasticEmail/models/campaign_options.rb +23 -1
- data/lib/ElasticEmail/models/campaign_recipient.rb +1 -1
- data/lib/ElasticEmail/models/campaign_status.rb +1 -1
- data/lib/ElasticEmail/models/campaign_template.rb +1 -1
- data/lib/ElasticEmail/models/channel_log_status_summary.rb +1 -1
- data/lib/ElasticEmail/models/compression_format.rb +1 -1
- data/lib/ElasticEmail/models/consent_data.rb +23 -1
- data/lib/ElasticEmail/models/consent_tracking.rb +1 -1
- data/lib/ElasticEmail/models/contact.rb +23 -1
- data/lib/ElasticEmail/models/contact_activity.rb +1 -1
- data/lib/ElasticEmail/models/contact_payload.rb +23 -1
- data/lib/ElasticEmail/models/contact_source.rb +1 -1
- data/lib/ElasticEmail/models/contact_status.rb +1 -1
- data/lib/ElasticEmail/models/contact_update_payload.rb +1 -1
- data/lib/ElasticEmail/models/contacts_list.rb +1 -1
- data/lib/ElasticEmail/models/delivery_optimization_type.rb +1 -1
- data/lib/ElasticEmail/models/email_content.rb +1 -1
- data/lib/ElasticEmail/models/email_data.rb +1 -1
- data/lib/ElasticEmail/models/email_message_data.rb +1 -1
- data/lib/ElasticEmail/models/email_predicted_validation_status.rb +43 -0
- data/lib/ElasticEmail/models/email_recipient.rb +1 -1
- data/lib/ElasticEmail/models/email_send.rb +1 -1
- data/lib/ElasticEmail/models/email_status.rb +23 -1
- data/lib/ElasticEmail/models/email_transactional_message_data.rb +1 -1
- data/lib/ElasticEmail/models/email_validation_result.rb +47 -5
- data/lib/ElasticEmail/models/email_validation_status.rb +1 -1
- data/lib/ElasticEmail/models/email_view.rb +1 -1
- data/lib/ElasticEmail/models/emails_payload.rb +1 -1
- data/lib/ElasticEmail/models/encoding_type.rb +1 -1
- data/lib/ElasticEmail/models/event_type.rb +1 -1
- data/lib/ElasticEmail/models/events_order_by.rb +1 -1
- data/lib/ElasticEmail/models/export_file_formats.rb +1 -1
- data/lib/ElasticEmail/models/export_link.rb +1 -1
- data/lib/ElasticEmail/models/export_status.rb +1 -1
- data/lib/ElasticEmail/models/file_info.rb +1 -1
- data/lib/ElasticEmail/models/file_payload.rb +1 -1
- data/lib/ElasticEmail/models/file_upload_result.rb +1 -1
- data/lib/ElasticEmail/models/inbound_payload.rb +23 -1
- data/lib/ElasticEmail/models/inbound_route.rb +23 -1
- data/lib/ElasticEmail/models/inbound_route_action_type.rb +1 -1
- data/lib/ElasticEmail/models/inbound_route_filter_type.rb +1 -1
- data/lib/ElasticEmail/models/list_payload.rb +1 -1
- data/lib/ElasticEmail/models/list_update_payload.rb +1 -1
- data/lib/ElasticEmail/models/log_job_status.rb +1 -1
- data/lib/ElasticEmail/models/log_status_summary.rb +1 -1
- data/lib/ElasticEmail/models/merge_email_payload.rb +1 -1
- data/lib/ElasticEmail/models/message_attachment.rb +15 -5
- data/lib/ElasticEmail/models/message_category.rb +1 -1
- data/lib/ElasticEmail/models/new_api_key.rb +1 -1
- data/lib/ElasticEmail/models/new_smtp_credentials.rb +23 -1
- data/lib/ElasticEmail/models/options.rb +23 -1
- data/lib/ElasticEmail/models/recipient_event.rb +23 -1
- data/lib/ElasticEmail/models/segment.rb +1 -1
- data/lib/ElasticEmail/models/segment_payload.rb +1 -1
- data/lib/ElasticEmail/models/smtp_credentials.rb +23 -1
- data/lib/ElasticEmail/models/smtp_credentials_payload.rb +1 -1
- data/lib/ElasticEmail/models/sort_order_item.rb +1 -1
- data/lib/ElasticEmail/models/split_optimization_type.rb +1 -1
- data/lib/ElasticEmail/models/split_options.rb +23 -1
- data/lib/ElasticEmail/models/sub_account_info.rb +23 -1
- data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +1 -1
- data/lib/ElasticEmail/models/subaccount_email_settings.rb +1 -1
- data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +1 -1
- data/lib/ElasticEmail/models/subaccount_payload.rb +1 -1
- data/lib/ElasticEmail/models/subaccount_settings_info.rb +1 -1
- data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +1 -1
- data/lib/ElasticEmail/models/suppression.rb +1 -1
- data/lib/ElasticEmail/models/template.rb +23 -1
- data/lib/ElasticEmail/models/template_payload.rb +23 -1
- data/lib/ElasticEmail/models/template_scope.rb +1 -1
- data/lib/ElasticEmail/models/template_type.rb +3 -2
- data/lib/ElasticEmail/models/transactional_recipient.rb +1 -1
- data/lib/ElasticEmail/models/utm.rb +1 -1
- data/lib/ElasticEmail/models/verification_file_result.rb +23 -1
- data/lib/ElasticEmail/models/verification_file_result_details.rb +23 -1
- data/lib/ElasticEmail/models/verification_status.rb +1 -1
- data/lib/ElasticEmail/version.rb +2 -2
- data/lib/ElasticEmail.rb +2 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/email_predicted_validation_status_spec.rb +28 -0
- data/spec/spec_helper.rb +1 -1
- metadata +7 -3
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -24,12 +24,16 @@ module ElasticEmail
|
|
24
24
|
# MIME content type
|
25
25
|
attr_accessor :content_type
|
26
26
|
|
27
|
+
# Size of your attachment (in bytes).
|
28
|
+
attr_accessor :size
|
29
|
+
|
27
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
31
|
def self.attribute_map
|
29
32
|
{
|
30
33
|
:'binary_content' => :'BinaryContent',
|
31
34
|
:'name' => :'Name',
|
32
|
-
:'content_type' => :'ContentType'
|
35
|
+
:'content_type' => :'ContentType',
|
36
|
+
:'size' => :'Size'
|
33
37
|
}
|
34
38
|
end
|
35
39
|
|
@@ -43,7 +47,8 @@ module ElasticEmail
|
|
43
47
|
{
|
44
48
|
:'binary_content' => :'String',
|
45
49
|
:'name' => :'String',
|
46
|
-
:'content_type' => :'String'
|
50
|
+
:'content_type' => :'String',
|
51
|
+
:'size' => :'Integer'
|
47
52
|
}
|
48
53
|
end
|
49
54
|
|
@@ -79,6 +84,10 @@ module ElasticEmail
|
|
79
84
|
if attributes.key?(:'content_type')
|
80
85
|
self.content_type = attributes[:'content_type']
|
81
86
|
end
|
87
|
+
|
88
|
+
if attributes.key?(:'size')
|
89
|
+
self.size = attributes[:'size']
|
90
|
+
end
|
82
91
|
end
|
83
92
|
|
84
93
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -111,7 +120,8 @@ module ElasticEmail
|
|
111
120
|
self.class == o.class &&
|
112
121
|
binary_content == o.binary_content &&
|
113
122
|
name == o.name &&
|
114
|
-
content_type == o.content_type
|
123
|
+
content_type == o.content_type &&
|
124
|
+
size == o.size
|
115
125
|
end
|
116
126
|
|
117
127
|
# @see the `==` method
|
@@ -123,7 +133,7 @@ module ElasticEmail
|
|
123
133
|
# Calculates hash code according to all attributes.
|
124
134
|
# @return [Integer] Hash code
|
125
135
|
def hash
|
126
|
-
[binary_content, name, content_type].hash
|
136
|
+
[binary_content, name, content_type, size].hash
|
127
137
|
end
|
128
138
|
|
129
139
|
# Builds the object from hash
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -36,6 +36,28 @@ module ElasticEmail
|
|
36
36
|
# Which IPs can use this SmtpCredential
|
37
37
|
attr_accessor :restrict_access_to_ip_range
|
38
38
|
|
39
|
+
class EnumAttributeValidator
|
40
|
+
attr_reader :datatype
|
41
|
+
attr_reader :allowable_values
|
42
|
+
|
43
|
+
def initialize(datatype, allowable_values)
|
44
|
+
@allowable_values = allowable_values.map do |value|
|
45
|
+
case datatype.to_s
|
46
|
+
when /Integer/i
|
47
|
+
value.to_i
|
48
|
+
when /Float/i
|
49
|
+
value.to_f
|
50
|
+
else
|
51
|
+
value
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def valid?(value)
|
57
|
+
!value || allowable_values.include?(value)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
39
61
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
62
|
def self.attribute_map
|
41
63
|
{
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -33,6 +33,28 @@ module ElasticEmail
|
|
33
33
|
# Should the clicks be tracked? If no value has been provided, Account's default setting will be used.
|
34
34
|
attr_accessor :track_clicks
|
35
35
|
|
36
|
+
class EnumAttributeValidator
|
37
|
+
attr_reader :datatype
|
38
|
+
attr_reader :allowable_values
|
39
|
+
|
40
|
+
def initialize(datatype, allowable_values)
|
41
|
+
@allowable_values = allowable_values.map do |value|
|
42
|
+
case datatype.to_s
|
43
|
+
when /Integer/i
|
44
|
+
value.to_i
|
45
|
+
when /Float/i
|
46
|
+
value.to_f
|
47
|
+
else
|
48
|
+
value
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def valid?(value)
|
54
|
+
!value || allowable_values.include?(value)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
36
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
37
59
|
def self.attribute_map
|
38
60
|
{
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -53,6 +53,28 @@ module ElasticEmail
|
|
53
53
|
# Name of an IP pool this email was sent through
|
54
54
|
attr_accessor :pool_name
|
55
55
|
|
56
|
+
class EnumAttributeValidator
|
57
|
+
attr_reader :datatype
|
58
|
+
attr_reader :allowable_values
|
59
|
+
|
60
|
+
def initialize(datatype, allowable_values)
|
61
|
+
@allowable_values = allowable_values.map do |value|
|
62
|
+
case datatype.to_s
|
63
|
+
when /Integer/i
|
64
|
+
value.to_i
|
65
|
+
when /Float/i
|
66
|
+
value.to_f
|
67
|
+
else
|
68
|
+
value
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def valid?(value)
|
74
|
+
!value || allowable_values.include?(value)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
56
78
|
# Attribute mapping from ruby-style variable name to JSON key.
|
57
79
|
def self.attribute_map
|
58
80
|
{
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -33,6 +33,28 @@ module ElasticEmail
|
|
33
33
|
# Which IPs can use this SmtpCredential
|
34
34
|
attr_accessor :restrict_access_to_ip_range
|
35
35
|
|
36
|
+
class EnumAttributeValidator
|
37
|
+
attr_reader :datatype
|
38
|
+
attr_reader :allowable_values
|
39
|
+
|
40
|
+
def initialize(datatype, allowable_values)
|
41
|
+
@allowable_values = allowable_values.map do |value|
|
42
|
+
case datatype.to_s
|
43
|
+
when /Integer/i
|
44
|
+
value.to_i
|
45
|
+
when /Float/i
|
46
|
+
value.to_f
|
47
|
+
else
|
48
|
+
value
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def valid?(value)
|
54
|
+
!value || allowable_values.include?(value)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
36
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
37
59
|
def self.attribute_map
|
38
60
|
{
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -21,6 +21,28 @@ module ElasticEmail
|
|
21
21
|
# For how long should the results be measured until determining the winner template (content)
|
22
22
|
attr_accessor :optimize_period_minutes
|
23
23
|
|
24
|
+
class EnumAttributeValidator
|
25
|
+
attr_reader :datatype
|
26
|
+
attr_reader :allowable_values
|
27
|
+
|
28
|
+
def initialize(datatype, allowable_values)
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
30
|
+
case datatype.to_s
|
31
|
+
when /Integer/i
|
32
|
+
value.to_i
|
33
|
+
when /Float/i
|
34
|
+
value.to_f
|
35
|
+
else
|
36
|
+
value
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def valid?(value)
|
42
|
+
!value || allowable_values.include?(value)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
24
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
47
|
def self.attribute_map
|
26
48
|
{
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -41,6 +41,28 @@ module ElasticEmail
|
|
41
41
|
# How many contacts this SubAccount has stored
|
42
42
|
attr_accessor :contacts_count
|
43
43
|
|
44
|
+
class EnumAttributeValidator
|
45
|
+
attr_reader :datatype
|
46
|
+
attr_reader :allowable_values
|
47
|
+
|
48
|
+
def initialize(datatype, allowable_values)
|
49
|
+
@allowable_values = allowable_values.map do |value|
|
50
|
+
case datatype.to_s
|
51
|
+
when /Integer/i
|
52
|
+
value.to_i
|
53
|
+
when /Float/i
|
54
|
+
value.to_f
|
55
|
+
else
|
56
|
+
value
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def valid?(value)
|
62
|
+
!value || allowable_values.include?(value)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
44
66
|
# Attribute mapping from ruby-style variable name to JSON key.
|
45
67
|
def self.attribute_map
|
46
68
|
{
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -32,6 +32,28 @@ module ElasticEmail
|
|
32
32
|
|
33
33
|
attr_accessor :template_scope
|
34
34
|
|
35
|
+
class EnumAttributeValidator
|
36
|
+
attr_reader :datatype
|
37
|
+
attr_reader :allowable_values
|
38
|
+
|
39
|
+
def initialize(datatype, allowable_values)
|
40
|
+
@allowable_values = allowable_values.map do |value|
|
41
|
+
case datatype.to_s
|
42
|
+
when /Integer/i
|
43
|
+
value.to_i
|
44
|
+
when /Float/i
|
45
|
+
value.to_f
|
46
|
+
else
|
47
|
+
value
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def valid?(value)
|
53
|
+
!value || allowable_values.include?(value)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
35
57
|
# Attribute mapping from ruby-style variable name to JSON key.
|
36
58
|
def self.attribute_map
|
37
59
|
{
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -27,6 +27,28 @@ module ElasticEmail
|
|
27
27
|
|
28
28
|
attr_accessor :template_scope
|
29
29
|
|
30
|
+
class EnumAttributeValidator
|
31
|
+
attr_reader :datatype
|
32
|
+
attr_reader :allowable_values
|
33
|
+
|
34
|
+
def initialize(datatype, allowable_values)
|
35
|
+
@allowable_values = allowable_values.map do |value|
|
36
|
+
case datatype.to_s
|
37
|
+
when /Integer/i
|
38
|
+
value.to_i
|
39
|
+
when /Float/i
|
40
|
+
value.to_f
|
41
|
+
else
|
42
|
+
value
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def valid?(value)
|
48
|
+
!value || allowable_values.include?(value)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
30
52
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
53
|
def self.attribute_map
|
32
54
|
{
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -18,9 +18,10 @@ module ElasticEmail
|
|
18
18
|
RAW_HTML = "RawHTML".freeze
|
19
19
|
DRAG_DROP_EDITOR = "DragDropEditor".freeze
|
20
20
|
LANDING_PAGE_EDITOR = "LandingPageEditor".freeze
|
21
|
+
TEMPLATE_EDITOR = "TemplateEditor".freeze
|
21
22
|
|
22
23
|
def self.all_vars
|
23
|
-
@all_vars ||= [RAW_HTML, DRAG_DROP_EDITOR, LANDING_PAGE_EDITOR].freeze
|
24
|
+
@all_vars ||= [RAW_HTML, DRAG_DROP_EDITOR, LANDING_PAGE_EDITOR, TEMPLATE_EDITOR].freeze
|
24
25
|
end
|
25
26
|
|
26
27
|
# Builds the enum from string
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 4.0.0
|
7
7
|
Contact: support@elasticemail.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.
|
9
|
+
OpenAPI Generator version: 6.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -32,6 +32,28 @@ module ElasticEmail
|
|
32
32
|
# Origin file extension
|
33
33
|
attr_accessor :source
|
34
34
|
|
35
|
+
class EnumAttributeValidator
|
36
|
+
attr_reader :datatype
|
37
|
+
attr_reader :allowable_values
|
38
|
+
|
39
|
+
def initialize(datatype, allowable_values)
|
40
|
+
@allowable_values = allowable_values.map do |value|
|
41
|
+
case datatype.to_s
|
42
|
+
when /Integer/i
|
43
|
+
value.to_i
|
44
|
+
when /Float/i
|
45
|
+
value.to_f
|
46
|
+
else
|
47
|
+
value
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def valid?(value)
|
53
|
+
!value || allowable_values.include?(value)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
35
57
|
# Attribute mapping from ruby-style variable name to JSON key.
|
36
58
|
def self.attribute_map
|
37
59
|
{
|