pingram 1.0.45 → 1.0.47

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.
@@ -14,38 +14,34 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Pingram
17
+ # A domain saved on this account.
17
18
  class GetSendersResponseInner < ApiModelBase
18
- # What is still missing before new mail can use the tracking subdomain.
19
- attr_accessor :waiting_for
20
-
21
- attr_accessor :sender
19
+ # Domain name, such as mail.example.com.
20
+ attr_accessor :domain
22
21
 
22
+ # Whether sending from this domain is not started, waiting, verified, temporarily failing, or failed. Mail goes out when this is `SUCCESS` or `TEMPORARY_FAILURE`.
23
23
  attr_accessor :status
24
24
 
25
- attr_accessor :last_sync
26
-
27
- attr_accessor :verification_tokens
28
-
29
- attr_accessor :mail_from_domain_status
30
-
31
- attr_accessor :created_at
32
-
33
- attr_accessor :private_dkim_key
25
+ # Whether this domain is set to receive mail. This is your choice, not the MX record.
26
+ attr_accessor :inbound
34
27
 
35
- attr_accessor :reminder_sent_at
28
+ # Whether new mail from this domain records opens. This is your choice, not the tracking host.
29
+ attr_accessor :open_tracking
36
30
 
37
- attr_accessor :selector
31
+ # Whether new mail from this domain records link clicks. This is your choice, not the tracking host.
32
+ attr_accessor :click_tracking
38
33
 
39
- attr_accessor :verification_records
40
-
41
- # Subdomain recipients see on click tracking, the open pixel, and the unsubscribe page, such as links.
34
+ # Host label for tracked links, such as links. Absent until tracking has a host.
42
35
  attr_accessor :tracking_subdomain
43
36
 
44
- # Whether tracked links on this subdomain are not started, waiting, active, or failed.
45
- attr_accessor :tracking_status
37
+ # DNS records to publish for this domain. Every record we can show is listed. `expected` is false when the current settings do not need it. `status` is the row to show.
38
+ attr_accessor :dns_records
39
+
40
+ # Plain summary of sending, receiving, and tracking. Names each record and whether it is verified, waiting, missing, or turned off.
41
+ attr_accessor :detail
46
42
 
47
- # Why tracked links on this subdomain are not active, when setup did not succeed.
48
- attr_accessor :tracking_failure_reason
43
+ # When this domain was added.
44
+ attr_accessor :created_at
49
45
 
50
46
  class EnumAttributeValidator
51
47
  attr_reader :datatype
@@ -72,20 +68,15 @@ module Pingram
72
68
  # Attribute mapping from ruby-style variable name to JSON key.
73
69
  def self.attribute_map
74
70
  {
75
- :'waiting_for' => :'waitingFor',
76
- :'sender' => :'sender',
71
+ :'domain' => :'domain',
77
72
  :'status' => :'status',
78
- :'last_sync' => :'lastSync',
79
- :'verification_tokens' => :'verificationTokens',
80
- :'mail_from_domain_status' => :'mailFromDomainStatus',
81
- :'created_at' => :'createdAt',
82
- :'private_dkim_key' => :'privateDKIMKey',
83
- :'reminder_sent_at' => :'reminderSentAt',
84
- :'selector' => :'selector',
85
- :'verification_records' => :'verificationRecords',
73
+ :'inbound' => :'inbound',
74
+ :'open_tracking' => :'openTracking',
75
+ :'click_tracking' => :'clickTracking',
86
76
  :'tracking_subdomain' => :'trackingSubdomain',
87
- :'tracking_status' => :'trackingStatus',
88
- :'tracking_failure_reason' => :'trackingFailureReason'
77
+ :'dns_records' => :'dnsRecords',
78
+ :'detail' => :'detail',
79
+ :'created_at' => :'createdAt'
89
80
  }
90
81
  end
91
82
 
@@ -102,20 +93,15 @@ module Pingram
102
93
  # Attribute type mapping.
103
94
  def self.openapi_types
104
95
  {
105
- :'waiting_for' => :'String',
106
- :'sender' => :'String',
96
+ :'domain' => :'String',
107
97
  :'status' => :'String',
108
- :'last_sync' => :'Time',
109
- :'verification_tokens' => :'Array<String>',
110
- :'mail_from_domain_status' => :'String',
111
- :'created_at' => :'String',
112
- :'private_dkim_key' => :'String',
113
- :'reminder_sent_at' => :'String',
114
- :'selector' => :'String',
115
- :'verification_records' => :'GetSendersResponseInnerVerificationRecords',
98
+ :'inbound' => :'Boolean',
99
+ :'open_tracking' => :'Boolean',
100
+ :'click_tracking' => :'Boolean',
116
101
  :'tracking_subdomain' => :'String',
117
- :'tracking_status' => :'String',
118
- :'tracking_failure_reason' => :'String'
102
+ :'dns_records' => :'Array<GetSendersResponseInnerDnsRecordsInner>',
103
+ :'detail' => :'String',
104
+ :'created_at' => :'String'
119
105
  }
