ElasticEmail 4.0.24 → 4.0.25

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.
Files changed (242) hide show
  1. checksums.yaml +4 -4
  2. data/ElasticEmail.gemspec +1 -1
  3. data/README.md +23 -5
  4. data/VERSION +1 -1
  5. data/docs/CampaignsApi.md +71 -0
  6. data/docs/CertificateValidationStatus.md +15 -0
  7. data/docs/DomainData.md +54 -0
  8. data/docs/DomainDetail.md +52 -0
  9. data/docs/DomainOwner.md +15 -0
  10. data/docs/DomainPayload.md +20 -0
  11. data/docs/DomainUpdatePayload.md +24 -0
  12. data/docs/DomainsApi.md +583 -0
  13. data/docs/EmailStatus.md +3 -1
  14. data/docs/EmailsApi.md +1 -1
  15. data/docs/MessageCategoryEnum.md +15 -0
  16. data/docs/TrackingType.md +15 -0
  17. data/docs/TrackingValidationStatus.md +15 -0
  18. data/lib/ElasticEmail/api/campaigns_api.rb +62 -1
  19. data/lib/ElasticEmail/api/contacts_api.rb +1 -1
  20. data/lib/ElasticEmail/api/domains_api.rb +545 -0
  21. data/lib/ElasticEmail/api/emails_api.rb +3 -3
  22. data/lib/ElasticEmail/api/events_api.rb +1 -1
  23. data/lib/ElasticEmail/api/files_api.rb +1 -1
  24. data/lib/ElasticEmail/api/inbound_route_api.rb +1 -1
  25. data/lib/ElasticEmail/api/lists_api.rb +1 -1
  26. data/lib/ElasticEmail/api/security_api.rb +1 -1
  27. data/lib/ElasticEmail/api/segments_api.rb +1 -1
  28. data/lib/ElasticEmail/api/statistics_api.rb +1 -1
  29. data/lib/ElasticEmail/api/sub_accounts_api.rb +1 -1
  30. data/lib/ElasticEmail/api/suppressions_api.rb +1 -1
  31. data/lib/ElasticEmail/api/templates_api.rb +1 -1
  32. data/lib/ElasticEmail/api/verifications_api.rb +1 -1
  33. data/lib/ElasticEmail/api_client.rb +3 -3
  34. data/lib/ElasticEmail/api_error.rb +1 -1
  35. data/lib/ElasticEmail/configuration.rb +1 -11
  36. data/lib/ElasticEmail/models/access_level.rb +3 -2
  37. data/lib/ElasticEmail/models/account_status_enum.rb +1 -1
  38. data/lib/ElasticEmail/models/api_key.rb +1 -1
  39. data/lib/ElasticEmail/models/api_key_payload.rb +1 -1
  40. data/lib/ElasticEmail/models/body_content_type.rb +1 -1
  41. data/lib/ElasticEmail/models/body_part.rb +1 -1
  42. data/lib/ElasticEmail/models/campaign.rb +1 -1
  43. data/lib/ElasticEmail/models/campaign_options.rb +1 -1
  44. data/lib/ElasticEmail/models/campaign_recipient.rb +1 -1
  45. data/lib/ElasticEmail/models/campaign_status.rb +1 -1
  46. data/lib/ElasticEmail/models/campaign_template.rb +1 -1
  47. data/lib/ElasticEmail/models/certificate_validation_status.rb +42 -0
  48. data/lib/ElasticEmail/models/channel_log_status_summary.rb +1 -1
  49. data/lib/ElasticEmail/models/compression_format.rb +1 -1
  50. data/lib/ElasticEmail/models/consent_data.rb +1 -1
  51. data/lib/ElasticEmail/models/consent_tracking.rb +1 -1
  52. data/lib/ElasticEmail/models/contact.rb +1 -1
  53. data/lib/ElasticEmail/models/contact_activity.rb +1 -1
  54. data/lib/ElasticEmail/models/contact_payload.rb +1 -1
  55. data/lib/ElasticEmail/models/contact_source.rb +1 -1
  56. data/lib/ElasticEmail/models/contact_status.rb +1 -1
  57. data/lib/ElasticEmail/models/contact_update_payload.rb +1 -1
  58. data/lib/ElasticEmail/models/contacts_list.rb +1 -1
  59. data/lib/ElasticEmail/models/delivery_optimization_type.rb +1 -1
  60. data/lib/ElasticEmail/models/domain_data.rb +417 -0
  61. data/lib/ElasticEmail/models/domain_detail.rb +407 -0
  62. data/lib/ElasticEmail/models/domain_owner.rb +40 -0
  63. data/lib/ElasticEmail/models/domain_payload.rb +224 -0
  64. data/lib/ElasticEmail/models/domain_update_payload.rb +265 -0
  65. data/lib/ElasticEmail/models/email_content.rb +1 -1
  66. data/lib/ElasticEmail/models/email_data.rb +1 -1
  67. data/lib/ElasticEmail/models/email_job_failed_status.rb +1 -1
  68. data/lib/ElasticEmail/models/email_job_status.rb +1 -1
  69. data/lib/ElasticEmail/models/email_message_data.rb +1 -1
  70. data/lib/ElasticEmail/models/email_predicted_validation_status.rb +1 -1
  71. data/lib/ElasticEmail/models/email_recipient.rb +1 -1
  72. data/lib/ElasticEmail/models/email_send.rb +1 -1
  73. data/lib/ElasticEmail/models/email_status.rb +16 -5
  74. data/lib/ElasticEmail/models/email_transactional_message_data.rb +1 -1
  75. data/lib/ElasticEmail/models/email_validation_result.rb +1 -1
  76. data/lib/ElasticEmail/models/email_validation_status.rb +1 -1
  77. data/lib/ElasticEmail/models/email_view.rb +1 -1
  78. data/lib/ElasticEmail/models/emails_payload.rb +1 -1
  79. data/lib/ElasticEmail/models/encoding_type.rb +1 -1
  80. data/lib/ElasticEmail/models/event_type.rb +1 -1
  81. data/lib/ElasticEmail/models/events_order_by.rb +1 -1
  82. data/lib/ElasticEmail/models/export_file_formats.rb +1 -1
  83. data/lib/ElasticEmail/models/export_link.rb +1 -1
  84. data/lib/ElasticEmail/models/export_status.rb +1 -1
  85. data/lib/ElasticEmail/models/file_info.rb +1 -1
  86. data/lib/ElasticEmail/models/file_payload.rb +1 -1
  87. data/lib/ElasticEmail/models/file_upload_result.rb +1 -1
  88. data/lib/ElasticEmail/models/inbound_payload.rb +1 -1
  89. data/lib/ElasticEmail/models/inbound_route.rb +1 -1
  90. data/lib/ElasticEmail/models/inbound_route_action_type.rb +1 -1
  91. data/lib/ElasticEmail/models/inbound_route_filter_type.rb +1 -1
  92. data/lib/ElasticEmail/models/list_payload.rb +1 -1
  93. data/lib/ElasticEmail/models/list_update_payload.rb +1 -1
  94. data/lib/ElasticEmail/models/log_job_status.rb +1 -1
  95. data/lib/ElasticEmail/models/log_status_summary.rb +1 -1
  96. data/lib/ElasticEmail/models/merge_email_payload.rb +1 -1
  97. data/lib/ElasticEmail/models/message_attachment.rb +1 -1
  98. data/lib/ElasticEmail/models/message_category.rb +1 -1
  99. data/lib/ElasticEmail/models/message_category_enum.rb +55 -0
  100. data/lib/ElasticEmail/models/new_api_key.rb +1 -1
  101. data/lib/ElasticEmail/models/new_smtp_credentials.rb +1 -1
  102. data/lib/ElasticEmail/models/options.rb +1 -1
  103. data/lib/ElasticEmail/models/recipient_event.rb +1 -1
  104. data/lib/ElasticEmail/models/segment.rb +1 -1
  105. data/lib/ElasticEmail/models/segment_payload.rb +1 -1
  106. data/lib/ElasticEmail/models/smtp_credentials.rb +1 -1
  107. data/lib/ElasticEmail/models/smtp_credentials_payload.rb +1 -1
  108. data/lib/ElasticEmail/models/sort_order_item.rb +1 -1
  109. data/lib/ElasticEmail/models/split_optimization_type.rb +1 -1
  110. data/lib/ElasticEmail/models/split_options.rb +1 -1
  111. data/lib/ElasticEmail/models/sub_account_info.rb +1 -1
  112. data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +1 -1
  113. data/lib/ElasticEmail/models/subaccount_email_settings.rb +1 -1
  114. data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +1 -1
  115. data/lib/ElasticEmail/models/subaccount_payload.rb +1 -1
  116. data/lib/ElasticEmail/models/subaccount_settings_info.rb +1 -1
  117. data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +1 -1
  118. data/lib/ElasticEmail/models/suppression.rb +1 -1
  119. data/lib/ElasticEmail/models/template.rb +1 -1
  120. data/lib/ElasticEmail/models/template_payload.rb +1 -1
  121. data/lib/ElasticEmail/models/template_scope.rb +1 -1
  122. data/lib/ElasticEmail/models/template_type.rb +3 -2
  123. data/lib/ElasticEmail/models/tracking_type.rb +44 -0
  124. data/lib/ElasticEmail/models/tracking_validation_status.rb +42 -0
  125. data/lib/ElasticEmail/models/transactional_recipient.rb +1 -1
  126. data/lib/ElasticEmail/models/utm.rb +1 -1
  127. data/lib/ElasticEmail/models/verification_file_result.rb +1 -1
  128. data/lib/ElasticEmail/models/verification_file_result_details.rb +1 -1
  129. data/lib/ElasticEmail/models/verification_status.rb +1 -1
  130. data/lib/ElasticEmail/version.rb +2 -2
  131. data/lib/ElasticEmail.rb +11 -1
  132. data/spec/api/campaigns_api_spec.rb +13 -1
  133. data/spec/api/contacts_api_spec.rb +1 -1
  134. data/spec/api/domains_api_spec.rb +132 -0
  135. data/spec/api/emails_api_spec.rb +2 -2
  136. data/spec/api/events_api_spec.rb +1 -1
  137. data/spec/api/files_api_spec.rb +1 -1
  138. data/spec/api/inbound_route_api_spec.rb +1 -1
  139. data/spec/api/lists_api_spec.rb +1 -1
  140. data/spec/api/security_api_spec.rb +1 -1
  141. data/spec/api/segments_api_spec.rb +1 -1
  142. data/spec/api/statistics_api_spec.rb +1 -1
  143. data/spec/api/sub_accounts_api_spec.rb +1 -1
  144. data/spec/api/suppressions_api_spec.rb +1 -1
  145. data/spec/api/templates_api_spec.rb +1 -1
  146. data/spec/api/verifications_api_spec.rb +1 -1
  147. data/spec/models/access_level_spec.rb +1 -1
  148. data/spec/models/account_status_enum_spec.rb +1 -1
  149. data/spec/models/api_key_payload_spec.rb +1 -1
  150. data/spec/models/api_key_spec.rb +1 -1
  151. data/spec/models/body_content_type_spec.rb +1 -1
  152. data/spec/models/body_part_spec.rb +1 -1
  153. data/spec/models/campaign_options_spec.rb +1 -1
  154. data/spec/models/campaign_recipient_spec.rb +1 -1
  155. data/spec/models/campaign_spec.rb +1 -1
  156. data/spec/models/campaign_status_spec.rb +1 -1
  157. data/spec/models/campaign_template_spec.rb +1 -1
  158. data/spec/models/certificate_validation_status_spec.rb +30 -0
  159. data/spec/models/channel_log_status_summary_spec.rb +1 -1
  160. data/spec/models/compression_format_spec.rb +1 -1
  161. data/spec/models/consent_data_spec.rb +1 -1
  162. data/spec/models/consent_tracking_spec.rb +1 -1
  163. data/spec/models/contact_activity_spec.rb +1 -1
  164. data/spec/models/contact_payload_spec.rb +1 -1
  165. data/spec/models/contact_source_spec.rb +1 -1
  166. data/spec/models/contact_spec.rb +1 -1
  167. data/spec/models/contact_status_spec.rb +1 -1
  168. data/spec/models/contact_update_payload_spec.rb +1 -1
  169. data/spec/models/contacts_list_spec.rb +1 -1
  170. data/spec/models/delivery_optimization_type_spec.rb +1 -1
  171. data/spec/models/domain_data_spec.rb +144 -0
  172. data/spec/models/domain_detail_spec.rb +138 -0
  173. data/spec/models/domain_owner_spec.rb +30 -0
  174. data/spec/models/domain_payload_spec.rb +42 -0
  175. data/spec/models/domain_update_payload_spec.rb +54 -0
  176. data/spec/models/email_content_spec.rb +1 -1
  177. data/spec/models/email_data_spec.rb +1 -1
  178. data/spec/models/email_job_failed_status_spec.rb +1 -1
  179. data/spec/models/email_job_status_spec.rb +1 -1
  180. data/spec/models/email_message_data_spec.rb +1 -1
  181. data/spec/models/email_predicted_validation_status_spec.rb +1 -1
  182. data/spec/models/email_recipient_spec.rb +1 -1
  183. data/spec/models/email_send_spec.rb +1 -1
  184. data/spec/models/email_status_spec.rb +7 -1
  185. data/spec/models/email_transactional_message_data_spec.rb +1 -1
  186. data/spec/models/email_validation_result_spec.rb +1 -1
  187. data/spec/models/email_validation_status_spec.rb +1 -1
  188. data/spec/models/email_view_spec.rb +1 -1
  189. data/spec/models/emails_payload_spec.rb +1 -1
  190. data/spec/models/encoding_type_spec.rb +1 -1
  191. data/spec/models/event_type_spec.rb +1 -1
  192. data/spec/models/events_order_by_spec.rb +1 -1
  193. data/spec/models/export_file_formats_spec.rb +1 -1
  194. data/spec/models/export_link_spec.rb +1 -1
  195. data/spec/models/export_status_spec.rb +1 -1
  196. data/spec/models/file_info_spec.rb +1 -1
  197. data/spec/models/file_payload_spec.rb +1 -1
  198. data/spec/models/file_upload_result_spec.rb +1 -1
  199. data/spec/models/inbound_payload_spec.rb +1 -1
  200. data/spec/models/inbound_route_action_type_spec.rb +1 -1
  201. data/spec/models/inbound_route_filter_type_spec.rb +1 -1
  202. data/spec/models/inbound_route_spec.rb +1 -1
  203. data/spec/models/list_payload_spec.rb +1 -1
  204. data/spec/models/list_update_payload_spec.rb +1 -1
  205. data/spec/models/log_job_status_spec.rb +1 -1
  206. data/spec/models/log_status_summary_spec.rb +1 -1
  207. data/spec/models/merge_email_payload_spec.rb +1 -1
  208. data/spec/models/message_attachment_spec.rb +1 -1
  209. data/spec/models/message_category_enum_spec.rb +30 -0
  210. data/spec/models/message_category_spec.rb +1 -1
  211. data/spec/models/new_api_key_spec.rb +1 -1
  212. data/spec/models/new_smtp_credentials_spec.rb +1 -1
  213. data/spec/models/options_spec.rb +1 -1
  214. data/spec/models/recipient_event_spec.rb +1 -1
  215. data/spec/models/segment_payload_spec.rb +1 -1
  216. data/spec/models/segment_spec.rb +1 -1
  217. data/spec/models/smtp_credentials_payload_spec.rb +1 -1
  218. data/spec/models/smtp_credentials_spec.rb +1 -1
  219. data/spec/models/sort_order_item_spec.rb +1 -1
  220. data/spec/models/split_optimization_type_spec.rb +1 -1
  221. data/spec/models/split_options_spec.rb +1 -1
  222. data/spec/models/sub_account_info_spec.rb +1 -1
  223. data/spec/models/subaccount_email_credits_payload_spec.rb +1 -1
  224. data/spec/models/subaccount_email_settings_payload_spec.rb +1 -1
  225. data/spec/models/subaccount_email_settings_spec.rb +1 -1
  226. data/spec/models/subaccount_payload_spec.rb +1 -1
  227. data/spec/models/subaccount_settings_info_payload_spec.rb +1 -1
  228. data/spec/models/subaccount_settings_info_spec.rb +1 -1
  229. data/spec/models/suppression_spec.rb +1 -1
  230. data/spec/models/template_payload_spec.rb +1 -1
  231. data/spec/models/template_scope_spec.rb +1 -1
  232. data/spec/models/template_spec.rb +1 -1
  233. data/spec/models/template_type_spec.rb +1 -1
  234. data/spec/models/tracking_type_spec.rb +30 -0
  235. data/spec/models/tracking_validation_status_spec.rb +30 -0
  236. data/spec/models/transactional_recipient_spec.rb +1 -1
  237. data/spec/models/utm_spec.rb +1 -1
  238. data/spec/models/verification_file_result_details_spec.rb +1 -1
  239. data/spec/models/verification_file_result_spec.rb +1 -1
  240. data/spec/models/verification_status_spec.rb +1 -1
  241. data/spec/spec_helper.rb +1 -1
  242. metadata +120 -80
