ElasticEmail 4.0.28 → 4.2.0
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 +12 -8
- data/VERSION +1 -1
- data/docs/CampaignsApi.md +73 -0
- data/docs/DKIMRecord.md +26 -0
- data/docs/DomainData.md +7 -1
- data/docs/DomainDetail.md +7 -1
- data/docs/SecurityApi.md +4 -4
- data/docs/SubAccountsApi.md +73 -1
- data/lib/ElasticEmail/api/campaigns_api.rb +68 -0
- data/lib/ElasticEmail/api/security_api.rb +4 -4
- data/lib/ElasticEmail/api/sub_accounts_api.rb +65 -2
- data/lib/ElasticEmail/models/certificate_validation_status.rb +2 -1
- data/lib/ElasticEmail/models/dkim_record.rb +252 -0
- data/lib/ElasticEmail/models/domain_data.rb +32 -4
- data/lib/ElasticEmail/models/domain_detail.rb +32 -4
- data/lib/ElasticEmail/models/event_type.rb +5 -2
- data/lib/ElasticEmail/version.rb +1 -1
- data/lib/ElasticEmail.rb +1 -0
- data/spec/api/campaigns_api_spec.rb +13 -0
- data/spec/api/security_api_spec.rb +2 -2
- data/spec/api/sub_accounts_api_spec.rb +13 -1
- data/spec/models/dkim_record_spec.rb +60 -0
- data/spec/models/domain_data_spec.rb +18 -0
- data/spec/models/domain_detail_spec.rb +18 -0
- metadata +95 -91
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Elastic Email REST API
|
|
3
|
+
|
|
4
|
+
#This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target='_blank' href='https://app.elasticemail.com/marketing/settings/new/manage-api'>here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target='_blank' href='https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme'>here</a>
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
|
+
Contact: support@elasticemail.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.11.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module ElasticEmail
|
|
17
|
+
# Content of the DKIM record to be added to DNS for the domain.
|
|
18
|
+
class DKIMRecord
|
|
19
|
+
attr_accessor :selector
|
|
20
|
+
|
|
21
|
+
attr_accessor :public_key
|
|
22
|
+
|
|
23
|
+
attr_accessor :host_name
|
|
24
|
+
|
|
25
|
+
attr_accessor :record_value
|
|
26
|
+
|
|
27
|
+
# Name of selected domain.
|
|
28
|
+
attr_accessor :domain
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'selector' => :'Selector',
|
|
34
|
+
:'public_key' => :'PublicKey',
|
|
35
|
+
:'host_name' => :'HostName',
|
|
36
|
+
:'record_value' => :'RecordValue',
|
|
37
|
+
:'domain' => :'Domain'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'selector' => :'String',
|
|
50
|
+
:'public_key' => :'String',
|
|
51
|
+
:'host_name' => :'String',
|
|
52
|
+
:'record_value' => :'String',
|
|
53
|
+
:'domain' => :'String'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# List of attributes with nullable: true
|
|
58
|
+
def self.openapi_nullable
|
|
59
|
+
Set.new([
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
def initialize(attributes = {})
|
|
66
|
+
if (!attributes.is_a?(Hash))
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ElasticEmail::DKIMRecord` initialize method"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::DKIMRecord`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'selector')
|
|
79
|
+
self.selector = attributes[:'selector']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'public_key')
|
|
83
|
+
self.public_key = attributes[:'public_key']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'host_name')
|
|
87
|
+
self.host_name = attributes[:'host_name']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'record_value')
|
|
91
|
+
self.record_value = attributes[:'record_value']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'domain')
|
|
95
|
+
self.domain = attributes[:'domain']
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
100
|
+
# @return Array for valid properties with the reasons
|
|
101
|
+
def list_invalid_properties
|
|
102
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
103
|
+
invalid_properties = Array.new
|
|
104
|
+
invalid_properties
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Check to see if the all the properties in the model are valid
|
|
108
|
+
# @return true if the model is valid
|
|
109
|
+
def valid?
|
|
110
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
111
|
+
true
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Checks equality by comparing each attribute.
|
|
115
|
+
# @param [Object] Object to be compared
|
|
116
|
+
def ==(o)
|
|
117
|
+
return true if self.equal?(o)
|
|
118
|
+
self.class == o.class &&
|
|
119
|
+
selector == o.selector &&
|
|
120
|
+
public_key == o.public_key &&
|
|
121
|
+
host_name == o.host_name &&
|
|
122
|
+
record_value == o.record_value &&
|
|
123
|
+
domain == o.domain
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# @see the `==` method
|
|
127
|
+
# @param [Object] Object to be compared
|
|
128
|
+
def eql?(o)
|
|
129
|
+
self == o
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Calculates hash code according to all attributes.
|
|
133
|
+
# @return [Integer] Hash code
|
|
134
|
+
def hash
|
|
135
|
+
[selector, public_key, host_name, record_value, domain].hash
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Builds the object from hash
|
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
140
|
+
# @return [Object] Returns the model itself
|
|
141
|
+
def self.build_from_hash(attributes)
|
|
142
|
+
return nil unless attributes.is_a?(Hash)
|
|
143
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
144
|
+
transformed_hash = {}
|
|
145
|
+
openapi_types.each_pair do |key, type|
|
|
146
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
147
|
+
transformed_hash["#{key}"] = nil
|
|
148
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
149
|
+
# check to ensure the input is an array given that the attribute
|
|
150
|
+
# is documented as an array but the input is not
|
|
151
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
152
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
153
|
+
end
|
|
154
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
155
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
new(transformed_hash)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Deserializes the data based on type
|
|
162
|
+
# @param string type Data type
|
|
163
|
+
# @param string value Value to be deserialized
|
|
164
|
+
# @return [Object] Deserialized data
|
|
165
|
+
def self._deserialize(type, value)
|
|
166
|
+
case type.to_sym
|
|
167
|
+
when :Time
|
|
168
|
+
Time.parse(value)
|
|
169
|
+
when :Date
|
|
170
|
+
Date.parse(value)
|
|
171
|
+
when :String
|
|
172
|
+
value.to_s
|
|
173
|
+
when :Integer
|
|
174
|
+
value.to_i
|
|
175
|
+
when :Float
|
|
176
|
+
value.to_f
|
|
177
|
+
when :Boolean
|
|
178
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
179
|
+
true
|
|
180
|
+
else
|
|
181
|
+
false
|
|
182
|
+
end
|
|
183
|
+
when :Object
|
|
184
|
+
# generic object (usually a Hash), return directly
|
|
185
|
+
value
|
|
186
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
187
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
188
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
189
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
190
|
+
k_type = Regexp.last_match[:k_type]
|
|
191
|
+
v_type = Regexp.last_match[:v_type]
|
|
192
|
+
{}.tap do |hash|
|
|
193
|
+
value.each do |k, v|
|
|
194
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
else # model
|
|
198
|
+
# models (e.g. Pet) or oneOf
|
|
199
|
+
klass = ElasticEmail.const_get(type)
|
|
200
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Returns the string representation of the object
|
|
205
|
+
# @return [String] String presentation of the object
|
|
206
|
+
def to_s
|
|
207
|
+
to_hash.to_s
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
|
212
|
+
def to_body
|
|
213
|
+
to_hash
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Returns the object in the form of hash
|
|
217
|
+
# @return [Hash] Returns the object in the form of hash
|
|
218
|
+
def to_hash
|
|
219
|
+
hash = {}
|
|
220
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
221
|
+
value = self.send(attr)
|
|
222
|
+
if value.nil?
|
|
223
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
224
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
hash[param] = _to_hash(value)
|
|
228
|
+
end
|
|
229
|
+
hash
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Outputs non-array value in the form of hash
|
|
233
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
234
|
+
# @param [Object] value Any valid value
|
|
235
|
+
# @return [Hash] Returns the value in the form of hash
|
|
236
|
+
def _to_hash(value)
|
|
237
|
+
if value.is_a?(Array)
|
|
238
|
+
value.compact.map { |v| _to_hash(v) }
|
|
239
|
+
elsif value.is_a?(Hash)
|
|
240
|
+
{}.tap do |hash|
|
|
241
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
242
|
+
end
|
|
243
|
+
elsif value.respond_to? :to_hash
|
|
244
|
+
value.to_hash
|
|
245
|
+
else
|
|
246
|
+
value
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
end
|
|
@@ -48,6 +48,8 @@ module ElasticEmail
|
|
|
48
48
|
|
|
49
49
|
attr_accessor :certificate_status
|
|
50
50
|
|
|
51
|
+
attr_accessor :certificate_expiry_date
|
|
52
|
+
|
|
51
53
|
attr_accessor :certificate_validation_error
|
|
52
54
|
|
|
53
55
|
attr_accessor :tracking_type_user_request
|
|
@@ -58,10 +60,14 @@ module ElasticEmail
|
|
|
58
60
|
|
|
59
61
|
attr_accessor :is_custom_bounces_domain_default
|
|
60
62
|
|
|
63
|
+
attr_accessor :was_ever_verified
|
|
64
|
+
|
|
61
65
|
attr_accessor :is_marked_for_deletion
|
|
62
66
|
|
|
63
67
|
attr_accessor :ownership
|
|
64
68
|
|
|
69
|
+
attr_accessor :dkim_record
|
|
70
|
+
|
|
65
71
|
class EnumAttributeValidator
|
|
66
72
|
attr_reader :datatype
|
|
67
73
|
attr_reader :allowable_values
|
|
@@ -99,13 +105,16 @@ module ElasticEmail
|
|
|
99
105
|
:'type' => :'Type',
|
|
100
106
|
:'tracking_status' => :'TrackingStatus',
|
|
101
107
|
:'certificate_status' => :'CertificateStatus',
|
|
108
|
+
:'certificate_expiry_date' => :'CertificateExpiryDate',
|
|
102
109
|
:'certificate_validation_error' => :'CertificateValidationError',
|
|
103
110
|
:'tracking_type_user_request' => :'TrackingTypeUserRequest',
|
|
104
111
|
:'verp' => :'VERP',
|
|
105
112
|
:'custom_bounces_domain' => :'CustomBouncesDomain',
|
|
106
113
|
:'is_custom_bounces_domain_default' => :'IsCustomBouncesDomainDefault',
|
|
114
|
+
:'was_ever_verified' => :'WasEverVerified',
|
|
107
115
|
:'is_marked_for_deletion' => :'IsMarkedForDeletion',
|
|
108
|
-
:'ownership' => :'Ownership'
|
|
116
|
+
:'ownership' => :'Ownership',
|
|
117
|
+
:'dkim_record' => :'DKIMRecord'
|
|
109
118
|
}
|
|
110
119
|
end
|
|
111
120
|
|
|
@@ -129,19 +138,23 @@ module ElasticEmail
|
|
|
129
138
|
:'type' => :'TrackingType',
|
|
130
139
|
:'tracking_status' => :'TrackingValidationStatus',
|
|
131
140
|
:'certificate_status' => :'CertificateValidationStatus',
|
|
141
|
+
:'certificate_expiry_date' => :'Time',
|
|
132
142
|
:'certificate_validation_error' => :'String',
|
|
133
143
|
:'tracking_type_user_request' => :'TrackingType',
|
|
134
144
|
:'verp' => :'Boolean',
|
|
135
145
|
:'custom_bounces_domain' => :'String',
|
|
136
146
|
:'is_custom_bounces_domain_default' => :'Boolean',
|
|
147
|
+
:'was_ever_verified' => :'Boolean',
|
|
137
148
|
:'is_marked_for_deletion' => :'Boolean',
|
|
138
|
-
:'ownership' => :'DomainOwner'
|
|
149
|
+
:'ownership' => :'DomainOwner',
|
|
150
|
+
:'dkim_record' => :'DKIMRecord'
|
|
139
151
|
}
|
|
140
152
|
end
|
|
141
153
|
|
|
142
154
|
# List of attributes with nullable: true
|
|
143
155
|
def self.openapi_nullable
|
|
144
156
|
Set.new([
|
|
157
|
+
:'certificate_expiry_date',
|
|
145
158
|
])
|
|
146
159
|
end
|
|
147
160
|
|
|
@@ -214,6 +227,10 @@ module ElasticEmail
|
|
|
214
227
|
self.certificate_status = 'ErrorOccured'
|
|
215
228
|
end
|
|
216
229
|
|
|
230
|
+
if attributes.key?(:'certificate_expiry_date')
|
|
231
|
+
self.certificate_expiry_date = attributes[:'certificate_expiry_date']
|
|
232
|
+
end
|
|
233
|
+
|
|
217
234
|
if attributes.key?(:'certificate_validation_error')
|
|
218
235
|
self.certificate_validation_error = attributes[:'certificate_validation_error']
|
|
219
236
|
end
|
|
@@ -236,6 +253,10 @@ module ElasticEmail
|
|
|
236
253
|
self.is_custom_bounces_domain_default = attributes[:'is_custom_bounces_domain_default']
|
|
237
254
|
end
|
|
238
255
|
|
|
256
|
+
if attributes.key?(:'was_ever_verified')
|
|
257
|
+
self.was_ever_verified = attributes[:'was_ever_verified']
|
|
258
|
+
end
|
|
259
|
+
|
|
239
260
|
if attributes.key?(:'is_marked_for_deletion')
|
|
240
261
|
self.is_marked_for_deletion = attributes[:'is_marked_for_deletion']
|
|
241
262
|
end
|
|
@@ -245,6 +266,10 @@ module ElasticEmail
|
|
|
245
266
|
else
|
|
246
267
|
self.ownership = 'Current'
|
|
247
268
|
end
|
|
269
|
+
|
|
270
|
+
if attributes.key?(:'dkim_record')
|
|
271
|
+
self.dkim_record = attributes[:'dkim_record']
|
|
272
|
+
end
|
|
248
273
|
end
|
|
249
274
|
|
|
250
275
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -279,13 +304,16 @@ module ElasticEmail
|
|
|
279
304
|
type == o.type &&
|
|
280
305
|
tracking_status == o.tracking_status &&
|
|
281
306
|
certificate_status == o.certificate_status &&
|
|
307
|
+
certificate_expiry_date == o.certificate_expiry_date &&
|
|
282
308
|
certificate_validation_error == o.certificate_validation_error &&
|
|
283
309
|
tracking_type_user_request == o.tracking_type_user_request &&
|
|
284
310
|
verp == o.verp &&
|
|
285
311
|
custom_bounces_domain == o.custom_bounces_domain &&
|
|
286
312
|
is_custom_bounces_domain_default == o.is_custom_bounces_domain_default &&
|
|
313
|
+
was_ever_verified == o.was_ever_verified &&
|
|
287
314
|
is_marked_for_deletion == o.is_marked_for_deletion &&
|
|
288
|
-
ownership == o.ownership
|
|
315
|
+
ownership == o.ownership &&
|
|
316
|
+
dkim_record == o.dkim_record
|
|
289
317
|
end
|
|
290
318
|
|
|
291
319
|
# @see the `==` method
|
|
@@ -297,7 +325,7 @@ module ElasticEmail
|
|
|
297
325
|
# Calculates hash code according to all attributes.
|
|
298
326
|
# @return [Integer] Hash code
|
|
299
327
|
def hash
|
|
300
|
-
[validation_log, domain, default_domain, spf, dkim, mx, dmarc, is_rewrite_domain_valid, verify, type, tracking_status, certificate_status, certificate_validation_error, tracking_type_user_request, verp, custom_bounces_domain, is_custom_bounces_domain_default, is_marked_for_deletion, ownership].hash
|
|
328
|
+
[validation_log, domain, default_domain, spf, dkim, mx, dmarc, is_rewrite_domain_valid, verify, type, tracking_status, certificate_status, certificate_expiry_date, certificate_validation_error, tracking_type_user_request, verp, custom_bounces_domain, is_custom_bounces_domain_default, was_ever_verified, is_marked_for_deletion, ownership, dkim_record].hash
|
|
301
329
|
end
|
|
302
330
|
|
|
303
331
|
# Builds the object from hash
|
|
@@ -45,6 +45,8 @@ module ElasticEmail
|
|
|
45
45
|
|
|
46
46
|
attr_accessor :certificate_status
|
|
47
47
|
|
|
48
|
+
attr_accessor :certificate_expiry_date
|
|
49
|
+
|
|
48
50
|
attr_accessor :certificate_validation_error
|
|
49
51
|
|
|
50
52
|
attr_accessor :tracking_type_user_request
|
|
@@ -55,10 +57,14 @@ module ElasticEmail
|
|
|
55
57
|
|
|
56
58
|
attr_accessor :is_custom_bounces_domain_default
|
|
57
59
|
|
|
60
|
+
attr_accessor :was_ever_verified
|
|
61
|
+
|
|
58
62
|
attr_accessor :is_marked_for_deletion
|
|
59
63
|
|
|
60
64
|
attr_accessor :ownership
|
|
61
65
|
|
|
66
|
+
attr_accessor :dkim_record
|
|
67
|
+
|
|
62
68
|
class EnumAttributeValidator
|
|
63
69
|
attr_reader :datatype
|
|
64
70
|
attr_reader :allowable_values
|
|
@@ -95,13 +101,16 @@ module ElasticEmail
|
|
|
95
101
|
:'type' => :'Type',
|
|
96
102
|
:'tracking_status' => :'TrackingStatus',
|
|
97
103
|
:'certificate_status' => :'CertificateStatus',
|
|
104
|
+
:'certificate_expiry_date' => :'CertificateExpiryDate',
|
|
98
105
|
:'certificate_validation_error' => :'CertificateValidationError',
|
|
99
106
|
:'tracking_type_user_request' => :'TrackingTypeUserRequest',
|
|
100
107
|
:'verp' => :'VERP',
|
|
101
108
|
:'custom_bounces_domain' => :'CustomBouncesDomain',
|
|
102
109
|
:'is_custom_bounces_domain_default' => :'IsCustomBouncesDomainDefault',
|
|
110
|
+
:'was_ever_verified' => :'WasEverVerified',
|
|
103
111
|
:'is_marked_for_deletion' => :'IsMarkedForDeletion',
|
|
104
|
-
:'ownership' => :'Ownership'
|
|
112
|
+
:'ownership' => :'Ownership',
|
|
113
|
+
:'dkim_record' => :'DKIMRecord'
|
|
105
114
|
}
|
|
106
115
|
end
|
|
107
116
|
|
|
@@ -124,19 +133,23 @@ module ElasticEmail
|
|
|
124
133
|
:'type' => :'TrackingType',
|
|
125
134
|
:'tracking_status' => :'TrackingValidationStatus',
|
|
126
135
|
:'certificate_status' => :'CertificateValidationStatus',
|
|
136
|
+
:'certificate_expiry_date' => :'Time',
|
|
127
137
|
:'certificate_validation_error' => :'String',
|
|
128
138
|
:'tracking_type_user_request' => :'TrackingType',
|
|
129
139
|
:'verp' => :'Boolean',
|
|
130
140
|
:'custom_bounces_domain' => :'String',
|
|
131
141
|
:'is_custom_bounces_domain_default' => :'Boolean',
|
|
142
|
+
:'was_ever_verified' => :'Boolean',
|
|
132
143
|
:'is_marked_for_deletion' => :'Boolean',
|
|
133
|
-
:'ownership' => :'DomainOwner'
|
|
144
|
+
:'ownership' => :'DomainOwner',
|
|
145
|
+
:'dkim_record' => :'DKIMRecord'
|
|
134
146
|
}
|
|
135
147
|
end
|
|
136
148
|
|
|
137
149
|
# List of attributes with nullable: true
|
|
138
150
|
def self.openapi_nullable
|
|
139
151
|
Set.new([
|
|
152
|
+
:'certificate_expiry_date',
|
|
140
153
|
])
|
|
141
154
|
end
|
|
142
155
|
|
|
@@ -205,6 +218,10 @@ module ElasticEmail
|
|
|
205
218
|
self.certificate_status = 'ErrorOccured'
|
|
206
219
|
end
|
|
207
220
|
|
|
221
|
+
if attributes.key?(:'certificate_expiry_date')
|
|
222
|
+
self.certificate_expiry_date = attributes[:'certificate_expiry_date']
|
|
223
|
+
end
|
|
224
|
+
|
|
208
225
|
if attributes.key?(:'certificate_validation_error')
|
|
209
226
|
self.certificate_validation_error = attributes[:'certificate_validation_error']
|
|
210
227
|
end
|
|
@@ -227,6 +244,10 @@ module ElasticEmail
|
|
|
227
244
|
self.is_custom_bounces_domain_default = attributes[:'is_custom_bounces_domain_default']
|
|
228
245
|
end
|
|
229
246
|
|
|
247
|
+
if attributes.key?(:'was_ever_verified')
|
|
248
|
+
self.was_ever_verified = attributes[:'was_ever_verified']
|
|
249
|
+
end
|
|
250
|
+
|
|
230
251
|
if attributes.key?(:'is_marked_for_deletion')
|
|
231
252
|
self.is_marked_for_deletion = attributes[:'is_marked_for_deletion']
|
|
232
253
|
end
|
|
@@ -236,6 +257,10 @@ module ElasticEmail
|
|
|
236
257
|
else
|
|
237
258
|
self.ownership = 'Current'
|
|
238
259
|
end
|
|
260
|
+
|
|
261
|
+
if attributes.key?(:'dkim_record')
|
|
262
|
+
self.dkim_record = attributes[:'dkim_record']
|
|
263
|
+
end
|
|
239
264
|
end
|
|
240
265
|
|
|
241
266
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -269,13 +294,16 @@ module ElasticEmail
|
|
|
269
294
|
type == o.type &&
|
|
270
295
|
tracking_status == o.tracking_status &&
|
|
271
296
|
certificate_status == o.certificate_status &&
|
|
297
|
+
certificate_expiry_date == o.certificate_expiry_date &&
|
|
272
298
|
certificate_validation_error == o.certificate_validation_error &&
|
|
273
299
|
tracking_type_user_request == o.tracking_type_user_request &&
|
|
274
300
|
verp == o.verp &&
|
|
275
301
|
custom_bounces_domain == o.custom_bounces_domain &&
|
|
276
302
|
is_custom_bounces_domain_default == o.is_custom_bounces_domain_default &&
|
|
303
|
+
was_ever_verified == o.was_ever_verified &&
|
|
277
304
|
is_marked_for_deletion == o.is_marked_for_deletion &&
|
|
278
|
-
ownership == o.ownership
|
|
305
|
+
ownership == o.ownership &&
|
|
306
|
+
dkim_record == o.dkim_record
|
|
279
307
|
end
|
|
280
308
|
|
|
281
309
|
# @see the `==` method
|
|
@@ -287,7 +315,7 @@ module ElasticEmail
|
|
|
287
315
|
# Calculates hash code according to all attributes.
|
|
288
316
|
# @return [Integer] Hash code
|
|
289
317
|
def hash
|
|
290
|
-
[domain, default_domain, spf, dkim, mx, dmarc, is_rewrite_domain_valid, verify, type, tracking_status, certificate_status, certificate_validation_error, tracking_type_user_request, verp, custom_bounces_domain, is_custom_bounces_domain_default, is_marked_for_deletion, ownership].hash
|
|
318
|
+
[domain, default_domain, spf, dkim, mx, dmarc, is_rewrite_domain_valid, verify, type, tracking_status, certificate_status, certificate_expiry_date, certificate_validation_error, tracking_type_user_request, verp, custom_bounces_domain, is_custom_bounces_domain_default, was_ever_verified, is_marked_for_deletion, ownership, dkim_record].hash
|
|
291
319
|
end
|
|
292
320
|
|
|
293
321
|
# Builds the object from hash
|
|
@@ -17,15 +17,18 @@ module ElasticEmail
|
|
|
17
17
|
class EventType
|
|
18
18
|
SUBMISSION = "Submission".freeze
|
|
19
19
|
FAILED_ATTEMPT = "FailedAttempt".freeze
|
|
20
|
-
|
|
20
|
+
ERROR = "Error".freeze
|
|
21
21
|
SENT = "Sent".freeze
|
|
22
22
|
OPEN = "Open".freeze
|
|
23
23
|
CLICK = "Click".freeze
|
|
24
24
|
UNSUBSCRIBE = "Unsubscribe".freeze
|
|
25
25
|
COMPLAINT = "Complaint".freeze
|
|
26
|
+
BOUNCE = "Bounce".freeze
|
|
27
|
+
TRANSACTIONAL_UNSUBSCRIBE = "TransactionalUnsubscribe".freeze
|
|
28
|
+
SUPPRESS = "Suppress".freeze
|
|
26
29
|
|
|
27
30
|
def self.all_vars
|
|
28
|
-
@all_vars ||= [SUBMISSION, FAILED_ATTEMPT,
|
|
31
|
+
@all_vars ||= [SUBMISSION, FAILED_ATTEMPT, ERROR, SENT, OPEN, CLICK, UNSUBSCRIBE, COMPLAINT, BOUNCE, TRANSACTIONAL_UNSUBSCRIBE, SUPPRESS].freeze
|
|
29
32
|
end
|
|
30
33
|
|
|
31
34
|
# Builds the enum from string
|
data/lib/ElasticEmail/version.rb
CHANGED
data/lib/ElasticEmail.rb
CHANGED
|
@@ -40,6 +40,7 @@ require 'ElasticEmail/models/contact_source'
|
|
|
40
40
|
require 'ElasticEmail/models/contact_status'
|
|
41
41
|
require 'ElasticEmail/models/contact_update_payload'
|
|
42
42
|
require 'ElasticEmail/models/contacts_list'
|
|
43
|
+
require 'ElasticEmail/models/dkim_record'
|
|
43
44
|
require 'ElasticEmail/models/delivery_optimization_type'
|
|
44
45
|
require 'ElasticEmail/models/domain_data'
|
|
45
46
|
require 'ElasticEmail/models/domain_detail'
|
|
@@ -32,6 +32,19 @@ describe 'CampaignsApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# unit tests for campaigns_automation_by_name_trigger_post
|
|
36
|
+
# Trigger Automation for Contact
|
|
37
|
+
# Manually trigger an Automation for a contact. Required Access Level: ModifyAutomations
|
|
38
|
+
# @param name
|
|
39
|
+
# @param contact_email
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @return [nil]
|
|
42
|
+
describe 'campaigns_automation_by_name_trigger_post test' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
35
48
|
# unit tests for campaigns_by_name_delete
|
|
36
49
|
# Delete Campaign
|
|
37
50
|
# Delete the specific campaign. This does not cancel in progress email, see Cancel In Progress. Required Access Level: ModifyCampaigns
|
|
@@ -50,7 +50,7 @@ describe 'SecurityApi' do
|
|
|
50
50
|
# Load your existing ApiKey info. Required Access Level: ViewAccessTokens
|
|
51
51
|
# @param name Name of the ApiKey
|
|
52
52
|
# @param [Hash] opts the optional parameters
|
|
53
|
-
# @option opts [String] :subaccount Email of the subaccount of which ApiKey should be loaded
|
|
53
|
+
# @option opts [String] :subaccount Email of the subaccount of which ApiKey should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
|
|
54
54
|
# @return [ApiKey]
|
|
55
55
|
describe 'security_apikeys_by_name_get test' do
|
|
56
56
|
it 'should work' do
|
|
@@ -75,7 +75,7 @@ describe 'SecurityApi' do
|
|
|
75
75
|
# List ApiKeys
|
|
76
76
|
# List all your existing ApiKeys. Required Access Level: ViewAccessTokens
|
|
77
77
|
# @param [Hash] opts the optional parameters
|
|
78
|
-
# @option opts [String] :subaccount Email of the subaccount of which ApiKeys should be loaded
|
|
78
|
+
# @option opts [String] :subaccount Email of the subaccount of which ApiKeys should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
|
|
79
79
|
# @return [Array<ApiKey>]
|
|
80
80
|
describe 'security_apikeys_get test' do
|
|
81
81
|
it 'should work' do
|
|
@@ -32,6 +32,18 @@ describe 'SubAccountsApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# unit tests for subaccounts_by_email_apikey_get
|
|
36
|
+
# Get SubAccount ApiKey
|
|
37
|
+
# Returns API key token for the specified SubAccount. The default API key created for the subaccount has a 48-hour expiration period. Required Access Level: ModifySubAccounts
|
|
38
|
+
# @param email Email address of Sub-Account
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [String]
|
|
41
|
+
describe 'subaccounts_by_email_apikey_get test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
35
47
|
# unit tests for subaccounts_by_email_credits_patch
|
|
36
48
|
# Add, Subtract Email Credits
|
|
37
49
|
# Update email credits of a subaccount by the given amount. Required Access Level: ModifySubAccounts
|
|
@@ -97,7 +109,7 @@ describe 'SubAccountsApi' do
|
|
|
97
109
|
|
|
98
110
|
# unit tests for subaccounts_post
|
|
99
111
|
# Add SubAccount
|
|
100
|
-
# Add a new SubAccount to your Account. To receive an access token for this SubAccount, make a POST security/apikeys request using the 'subaccount' parameter. Required Access Level: ModifySubAccounts
|
|
112
|
+
# Add a new SubAccount to your Account. To receive an access token for this SubAccount, make a POST security/apikeys request using the 'subaccount' parameter. The default API key created for the subaccount has a 48-hour expiration period. Required Access Level: ModifySubAccounts
|
|
101
113
|
# @param subaccount_payload
|
|
102
114
|
# @param [Hash] opts the optional parameters
|
|
103
115
|
# @return [SubAccountInfo]
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Elastic Email REST API
|
|
3
|
+
|
|
4
|
+
#This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target='_blank' href='https://app.elasticemail.com/marketing/settings/new/manage-api'>here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target='_blank' href='https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme'>here</a>
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
|
+
Contact: support@elasticemail.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.11.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for ElasticEmail::DKIMRecord
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe ElasticEmail::DKIMRecord do
|
|
21
|
+
let(:instance) { ElasticEmail::DKIMRecord.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of DKIMRecord' do
|
|
24
|
+
it 'should create an instance of DKIMRecord' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(ElasticEmail::DKIMRecord)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "selector"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "public_key"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "host_name"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "record_value"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe 'test attribute "domain"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
end
|