120
106
  end
121
107
 
@@ -141,14 +127,10 @@ module Pingram
141
127
  h[k.to_sym] = v
142
128
  }
143
129
 
144
- if attributes.key?(:'waiting_for')
145
- self.waiting_for = attributes[:'waiting_for']
146
- end
147
-
148
- if attributes.key?(:'sender')
149
- self.sender = attributes[:'sender']
130
+ if attributes.key?(:'domain')
131
+ self.domain = attributes[:'domain']
150
132
  else
151
- self.sender = nil
133
+ self.domain = nil
152
134
  end
153
135
 
154
136
  if attributes.key?(:'status')
@@ -157,56 +139,46 @@ module Pingram
157
139
  self.status = nil
158
140
  end
159
141
 
160
- if attributes.key?(:'last_sync')
161
- self.last_sync = attributes[:'last_sync']
142
+ if attributes.key?(:'inbound')
143
+ self.inbound = attributes[:'inbound']
162
144
  else
163
- self.last_sync = nil
164
- end
165
-
166
- if attributes.key?(:'verification_tokens')
167
- if (value = attributes[:'verification_tokens']).is_a?(Array)
168
- self.verification_tokens = value
169
- end
170
- end
171
-
172
- if attributes.key?(:'mail_from_domain_status')
173
- self.mail_from_domain_status = attributes[:'mail_from_domain_status']
145
+ self.inbound = nil
174
146
  end
175
147
 
176
- if attributes.key?(:'created_at')
177
- self.created_at = attributes[:'created_at']
148
+ if attributes.key?(:'open_tracking')
149
+ self.open_tracking = attributes[:'open_tracking']
178
150
  else
179
- self.created_at = nil
180
- end
181
-
182
- if attributes.key?(:'private_dkim_key')
183
- self.private_dkim_key = attributes[:'private_dkim_key']
184
- end
185
-
186
- if attributes.key?(:'reminder_sent_at')
187
- self.reminder_sent_at = attributes[:'reminder_sent_at']
151
+ self.open_tracking = nil
188
152
  end
189
153
 
190
- if attributes.key?(:'selector')
191
- self.selector = attributes[:'selector']
154
+ if attributes.key?(:'click_tracking')
155
+ self.click_tracking = attributes[:'click_tracking']
192
156
  else
193
- self.selector = nil
194
- end
195
-
196
- if attributes.key?(:'verification_records')
197
- self.verification_records = attributes[:'verification_records']
157
+ self.click_tracking = nil
198
158
  end
199
159
 
200
160
  if attributes.key?(:'tracking_subdomain')
201
161
  self.tracking_subdomain = attributes[:'tracking_subdomain']
202
162
  end
203
163
 
204
- if attributes.key?(:'tracking_status')
205
- self.tracking_status = attributes[:'tracking_status']
164
+ if attributes.key?(:'dns_records')
165
+ if (value = attributes[:'dns_records']).is_a?(Array)
166
+ self.dns_records = value
167
+ end
168
+ else
169
+ self.dns_records = nil
206
170
  end
207
171
 
208
- if attributes.key?(:'tracking_failure_reason')
209
- self.tracking_failure_reason = attributes[:'tracking_failure_reason']
172
+ if attributes.key?(:'detail')
173
+ self.detail = attributes[:'detail']
174
+ else
175
+ self.detail = nil
176
+ end
177
+
178
+ if attributes.key?(:'created_at')
179
+ self.created_at = attributes[:'created_at']
180
+ else
181
+ self.created_at = nil
210
182
  end
211
183
  end
212
184
 
@@ -215,24 +187,36 @@ module Pingram
215
187
  def list_invalid_properties
216
188
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
217
189
  invalid_properties = Array.new
218
- if @sender.nil?
219
- invalid_properties.push('invalid value for "sender", sender cannot be nil.')
190
+ if @domain.nil?
191
+ invalid_properties.push('invalid value for "domain", domain cannot be nil.')
220
192
  end
221
193
 
222
194
  if @status.nil?
223
195
  invalid_properties.push('invalid value for "status", status cannot be nil.')
224
196
  end
225
197
 
226
- if @last_sync.nil?
227
- invalid_properties.push('invalid value for "last_sync", last_sync cannot be nil.')
198
+ if @inbound.nil?
199
+ invalid_properties.push('invalid value for "inbound", inbound cannot be nil.')
228
200
  end
229
201
 