@@ -0,0 +1,407 @@
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.5.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ElasticEmail
17
+ # Domain data, with information about domain records.
18
+ class DomainDetail
19
+ # Name of selected domain.
20
+ attr_accessor :domain
21
+
22
+ # True, if domain is used as default. Otherwise, false,
23
+ attr_accessor :default_domain
24
+
25
+ # True, if SPF record is verified
26
+ attr_accessor :spf
27
+
28
+ # True, if DKIM record is verified
29
+ attr_accessor :dkim
30
+
31
+ # True, if MX record is verified
32
+ attr_accessor :mx
33
+
34
+ attr_accessor :dmarc
35
+
36
+ # True, if tracking CNAME record is verified
37
+ attr_accessor :is_rewrite_domain_valid
38
+
39
+ # True, if DKIM, SPF, or tracking are still to be verified
40
+ attr_accessor :verify
41
+
42
+ attr_accessor :type
43
+
44
+ attr_accessor :tracking_status
45
+
46
+ attr_accessor :certificate_status
47
+
48
+ attr_accessor :certificate_validation_error
49
+
50
+ attr_accessor :tracking_type_user_request
51
+
52
+ attr_accessor :verp
53
+
54
+ attr_accessor :custom_bounces_domain
55
+
56
+ attr_accessor :is_custom_bounces_domain_default
57
+
58
+ attr_accessor :is_marked_for_deletion
59
+
60
+ attr_accessor :ownership
61
+
62
+ class EnumAttributeValidator
63
+ attr_reader :datatype
64
+ attr_reader :allowable_values
65
+
66
+ def initialize(datatype, allowable_values)
67
+ @allowable_values = allowable_values.map do |value|
68
+ case datatype.to_s
69
+ when /Integer/i
70
+ value.to_i
71
+ when /Float/i
72
+ value.to_f
73
+ else
74
+ value
75
+ end
76
+ end
77
+ end
78
+
79
+ def valid?(value)
80
+ !value || allowable_values.include?(value)
81
+ end
82
+ end
83
+
84
+ # Attribute mapping from ruby-style variable name to JSON key.
85
+ def self.attribute_map
86
+ {
87
+ :'domain' => :'Domain',
88
+ :'default_domain' => :'DefaultDomain',
89
+ :'spf' => :'Spf',
90
+ :'dkim' => :'Dkim',
91
+ :'mx' => :'MX',
92
+ :'dmarc' => :'DMARC',
93
+ :'is_rewrite_domain_valid' => :'IsRewriteDomainValid',
94
+ :'verify' => :'Verify',
95
+ :'type' => :'Type',
96
+ :'tracking_status' => :'TrackingStatus',
97
+ :'certificate_status' => :'CertificateStatus',
98
+ :'certificate_validation_error' => :'CertificateValidationError',
99
+ :'tracking_type_user_request' => :'TrackingTypeUserRequest',
100
+ :'verp' => :'VERP',
101
+ :'custom_bounces_domain' => :'CustomBouncesDomain',
102
+ :'is_custom_bounces_domain_default' => :'IsCustomBouncesDomainDefault',
103
+ :'is_marked_for_deletion' => :'IsMarkedForDeletion',
104
+ :'ownership' => :'Ownership'
105
+ }
106
+ end
107
+
108
+ # Returns all the JSON keys this model knows about
109
+ def self.acceptable_attributes
110
+ attribute_map.values
111
+ end
112
+
113
+ # Attribute type mapping.
114
+ def self.openapi_types
115
+ {
116
+ :'domain' => :'String',
117
+ :'default_domain' => :'Boolean',
118
+ :'spf' => :'Boolean',
119
+ :'dkim' => :'Boolean',
120
+ :'mx' => :'Boolean',
121
+ :'dmarc' => :'Boolean',
122
+ :'is_rewrite_domain_valid' => :'Boolean',
123
+ :'verify' => :'Boolean',
124
+ :'type' => :'TrackingType',
125
+ :'tracking_status' => :'TrackingValidationStatus',
126
+ :'certificate_status' => :'CertificateValidationStatus',
127
+ :'certificate_validation_error' => :'String',
128
+ :'tracking_type_user_request' => :'TrackingType',
129
+ :'verp' => :'Boolean',
130
+ :'custom_bounces_domain' => :'String',
131
+ :'is_custom_bounces_domain_default' => :'Boolean',
132
+ :'is_marked_for_deletion' => :'Boolean',
133
+ :'ownership' => :'DomainOwner'
134
+ }
135
+ end
136
+
137
+ # List of attributes with nullable: true
138
+ def self.openapi_nullable
139
+ Set.new([
140
+ ])
141
+ end
142
+
143
+ # Initializes the object
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ def initialize(attributes = {})
146
+ if (!attributes.is_a?(Hash))
147
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ElasticEmail::DomainDetail` initialize method"
148
+ end
149
+
150
+ # check to see if the attribute exists and convert string to symbol for hash key
151
+ attributes = attributes.each_with_object({}) { |(k, v), h|
152
+ if (!self.class.attribute_map.key?(k.to_sym))
153
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::DomainDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
154
+ end
155
+ h[k.to_sym] = v
156
+ }
157
+
158
+ if attributes.key?(:'domain')
159
+ self.domain = attributes[:'domain']
160
+ end
161
+
162
+ if attributes.key?(:'default_domain')
163
+ self.default_domain = attributes[:'default_domain']
164
+ end
165
+
166
+ if attributes.key?(:'spf')
167
+ self.spf = attributes[:'spf']
168
+ end
169
+
170
+ if attributes.key?(:'dkim')
171
+ self.dkim = attributes[:'dkim']
172
+ end
173
+
174
+ if attributes.key?(:'mx')
175
+ self.mx = attributes[:'mx']
176
+ end
177
+
178
+ if attributes.key?(:'dmarc')
179
+ self.dmarc = attributes[:'dmarc']
180
+ end
181
+
182
+ if attributes.key?(:'is_rewrite_domain_valid')
183
+ self.is_rewrite_domain_valid = attributes[:'is_rewrite_domain_valid']
184
+ end
185
+
186
+ if attributes.key?(:'verify')
187
+ self.verify = attributes[:'verify']
188
+ end
189
+
190
+ if attributes.key?(:'type')
191
+ self.type = attributes[:'type']
192
+ else
193
+ self.type = 'None'
194
+ end
195
+
196
+ if attributes.key?(:'tracking_status')
197
+ self.tracking_status = attributes[:'tracking_status']
198
+ else
199
+ self.tracking_status = 'Validated'
200
+ end
201
+
202
+ if attributes.key?(:'certificate_status')
203
+ self.certificate_status = attributes[:'certificate_status']
204
+ else
205
+ self.certificate_status = 'ErrorOccured'
206
+ end
207
+
208
+ if attributes.key?(:'certificate_validation_error')
209
+ self.certificate_validation_error = attributes[:'certificate_validation_error']
210
+ end
211
+
212
+ if attributes.key?(:'tracking_type_user_request')
213
+ self.tracking_type_user_request = attributes[:'tracking_type_user_request']
214
+ else
215
+ self.tracking_type_user_request = 'None'
216
+ end
217
+
218
+ if attributes.key?(:'verp')
219
+ self.verp = attributes[:'verp']
220
+ end
221
+
222
+ if attributes.key?(:'custom_bounces_domain')
223
+ self.custom_bounces_domain = attributes[:'custom_bounces_domain']
224
+ end
225
+
226
+ if attributes.key?(:'is_custom_bounces_domain_default')
227
+ self.is_custom_bounces_domain_default = attributes[:'is_custom_bounces_domain_default']
228
+ end
229
+
230
+ if attributes.key?(:'is_marked_for_deletion')
231
+ self.is_marked_for_deletion = attributes[:'is_marked_for_deletion']
232
+ end
233
+
234
+ if attributes.key?(:'ownership')
235
+ self.ownership = attributes[:'ownership']
236
+ else
237
+ self.ownership = 'Current'
238
+ end
239
+ end
240
+
241
+ # Show invalid properties with the reasons. Usually used together with valid?
242
+ # @return Array for valid properties with the reasons
243
+ def list_invalid_properties
244
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
245
+ invalid_properties = Array.new
246
+ invalid_properties
247
+ end
248
+
249
+ # Check to see if the all the properties in the model are valid
250
+ # @return true if the model is valid
251
+ def valid?
252
+ warn '[DEPRECATED] the `valid?` method is obsolete'
253
+ true
254
+ end
255
+
256
+ # Checks equality by comparing each attribute.
257
+ # @param [Object] Object to be compared
258
+ def ==(o)
259
+ return true if self.equal?(o)
260
+ self.class == o.class &&
261
+ domain == o.domain &&
262
+ default_domain == o.default_domain &&
263
+ spf == o.spf &&
264
+ dkim == o.dkim &&
265
+ mx == o.mx &&
266
+ dmarc == o.dmarc &&
267
+ is_rewrite_domain_valid == o.is_rewrite_domain_valid &&
268
+ verify == o.verify &&
269
+ type == o.type &&
270
+ tracking_status == o.tracking_status &&
271
+ certificate_status == o.certificate_status &&
272
+ certificate_validation_error == o.certificate_validation_error &&
273
+ tracking_type_user_request == o.tracking_type_user_request &&
274
+ verp == o.verp &&
275
+ custom_bounces_domain == o.custom_bounces_domain &&
276
+ is_custom_bounces_domain_default == o.is_custom_bounces_domain_default &&
277
+ is_marked_for_deletion == o.is_marked_for_deletion &&
278
+ ownership == o.ownership
279
+ end
280
+
281
+ # @see the `==` method
282
+ # @param [Object] Object to be compared
283
+ def eql?(o)
284
+ self == o
285
+ end
286
+
287
+ # Calculates hash code according to all attributes.
288
+ # @return [Integer] Hash code
289
+ 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
291
+ end
292
+
293
+ # Builds the object from hash
294
+ # @param [Hash] attributes Model attributes in the form of hash
295
+ # @return [Object] Returns the model itself
296
+ def self.build_from_hash(attributes)
297
+ return nil unless attributes.is_a?(Hash)
298
+ attributes = attributes.transform_keys(&:to_sym)
299
+ transformed_hash = {}
300
+ openapi_types.each_pair do |key, type|
301
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
302
+ transformed_hash["#{key}"] = nil
303
+ elsif type =~ /\AArray<(.*)>/i
304
+ # check to ensure the input is an array given that the attribute
305
+ # is documented as an array but the input is not
306
+ if attributes[attribute_map[key]].is_a?(Array)
307
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
308
+ end
309
+ elsif !attributes[attribute_map[key]].nil?
310
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
311
+ end
312
+ end
313
+ new(transformed_hash)
314
+ end
315
+
316
+ # Deserializes the data based on type
317
+ # @param string type Data type
318
+ # @param string value Value to be deserialized
319
+ # @return [Object] Deserialized data
320
+ def self._deserialize(type, value)
321
+ case type.to_sym
322
+ when :Time
323
+ Time.parse(value)
324
+ when :Date
325
+ Date.parse(value)
326
+ when :String
327
+ value.to_s
328
+ when :Integer
329
+ value.to_i
330
+ when :Float
331
+ value.to_f
332
+ when :Boolean
333
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
334
+ true
335
+ else
336
+ false
337
+ end
338
+ when :Object
339
+ # generic object (usually a Hash), return directly
340
+ value
341
+ when /\AArray<(?<inner_type>.+)>\z/
342
+ inner_type = Regexp.last_match[:inner_type]
343
+ value.map { |v| _deserialize(inner_type, v) }
344
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
345
+ k_type = Regexp.last_match[:k_type]
346
+ v_type = Regexp.last_match[:v_type]
347
+ {}.tap do |hash|
348
+ value.each do |k, v|
349
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
350
+ end
351
+ end
352
+ else # model
353
+ # models (e.g. Pet) or oneOf
354
+ klass = ElasticEmail.const_get(type)
355
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
356
+ end
357
+ end
358
+
359
+ # Returns the string representation of the object
360
+ # @return [String] String presentation of the object
361
+ def to_s
362
+ to_hash.to_s
363
+ end
364
+
365
+ # to_body is an alias to to_hash (backward compatibility)
366
+ # @return [Hash] Returns the object in the form of hash
367
+ def to_body
368
+ to_hash
369
+ end
370
+
371
+ # Returns the object in the form of hash
372
+ # @return [Hash] Returns the object in the form of hash
373
+ def to_hash
374
+ hash = {}
375
+ self.class.attribute_map.each_pair do |attr, param|
376
+ value = self.send(attr)
377
+ if value.nil?
378
+ is_nullable = self.class.openapi_nullable.include?(attr)
379
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
380
+ end
381
+
382
+ hash[param] = _to_hash(value)
383
+ end
384
+ hash
385
+ end
386
+
387
+ # Outputs non-array value in the form of hash
388
+ # For object, use to_hash. Otherwise, just return the value
389
+ # @param [Object] value Any valid value
390
+ # @return [Hash] Returns the value in the form of hash
391
+ def _to_hash(value)
392
+ if value.is_a?(Array)
393
+ value.compact.map { |v| _to_hash(v) }
394
+ elsif value.is_a?(Hash)
395
+ {}.tap do |hash|
396
+ value.each { |k, v| hash[k] = _to_hash(v) }
397
+ end
398
+ elsif value.respond_to? :to_hash
399
+ value.to_hash
400
+ else
401
+ value
402
+ end
403
+ end
404
+
405
+ end
406
+
407
+ end
@@ -0,0 +1,40 @@
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.5.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ElasticEmail
17
+ class DomainOwner
18
+ CURRENT = "Current".freeze
19
+ PARENT = "Parent".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [CURRENT, PARENT].freeze
23
+ end
24
+
25
+ # Builds the enum from string
26
+ # @param [String] The enum value in the form of the string
27
+ # @return [String] The enum value
28
+ def self.build_from_hash(value)
29
+ new.build_from_hash(value)
30
+ end
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ return value if DomainOwner.all_vars.include?(value)
37
+ raise "Invalid ENUM value #{value} for class #DomainOwner"
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,224 @@
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.5.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ElasticEmail
17
+ class DomainPayload
18
+ # Name of selected domain.
19
+ attr_accessor :domain
20
+
21
+ attr_accessor :set_as_default
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'domain' => :'Domain',
27
+ :'set_as_default' => :'SetAsDefault'
28
+ }
29
+ end
30
+
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'domain' => :'String',
40
+ :'set_as_default' => :'Boolean'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ElasticEmail::DomainPayload` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::DomainPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'domain')
66
+ self.domain = attributes[:'domain']
67
+ end
68
+
69
+ if attributes.key?(:'set_as_default')
70
+ self.set_as_default = attributes[:'set_as_default']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ warn '[DEPRECATED] the `valid?` method is obsolete'
86
+ true
87
+ end
88
+
89
+ # Checks equality by comparing each attribute.
90
+ # @param [Object] Object to be compared
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ domain == o.domain &&
95
+ set_as_default == o.set_as_default
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Integer] Hash code
106
+ def hash
107
+ [domain, set_as_default].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def self.build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+ attributes = attributes.transform_keys(&:to_sym)
116
+ transformed_hash = {}
117
+ openapi_types.each_pair do |key, type|
118
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
119
+ transformed_hash["#{key}"] = nil
120
+ elsif type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[attribute_map[key]].is_a?(Array)
124
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
125
+ end
126
+ elsif !attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
128
+ end
129
+ end
130
+ new(transformed_hash)
131
+ end
132
+
133
+ # Deserializes the data based on type
134
+ # @param string type Data type
135
+ # @param string value Value to be deserialized
136
+ # @return [Object] Deserialized data
137
+ def self._deserialize(type, value)
138
+ case type.to_sym
139
+ when :Time
140
+ Time.parse(value)
141
+ when :Date
142
+ Date.parse(value)
143
+ when :String
144
+ value.to_s
145
+ when :Integer
146
+ value.to_i
147
+ when :Float
148
+ value.to_f
149
+ when :Boolean
150
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
151
+ true
152
+ else
153
+ false
154
+ end
155
+ when :Object
156
+ # generic object (usually a Hash), return directly
157
+ value
158
+ when /\AArray<(?<inner_type>.+)>\z/
159
+ inner_type = Regexp.last_match[:inner_type]
160
+ value.map { |v| _deserialize(inner_type, v) }
161
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
162
+ k_type = Regexp.last_match[:k_type]
163
+ v_type = Regexp.last_match[:v_type]
164
+ {}.tap do |hash|
165
+ value.each do |k, v|
166
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
167
+ end
168
+ end
169
+ else # model
170
+ # models (e.g. Pet) or oneOf
171
+ klass = ElasticEmail.const_get(type)
172
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ if value.nil?
195
+ is_nullable = self.class.openapi_nullable.include?(attr)
196
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
197
+ end
198
+
199
+ hash[param] = _to_hash(value)
200
+ end
201
+ hash
202
+ end
203
+
204
+ # Outputs non-array value in the form of hash
205
+ # For object, use to_hash. Otherwise, just return the value
206
+ # @param [Object] value Any valid value
207
+ # @return [Hash] Returns the value in the form of hash
208
+ def _to_hash(value)
209
+ if value.is_a?(Array)
210
+ value.compact.map { |v| _to_hash(v) }
211
+ elsif value.is_a?(Hash)
212
+ {}.tap do |hash|
213
+ value.each { |k, v| hash[k] = _to_hash(v) }
214
+ end
215
+ elsif value.respond_to? :to_hash
216
+ value.to_hash
217
+ else
218
+ value
219
+ end
220
+ end
221
+
222
+ end
223
+
224
+ end