230
- if @created_at.nil?
231
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
202
+ if @open_tracking.nil?
203
+ invalid_properties.push('invalid value for "open_tracking", open_tracking cannot be nil.')
204
+ end
205
+
206
+ if @click_tracking.nil?
207
+ invalid_properties.push('invalid value for "click_tracking", click_tracking cannot be nil.')
208
+ end
209
+
210
+ if @dns_records.nil?
211
+ invalid_properties.push('invalid value for "dns_records", dns_records cannot be nil.')
232
212
  end
233
213
 
234
- if @selector.nil?
235
- invalid_properties.push('invalid value for "selector", selector cannot be nil.')
214
+ if @detail.nil?
215
+ invalid_properties.push('invalid value for "detail", detail cannot be nil.')
216
+ end
217
+
218
+ if @created_at.nil?
219
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
236
220
  end
237
221
 
238
222
  invalid_properties
@@ -242,30 +226,27 @@ module Pingram
242
226
  # @return true if the model is valid
243
227
  def valid?
244
228
  warn '[DEPRECATED] the `valid?` method is obsolete'
245
- return false if @sender.nil?
229
+ return false if @domain.nil?
246
230
  return false if @status.nil?
247
231
  status_validator = EnumAttributeValidator.new('String', ["SUCCESS", "PENDING", "FAILED", "TEMPORARY_FAILURE", "NOT_STARTED"])
248
232
  return false unless status_validator.valid?(@status)
249
- return false if @last_sync.nil?
250
- mail_from_domain_status_validator = EnumAttributeValidator.new('String', ["PENDING", "SUCCESS", "FAILED", "TEMPORARY_FAILURE"])
251
- return false unless mail_from_domain_status_validator.valid?(@mail_from_domain_status)
233
+ return false if @inbound.nil?
234
+ return false if @open_tracking.nil?
235
+ return false if @click_tracking.nil?
236
+ return false if @dns_records.nil?
237
+ return false if @detail.nil?
252
238
  return false if @created_at.nil?
253
- return false if @selector.nil?
254
- tracking_status_validator = EnumAttributeValidator.new('String', ["NOT_STARTED", "PENDING", "ACTIVE", "FAILED"])
255
- return false unless tracking_status_validator.valid?(@tracking_status)
256
- tracking_failure_reason_validator = EnumAttributeValidator.new('String', ["cname_missing", "cname_proxied", "cname_conflict", "cert_failed", "probe_failed", "dkim_lost"])
257
- return false unless tracking_failure_reason_validator.valid?(@tracking_failure_reason)
258
239
  true
259
240
  end
260
241
 
261
242
  # Custom attribute writer method with validation
262
- # @param [Object] sender Value to be assigned
263
- def sender=(sender)
264
- if sender.nil?
265
- fail ArgumentError, 'sender cannot be nil'
243
+ # @param [Object] domain Value to be assigned
244
+ def domain=(domain)
245
+ if domain.nil?
246
+ fail ArgumentError, 'domain cannot be nil'
266
247
  end
267
248
 
268
- @sender = sender
249
+ @domain = domain
269
250
  end
270
251
 
271
252
  # Custom attribute writer method checking allowed values (enum).
@@ -279,63 +260,63 @@ module Pingram
279
260
  end
280
261
 
281
262
  # Custom attribute writer method with validation
282
- # @param [Object] last_sync Value to be assigned
283
- def last_sync=(last_sync)
284
- if last_sync.nil?
285
- fail ArgumentError, 'last_sync cannot be nil'
263
+ # @param [Object] inbound Value to be assigned
264
+ def inbound=(inbound)
265
+ if inbound.nil?
266
+ fail ArgumentError, 'inbound cannot be nil'
286
267
  end
287
268
 
288
- @last_sync = last_sync
269
+ @inbound = inbound
289
270
  end
290
271
 
291
- # Custom attribute writer method checking allowed values (enum).
292
- # @param [Object] mail_from_domain_status Object to be assigned
293
- def mail_from_domain_status=(mail_from_domain_status)
294
- validator = EnumAttributeValidator.new('String', ["PENDING", "SUCCESS", "FAILED", "TEMPORARY_FAILURE"])
295
- unless validator.valid?(mail_from_domain_status)
296
- fail ArgumentError, "invalid value for \"mail_from_domain_status\", must be one of #{validator.allowable_values}."
272
+ # Custom attribute writer method with validation
273
+ # @param [Object] open_tracking Value to be assigned
274
+ def open_tracking=(open_tracking)
275
+ if open_tracking.nil?
276
+ fail ArgumentError, 'open_tracking cannot be nil'
297
277
  end
298
- @mail_from_domain_status = mail_from_domain_status
278
+
279
+ @open_tracking = open_tracking
299
280
  end
300
281
 
301
282
  # Custom attribute writer method with validation
302
- # @param [Object] created_at Value to be assigned
303
- def created_at=(created_at)
304
- if created_at.nil?
305
- fail ArgumentError, 'created_at cannot be nil'
283
+ # @param [Object] click_tracking Value to be assigned
284
+ def click_tracking=(click_tracking)
285
+ if click_tracking.nil?
286
+ fail ArgumentError, 'click_tracking cannot be nil'
306
287
  end
307
288
 
308
- @created_at = created_at
289
+ @click_tracking = click_tracking
309
290
  end
310
291
 
311
292
  # Custom attribute writer method with validation
312
- # @param [Object] selector Value to be assigned
313
- def selector=(selector)
314
- if selector.nil?
315
- fail ArgumentError, 'selector cannot be nil'
293
+ # @param [Object] dns_records Value to be assigned
294
+ def dns_records=(dns_records)
295
+ if dns_records.nil?
296
+ fail ArgumentError, 'dns_records cannot be nil'
316
297
  end
317
298
 
318
- @selector = selector
299
+ @dns_records = dns_records
319
300
  end
320
301
 
321
- # Custom attribute writer method checking allowed values (enum).
322
- # @param [Object] tracking_status Object to be assigned
323
- def tracking_status=(tracking_status)
324
- validator = EnumAttributeValidator.new('String', ["NOT_STARTED", "PENDING", "ACTIVE", "FAILED"])
325
- unless validator.valid?(tracking_status)
326
- fail ArgumentError, "invalid value for \"tracking_status\", must be one of #{validator.allowable_values}."
302
+ # Custom attribute writer method with validation
303
+ # @param [Object] detail Value to be assigned
304
+ def detail=(detail)
305
+ if detail.nil?
306
+ fail ArgumentError, 'detail cannot be nil'
327
307
  end
328
- @tracking_status = tracking_status
308
+
309
+ @detail = detail
329
310
  end
330
311
 
331
- # Custom attribute writer method checking allowed values (enum).
332
- # @param [Object] tracking_failure_reason Object to be assigned
333
- def tracking_failure_reason=(tracking_failure_reason)
334
- validator = EnumAttributeValidator.new('String', ["cname_missing", "cname_proxied", "cname_conflict", "cert_failed", "probe_failed", "dkim_lost"])
335
- unless validator.valid?(tracking_failure_reason)
336
- fail ArgumentError, "invalid value for \"tracking_failure_reason\", must be one of #{validator.allowable_values}."
312
+ # Custom attribute writer method with validation
313
+ # @param [Object] created_at Value to be assigned
314
+ def created_at=(created_at)
315
+ if created_at.nil?
316
+ fail ArgumentError, 'created_at cannot be nil'
337
317
  end
338
- @tracking_failure_reason = tracking_failure_reason
318
+
319
+ @created_at = created_at
339
320
  end
340
321
 
341
322
  # Checks equality by comparing each attribute.
@@ -343,20 +324,15 @@ module Pingram
343
324
  def ==(o)
344
325
  return true if self.equal?(o)
345
326
  self.class == o.class &&
346
- waiting_for == o.waiting_for &&
347
- sender == o.sender &&
327
+ domain == o.domain &&
348
328
  status == o.status &&
349
- last_sync == o.last_sync &&
350
- verification_tokens == o.verification_tokens &&
351
- mail_from_domain_status == o.mail_from_domain_status &&
352
- created_at == o.created_at &&
353
- private_dkim_key == o.private_dkim_key &&
354
- reminder_sent_at == o.reminder_sent_at &&
355
- selector == o.selector &&
356
- verification_records == o.verification_records &&
329
+ inbound == o.inbound &&
330
+ open_tracking == o.open_tracking &&
331
+ click_tracking == o.click_tracking &&
357
332
  tracking_subdomain == o.tracking_subdomain &&
358
- tracking_status == o.tracking_status &&
359
- tracking_failure_reason == o.tracking_failure_reason
333
+ dns_records == o.dns_records &&
334
+ detail == o.detail &&
335
+ created_at == o.created_at
360
336
  end
361
337
 
362
338
  # @see the `==` method
@@ -368,7 +344,7 @@ module Pingram
368
344
  # Calculates hash code according to all attributes.
369
345
  # @return [Integer] Hash code
370
346
  def hash
371
- [waiting_for, sender, status, last_sync, verification_tokens, mail_from_domain_status, created_at, private_dkim_key, reminder_sent_at, selector, verification_records, tracking_subdomain, tracking_status, tracking_failure_reason].hash
347
+ [domain, status, inbound, open_tracking, click_tracking, tracking_subdomain, dns_records, detail, created_at].hash
372
348
  end
373
349
 
374
350
  # Builds the object from hash