ElasticEmail 4.0.27 → 4.0.29
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/ElasticEmail.gemspec +1 -1
- data/README.md +21 -9
- data/VERSION +1 -1
- data/docs/CampaignOptions.md +3 -1
- data/docs/CampaignTemplate.md +2 -2
- 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/EmailContent.md +2 -2
- data/docs/MessageAttachment.md +2 -2
- data/docs/SecurityApi.md +4 -4
- data/docs/SubAccountsApi.md +73 -1
- data/docs/Webhook.md +42 -0
- data/docs/WebhookApi.md +372 -0
- data/docs/WebhookCreatePayload.md +34 -0
- data/docs/WebhookUpdatePayload.md +36 -0
- data/lib/ElasticEmail/api/campaigns_api.rb +69 -1
- data/lib/ElasticEmail/api/contacts_api.rb +1 -1
- data/lib/ElasticEmail/api/domains_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 +5 -5
- 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 +66 -3
- 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 +1 -1
- data/lib/ElasticEmail/api/webhook_api.rb +351 -0
- data/lib/ElasticEmail/api_client.rb +8 -9
- data/lib/ElasticEmail/api_error.rb +1 -1
- data/lib/ElasticEmail/configuration.rb +1 -1
- data/lib/ElasticEmail/models/access_level.rb +1 -1
- data/lib/ElasticEmail/models/account_status_enum.rb +1 -1
- data/lib/ElasticEmail/models/api_key.rb +10 -4
- data/lib/ElasticEmail/models/api_key_payload.rb +30 -4
- data/lib/ElasticEmail/models/body_content_type.rb +1 -1
- data/lib/ElasticEmail/models/body_part.rb +20 -4
- data/lib/ElasticEmail/models/campaign.rb +30 -4
- data/lib/ElasticEmail/models/campaign_options.rb +25 -8
- data/lib/ElasticEmail/models/campaign_recipient.rb +10 -4
- data/lib/ElasticEmail/models/campaign_status.rb +1 -1
- data/lib/ElasticEmail/models/campaign_template.rb +21 -5
- data/lib/ElasticEmail/models/certificate_validation_status.rb +3 -2
- data/lib/ElasticEmail/models/channel_log_status_summary.rb +10 -4
- data/lib/ElasticEmail/models/compression_format.rb +1 -1
- data/lib/ElasticEmail/models/consent_data.rb +10 -4
- data/lib/ElasticEmail/models/consent_tracking.rb +1 -1
- data/lib/ElasticEmail/models/contact.rb +10 -4
- data/lib/ElasticEmail/models/contact_activity.rb +10 -4
- data/lib/ElasticEmail/models/contact_payload.rb +20 -4
- 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 +10 -4
- data/lib/ElasticEmail/models/contacts_list.rb +10 -4
- data/lib/ElasticEmail/models/delivery_optimization_type.rb +1 -1
- data/lib/ElasticEmail/models/dkim_record.rb +258 -0
- data/lib/ElasticEmail/models/domain_data.rb +42 -8
- data/lib/ElasticEmail/models/domain_detail.rb +42 -8
- data/lib/ElasticEmail/models/domain_owner.rb +1 -1
- data/lib/ElasticEmail/models/domain_payload.rb +10 -4
- data/lib/ElasticEmail/models/domain_update_payload.rb +10 -4
- data/lib/ElasticEmail/models/email_content.rb +21 -5
- data/lib/ElasticEmail/models/email_data.rb +10 -4
- data/lib/ElasticEmail/models/email_job_failed_status.rb +10 -4
- data/lib/ElasticEmail/models/email_job_status.rb +10 -4
- data/lib/ElasticEmail/models/email_message_data.rb +30 -4
- data/lib/ElasticEmail/models/email_predicted_validation_status.rb +1 -1
- data/lib/ElasticEmail/models/email_recipient.rb +20 -4
- data/lib/ElasticEmail/models/email_send.rb +10 -4
- data/lib/ElasticEmail/models/email_status.rb +10 -4
- data/lib/ElasticEmail/models/email_transactional_message_data.rb +30 -4
- data/lib/ElasticEmail/models/email_validation_result.rb +10 -4
- data/lib/ElasticEmail/models/email_validation_status.rb +1 -1
- data/lib/ElasticEmail/models/email_view.rb +10 -4
- data/lib/ElasticEmail/models/emails_payload.rb +10 -4
- data/lib/ElasticEmail/models/encoding_type.rb +1 -1
- data/lib/ElasticEmail/models/event_type.rb +6 -3
- 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 +10 -4
- data/lib/ElasticEmail/models/export_status.rb +1 -1
- data/lib/ElasticEmail/models/file_info.rb +10 -4
- data/lib/ElasticEmail/models/file_payload.rb +20 -4
- data/lib/ElasticEmail/models/file_upload_result.rb +10 -4
- data/lib/ElasticEmail/models/inbound_payload.rb +50 -4
- data/lib/ElasticEmail/models/inbound_route.rb +10 -4
- 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 +20 -4
- data/lib/ElasticEmail/models/list_update_payload.rb +10 -4
- data/lib/ElasticEmail/models/log_job_status.rb +1 -1
- data/lib/ElasticEmail/models/log_status_summary.rb +10 -4
- data/lib/ElasticEmail/models/merge_email_payload.rb +30 -4
- data/lib/ElasticEmail/models/message_attachment.rb +31 -5
- data/lib/ElasticEmail/models/message_category.rb +1 -1
- data/lib/ElasticEmail/models/message_category_enum.rb +1 -1
- data/lib/ElasticEmail/models/new_api_key.rb +10 -4
- data/lib/ElasticEmail/models/new_smtp_credentials.rb +10 -4
- data/lib/ElasticEmail/models/options.rb +10 -4
- data/lib/ElasticEmail/models/recipient_event.rb +10 -4
- data/lib/ElasticEmail/models/segment.rb +10 -4
- data/lib/ElasticEmail/models/segment_payload.rb +30 -4
- data/lib/ElasticEmail/models/smtp_credentials.rb +10 -4
- data/lib/ElasticEmail/models/smtp_credentials_payload.rb +20 -4
- data/lib/ElasticEmail/models/sort_order_item.rb +30 -4
- data/lib/ElasticEmail/models/split_optimization_type.rb +1 -1
- data/lib/ElasticEmail/models/split_options.rb +10 -4
- data/lib/ElasticEmail/models/sub_account_info.rb +10 -4
- data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +20 -4
- data/lib/ElasticEmail/models/subaccount_email_settings.rb +10 -4
- data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +10 -4
- data/lib/ElasticEmail/models/subaccount_payload.rb +30 -4
- data/lib/ElasticEmail/models/subaccount_settings_info.rb +10 -4
- data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +10 -4
- data/lib/ElasticEmail/models/suppression.rb +10 -4
- data/lib/ElasticEmail/models/template.rb +10 -4
- data/lib/ElasticEmail/models/template_payload.rb +20 -4
- data/lib/ElasticEmail/models/template_scope.rb +1 -1
- data/lib/ElasticEmail/models/template_type.rb +1 -1
- data/lib/ElasticEmail/models/tracking_type.rb +1 -1
- data/lib/ElasticEmail/models/tracking_validation_status.rb +1 -1
- data/lib/ElasticEmail/models/transactional_recipient.rb +20 -4
- data/lib/ElasticEmail/models/utm.rb +10 -4
- data/lib/ElasticEmail/models/verification_file_result.rb +10 -4
- data/lib/ElasticEmail/models/verification_file_result_details.rb +10 -4
- data/lib/ElasticEmail/models/verification_status.rb +1 -1
- data/lib/ElasticEmail/models/webhook.rb +336 -0
- data/lib/ElasticEmail/models/webhook_create_payload.rb +329 -0
- data/lib/ElasticEmail/models/webhook_update_payload.rb +312 -0
- data/lib/ElasticEmail/version.rb +2 -2
- data/lib/ElasticEmail.rb +6 -1
- data/spec/api/campaigns_api_spec.rb +14 -1
- data/spec/api/contacts_api_spec.rb +1 -1
- data/spec/api/domains_api_spec.rb +1 -1
- data/spec/api/emails_api_spec.rb +1 -1
- data/spec/api/events_api_spec.rb +1 -1
- data/spec/api/files_api_spec.rb +1 -1
- data/spec/api/inbound_route_api_spec.rb +1 -1
- data/spec/api/lists_api_spec.rb +1 -1
- data/spec/api/security_api_spec.rb +3 -3
- data/spec/api/segments_api_spec.rb +1 -1
- data/spec/api/statistics_api_spec.rb +1 -1
- data/spec/api/sub_accounts_api_spec.rb +14 -2
- data/spec/api/suppressions_api_spec.rb +1 -1
- data/spec/api/templates_api_spec.rb +1 -1
- data/spec/api/verifications_api_spec.rb +1 -1
- data/spec/api/webhook_api_spec.rb +97 -0
- data/spec/models/access_level_spec.rb +1 -1
- data/spec/models/account_status_enum_spec.rb +1 -1
- data/spec/models/api_key_payload_spec.rb +1 -1
- data/spec/models/api_key_spec.rb +1 -1
- data/spec/models/body_content_type_spec.rb +1 -1
- data/spec/models/body_part_spec.rb +1 -1
- data/spec/models/campaign_options_spec.rb +7 -1
- data/spec/models/campaign_recipient_spec.rb +1 -1
- data/spec/models/campaign_spec.rb +1 -1
- data/spec/models/campaign_status_spec.rb +1 -1
- data/spec/models/campaign_template_spec.rb +1 -1
- data/spec/models/certificate_validation_status_spec.rb +1 -1
- data/spec/models/channel_log_status_summary_spec.rb +1 -1
- data/spec/models/compression_format_spec.rb +1 -1
- data/spec/models/consent_data_spec.rb +1 -1
- data/spec/models/consent_tracking_spec.rb +1 -1
- data/spec/models/contact_activity_spec.rb +1 -1
- data/spec/models/contact_payload_spec.rb +1 -1
- data/spec/models/contact_source_spec.rb +1 -1
- data/spec/models/contact_spec.rb +1 -1
- data/spec/models/contact_status_spec.rb +1 -1
- data/spec/models/contact_update_payload_spec.rb +1 -1
- data/spec/models/contacts_list_spec.rb +1 -1
- data/spec/models/delivery_optimization_type_spec.rb +1 -1
- data/spec/models/dkim_record_spec.rb +60 -0
- data/spec/models/domain_data_spec.rb +19 -1
- data/spec/models/domain_detail_spec.rb +19 -1
- data/spec/models/domain_owner_spec.rb +1 -1
- data/spec/models/domain_payload_spec.rb +1 -1
- data/spec/models/domain_update_payload_spec.rb +1 -1
- data/spec/models/email_content_spec.rb +1 -1
- data/spec/models/email_data_spec.rb +1 -1
- data/spec/models/email_job_failed_status_spec.rb +1 -1
- data/spec/models/email_job_status_spec.rb +1 -1
- data/spec/models/email_message_data_spec.rb +1 -1
- data/spec/models/email_predicted_validation_status_spec.rb +1 -1
- data/spec/models/email_recipient_spec.rb +1 -1
- data/spec/models/email_send_spec.rb +1 -1
- data/spec/models/email_status_spec.rb +1 -1
- data/spec/models/email_transactional_message_data_spec.rb +1 -1
- data/spec/models/email_validation_result_spec.rb +1 -1
- data/spec/models/email_validation_status_spec.rb +1 -1
- data/spec/models/email_view_spec.rb +1 -1
- data/spec/models/emails_payload_spec.rb +1 -1
- data/spec/models/encoding_type_spec.rb +1 -1
- data/spec/models/event_type_spec.rb +1 -1
- data/spec/models/events_order_by_spec.rb +1 -1
- data/spec/models/export_file_formats_spec.rb +1 -1
- data/spec/models/export_link_spec.rb +1 -1
- data/spec/models/export_status_spec.rb +1 -1
- data/spec/models/file_info_spec.rb +1 -1
- data/spec/models/file_payload_spec.rb +1 -1
- data/spec/models/file_upload_result_spec.rb +1 -1
- data/spec/models/inbound_payload_spec.rb +1 -1
- data/spec/models/inbound_route_action_type_spec.rb +1 -1
- data/spec/models/inbound_route_filter_type_spec.rb +1 -1
- data/spec/models/inbound_route_spec.rb +1 -1
- data/spec/models/list_payload_spec.rb +1 -1
- data/spec/models/list_update_payload_spec.rb +1 -1
- data/spec/models/log_job_status_spec.rb +1 -1
- data/spec/models/log_status_summary_spec.rb +1 -1
- data/spec/models/merge_email_payload_spec.rb +1 -1
- data/spec/models/message_attachment_spec.rb +1 -1
- data/spec/models/message_category_enum_spec.rb +1 -1
- data/spec/models/message_category_spec.rb +1 -1
- data/spec/models/new_api_key_spec.rb +1 -1
- data/spec/models/new_smtp_credentials_spec.rb +1 -1
- data/spec/models/options_spec.rb +1 -1
- data/spec/models/recipient_event_spec.rb +1 -1
- data/spec/models/segment_payload_spec.rb +1 -1
- data/spec/models/segment_spec.rb +1 -1
- data/spec/models/smtp_credentials_payload_spec.rb +1 -1
- data/spec/models/smtp_credentials_spec.rb +1 -1
- data/spec/models/sort_order_item_spec.rb +1 -1
- data/spec/models/split_optimization_type_spec.rb +1 -1
- data/spec/models/split_options_spec.rb +1 -1
- data/spec/models/sub_account_info_spec.rb +1 -1
- data/spec/models/subaccount_email_credits_payload_spec.rb +1 -1
- data/spec/models/subaccount_email_settings_payload_spec.rb +1 -1
- data/spec/models/subaccount_email_settings_spec.rb +1 -1
- data/spec/models/subaccount_payload_spec.rb +1 -1
- data/spec/models/subaccount_settings_info_payload_spec.rb +1 -1
- data/spec/models/subaccount_settings_info_spec.rb +1 -1
- data/spec/models/suppression_spec.rb +1 -1
- data/spec/models/template_payload_spec.rb +1 -1
- data/spec/models/template_scope_spec.rb +1 -1
- data/spec/models/template_spec.rb +1 -1
- data/spec/models/template_type_spec.rb +1 -1
- data/spec/models/tracking_type_spec.rb +1 -1
- data/spec/models/tracking_validation_status_spec.rb +1 -1
- data/spec/models/transactional_recipient_spec.rb +1 -1
- data/spec/models/utm_spec.rb +1 -1
- data/spec/models/verification_file_result_details_spec.rb +1 -1
- data/spec/models/verification_file_result_spec.rb +1 -1
- data/spec/models/verification_status_spec.rb +1 -1
- data/spec/models/webhook_create_payload_spec.rb +84 -0
- data/spec/models/webhook_spec.rb +108 -0
- data/spec/models/webhook_update_payload_spec.rb +90 -0
- data/spec/spec_helper.rb +1 -1
- metadata +109 -89
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.14.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -55,9 +55,14 @@ module ElasticEmail
|
|
|
55
55
|
}
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
# Returns attribute mapping this model knows about
|
|
59
|
+
def self.acceptable_attribute_map
|
|
60
|
+
attribute_map
|
|
61
|
+
end
|
|
62
|
+
|
|
58
63
|
# Returns all the JSON keys this model knows about
|
|
59
64
|
def self.acceptable_attributes
|
|
60
|
-
|
|
65
|
+
acceptable_attribute_map.values
|
|
61
66
|
end
|
|
62
67
|
|
|
63
68
|
# Attribute type mapping.
|
|
@@ -83,9 +88,10 @@ module ElasticEmail
|
|
|
83
88
|
end
|
|
84
89
|
|
|
85
90
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
91
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
86
92
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
|
-
if (!
|
|
88
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::BodyPart`. Please check the name to make sure it's valid. List of attributes: " +
|
|
93
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
94
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::BodyPart`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
89
95
|
end
|
|
90
96
|
h[k.to_sym] = v
|
|
91
97
|
}
|
|
@@ -125,6 +131,16 @@ module ElasticEmail
|
|
|
125
131
|
true
|
|
126
132
|
end
|
|
127
133
|
|
|
134
|
+
# Custom attribute writer method with validation
|
|
135
|
+
# @param [Object] content_type Value to be assigned
|
|
136
|
+
def content_type=(content_type)
|
|
137
|
+
if content_type.nil?
|
|
138
|
+
fail ArgumentError, 'content_type cannot be nil'
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
@content_type = content_type
|
|
142
|
+
end
|
|
143
|
+
|
|
128
144
|
# Checks equality by comparing each attribute.
|
|
129
145
|
# @param [Object] Object to be compared
|
|
130
146
|
def ==(o)
|
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.14.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -63,9 +63,14 @@ module ElasticEmail
|
|
|
63
63
|
}
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
+
# Returns attribute mapping this model knows about
|
|
67
|
+
def self.acceptable_attribute_map
|
|
68
|
+
attribute_map
|
|
69
|
+
end
|
|
70
|
+
|
|
66
71
|
# Returns all the JSON keys this model knows about
|
|
67
72
|
def self.acceptable_attributes
|
|
68
|
-
|
|
73
|
+
acceptable_attribute_map.values
|
|
69
74
|
end
|
|
70
75
|
|
|
71
76
|
# Attribute type mapping.
|
|
@@ -94,9 +99,10 @@ module ElasticEmail
|
|
|
94
99
|
end
|
|
95
100
|
|
|
96
101
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
102
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
97
103
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
98
|
-
if (!
|
|
99
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::Campaign`. Please check the name to make sure it's valid. List of attributes: " +
|
|
104
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
105
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::Campaign`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
100
106
|
end
|
|
101
107
|
h[k.to_sym] = v
|
|
102
108
|
}
|
|
@@ -159,6 +165,26 @@ module ElasticEmail
|
|
|
159
165
|
true
|
|
160
166
|
end
|
|
161
167
|
|
|
168
|
+
# Custom attribute writer method with validation
|
|
169
|
+
# @param [Object] name Value to be assigned
|
|
170
|
+
def name=(name)
|
|
171
|
+
if name.nil?
|
|
172
|
+
fail ArgumentError, 'name cannot be nil'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
@name = name
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Custom attribute writer method with validation
|
|
179
|
+
# @param [Object] recipients Value to be assigned
|
|
180
|
+
def recipients=(recipients)
|
|
181
|
+
if recipients.nil?
|
|
182
|
+
fail ArgumentError, 'recipients cannot be nil'
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
@recipients = recipients
|
|
186
|
+
end
|
|
187
|
+
|
|
162
188
|
# Checks equality by comparing each attribute.
|
|
163
189
|
# @param [Object] Object to be compared
|
|
164
190
|
def ==(o)
|
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.14.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -35,6 +35,9 @@ module ElasticEmail
|
|
|
35
35
|
|
|
36
36
|
attr_accessor :split_options
|
|
37
37
|
|
|
38
|
+
# Send email at local time of contact.
|
|
39
|
+
attr_accessor :send_at_local_time
|
|
40
|
+
|
|
38
41
|
class EnumAttributeValidator
|
|
39
42
|
attr_reader :datatype
|
|
40
43
|
attr_reader :allowable_values
|
|
@@ -66,13 +69,19 @@ module ElasticEmail
|
|
|
66
69
|
:'schedule_for' => :'ScheduleFor',
|
|
67
70
|
:'trigger_frequency' => :'TriggerFrequency',
|
|
68
71
|
:'trigger_count' => :'TriggerCount',
|
|
69
|
-
:'split_options' => :'SplitOptions'
|
|
72
|
+
:'split_options' => :'SplitOptions',
|
|
73
|
+
:'send_at_local_time' => :'SendAtLocalTime'
|
|
70
74
|
}
|
|
71
75
|
end
|
|
72
76
|
|
|
77
|
+
# Returns attribute mapping this model knows about
|
|
78
|
+
def self.acceptable_attribute_map
|
|
79
|
+
attribute_map
|
|
80
|
+
end
|
|
81
|
+
|
|
73
82
|
# Returns all the JSON keys this model knows about
|
|
74
83
|
def self.acceptable_attributes
|
|
75
|
-
|
|
84
|
+
acceptable_attribute_map.values
|
|
76
85
|
end
|
|
77
86
|
|
|
78
87
|
# Attribute type mapping.
|
|
@@ -84,7 +93,8 @@ module ElasticEmail
|
|
|
84
93
|
:'schedule_for' => :'Time',
|
|
85
94
|
:'trigger_frequency' => :'Float',
|
|
86
95
|
:'trigger_count' => :'Integer',
|
|
87
|
-
:'split_options' => :'SplitOptions'
|
|
96
|
+
:'split_options' => :'SplitOptions',
|
|
97
|
+
:'send_at_local_time' => :'Boolean'
|
|
88
98
|
}
|
|
89
99
|
end
|
|
90
100
|
|
|
@@ -94,6 +104,7 @@ module ElasticEmail
|
|
|
94
104
|
:'track_opens',
|
|
95
105
|
:'track_clicks',
|
|
96
106
|
:'schedule_for',
|
|
107
|
+
:'send_at_local_time'
|
|
97
108
|
])
|
|
98
109
|
end
|
|
99
110
|
|
|
@@ -105,9 +116,10 @@ module ElasticEmail
|
|
|
105
116
|
end
|
|
106
117
|
|
|
107
118
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
119
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
108
120
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
109
|
-
if (!
|
|
110
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::CampaignOptions`. Please check the name to make sure it's valid. List of attributes: " +
|
|
121
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
122
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::CampaignOptions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
111
123
|
end
|
|
112
124
|
h[k.to_sym] = v
|
|
113
125
|
}
|
|
@@ -141,6 +153,10 @@ module ElasticEmail
|
|
|
141
153
|
if attributes.key?(:'split_options')
|
|
142
154
|
self.split_options = attributes[:'split_options']
|
|
143
155
|
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'send_at_local_time')
|
|
158
|
+
self.send_at_local_time = attributes[:'send_at_local_time']
|
|
159
|
+
end
|
|
144
160
|
end
|
|
145
161
|
|
|
146
162
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -169,7 +185,8 @@ module ElasticEmail
|
|
|
169
185
|
schedule_for == o.schedule_for &&
|
|
170
186
|
trigger_frequency == o.trigger_frequency &&
|
|
171
187
|
trigger_count == o.trigger_count &&
|
|
172
|
-
split_options == o.split_options
|
|
188
|
+
split_options == o.split_options &&
|
|
189
|
+
send_at_local_time == o.send_at_local_time
|
|
173
190
|
end
|
|
174
191
|
|
|
175
192
|
# @see the `==` method
|
|
@@ -181,7 +198,7 @@ module ElasticEmail
|
|
|
181
198
|
# Calculates hash code according to all attributes.
|
|
182
199
|
# @return [Integer] Hash code
|
|
183
200
|
def hash
|
|
184
|
-
[delivery_optimization, track_opens, track_clicks, schedule_for, trigger_frequency, trigger_count, split_options].hash
|
|
201
|
+
[delivery_optimization, track_opens, track_clicks, schedule_for, trigger_frequency, trigger_count, split_options, send_at_local_time].hash
|
|
185
202
|
end
|
|
186
203
|
|
|
187
204
|
# 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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.14.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -30,9 +30,14 @@ module ElasticEmail
|
|
|
30
30
|
}
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
33
38
|
# Returns all the JSON keys this model knows about
|
|
34
39
|
def self.acceptable_attributes
|
|
35
|
-
|
|
40
|
+
acceptable_attribute_map.values
|
|
36
41
|
end
|
|
37
42
|
|
|
38
43
|
# Attribute type mapping.
|
|
@@ -57,9 +62,10 @@ module ElasticEmail
|
|
|
57
62
|
end
|
|
58
63
|
|
|
59
64
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
66
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
-
if (!
|
|
62
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::CampaignRecipient`. Please check the name to make sure it's valid. List of attributes: " +
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::CampaignRecipient`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
69
|
end
|
|
64
70
|
h[k.to_sym] = v
|
|
65
71
|
}
|
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.14.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -22,7 +22,7 @@ module ElasticEmail
|
|
|
22
22
|
# Your e-mail with an optional name (e.g.: John Doe <email@domain.com>)
|
|
23
23
|
attr_accessor :from
|
|
24
24
|
|
|
25
|
-
# To what
|
|
25
|
+
# To what addresses should the recipients reply to (e.g. John Doe <email@domain.com>)
|
|
26
26
|
attr_accessor :reply_to
|
|
27
27
|
|
|
28
28
|
# Default subject of email.
|
|
@@ -49,9 +49,14 @@ module ElasticEmail
|
|
|
49
49
|
}
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
+
# Returns attribute mapping this model knows about
|
|
53
|
+
def self.acceptable_attribute_map
|
|
54
|
+
attribute_map
|
|
55
|
+
end
|
|
56
|
+
|
|
52
57
|
# Returns all the JSON keys this model knows about
|
|
53
58
|
def self.acceptable_attributes
|
|
54
|
-
|
|
59
|
+
acceptable_attribute_map.values
|
|
55
60
|
end
|
|
56
61
|
|
|
57
62
|
# Attribute type mapping.
|
|
@@ -81,9 +86,10 @@ module ElasticEmail
|
|
|
81
86
|
end
|
|
82
87
|
|
|
83
88
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
84
90
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
85
|
-
if (!
|
|
86
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::CampaignTemplate`. Please check the name to make sure it's valid. List of attributes: " +
|
|
91
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
92
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::CampaignTemplate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
87
93
|
end
|
|
88
94
|
h[k.to_sym] = v
|
|
89
95
|
}
|
|
@@ -141,6 +147,16 @@ module ElasticEmail
|
|
|
141
147
|
true
|
|
142
148
|
end
|
|
143
149
|
|
|
150
|
+
# Custom attribute writer method with validation
|
|
151
|
+
# @param [Object] from Value to be assigned
|
|
152
|
+
def from=(from)
|
|
153
|
+
if from.nil?
|
|
154
|
+
fail ArgumentError, 'from cannot be nil'
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
@from = from
|
|
158
|
+
end
|
|
159
|
+
|
|
144
160
|
# Checks equality by comparing each attribute.
|
|
145
161
|
# @param [Object] Object to be compared
|
|
146
162
|
def ==(o)
|
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.14.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -19,9 +19,10 @@ module ElasticEmail
|
|
|
19
19
|
CERT_NOT_SET = "CertNotSet".freeze
|
|
20
20
|
VALID = "Valid".freeze
|
|
21
21
|
NOT_VALID = "NotValid".freeze
|
|
22
|
+
IN_PROGRESS = "InProgress".freeze
|
|
22
23
|
|
|
23
24
|
def self.all_vars
|
|
24
|
-
@all_vars ||= [ERROR_OCCURED, CERT_NOT_SET, VALID, NOT_VALID].freeze
|
|
25
|
+
@all_vars ||= [ERROR_OCCURED, CERT_NOT_SET, VALID, NOT_VALID, IN_PROGRESS].freeze
|
|
25
26
|
end
|
|
26
27
|
|
|
27
28
|
# 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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.14.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -78,9 +78,14 @@ module ElasticEmail
|
|
|
78
78
|
}
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
+
# Returns attribute mapping this model knows about
|
|
82
|
+
def self.acceptable_attribute_map
|
|
83
|
+
attribute_map
|
|
84
|
+
end
|
|
85
|
+
|
|
81
86
|
# Returns all the JSON keys this model knows about
|
|
82
87
|
def self.acceptable_attributes
|
|
83
|
-
|
|
88
|
+
acceptable_attribute_map.values
|
|
84
89
|
end
|
|
85
90
|
|
|
86
91
|
# Attribute type mapping.
|
|
@@ -117,9 +122,10 @@ module ElasticEmail
|
|
|
117
122
|
end
|
|
118
123
|
|
|
119
124
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
125
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
120
126
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
121
|
-
if (!
|
|
122
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::ChannelLogStatusSummary`. Please check the name to make sure it's valid. List of attributes: " +
|
|
127
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
128
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::ChannelLogStatusSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
123
129
|
end
|
|
124
130
|
h[k.to_sym] = v
|
|
125
131
|
}
|
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.14.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -54,9 +54,14 @@ module ElasticEmail
|
|
|
54
54
|
}
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
+
# Returns attribute mapping this model knows about
|
|
58
|
+
def self.acceptable_attribute_map
|
|
59
|
+
attribute_map
|
|
60
|
+
end
|
|
61
|
+
|
|
57
62
|
# Returns all the JSON keys this model knows about
|
|
58
63
|
def self.acceptable_attributes
|
|
59
|
-
|
|
64
|
+
acceptable_attribute_map.values
|
|
60
65
|
end
|
|
61
66
|
|
|
62
67
|
# Attribute type mapping.
|
|
@@ -83,9 +88,10 @@ module ElasticEmail
|
|
|
83
88
|
end
|
|
84
89
|
|
|
85
90
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
91
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
86
92
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
|
-
if (!
|
|
88
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::ConsentData`. Please check the name to make sure it's valid. List of attributes: " +
|
|
93
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
94
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::ConsentData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
89
95
|
end
|
|
90
96
|
h[k.to_sym] = v
|
|
91
97
|
}
|
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.14.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -87,9 +87,14 @@ module ElasticEmail
|
|
|
87
87
|
}
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
+
# Returns attribute mapping this model knows about
|
|
91
|
+
def self.acceptable_attribute_map
|
|
92
|
+
attribute_map
|
|
93
|
+
end
|
|
94
|
+
|
|
90
95
|
# Returns all the JSON keys this model knows about
|
|
91
96
|
def self.acceptable_attributes
|
|
92
|
-
|
|
97
|
+
acceptable_attribute_map.values
|
|
93
98
|
end
|
|
94
99
|
|
|
95
100
|
# Attribute type mapping.
|
|
@@ -126,9 +131,10 @@ module ElasticEmail
|
|
|
126
131
|
end
|
|
127
132
|
|
|
128
133
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
134
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
129
135
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
130
|
-
if (!
|
|
131
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::Contact`. Please check the name to make sure it's valid. List of attributes: " +
|
|
136
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
137
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::Contact`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
132
138
|
end
|
|
133
139
|
h[k.to_sym] = v
|
|
134
140
|
}
|
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.14.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -65,9 +65,14 @@ module ElasticEmail
|
|
|
65
65
|
}
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
+
# Returns attribute mapping this model knows about
|
|
69
|
+
def self.acceptable_attribute_map
|
|
70
|
+
attribute_map
|
|
71
|
+
end
|
|
72
|
+
|
|
68
73
|
# Returns all the JSON keys this model knows about
|
|
69
74
|
def self.acceptable_attributes
|
|
70
|
-
|
|
75
|
+
acceptable_attribute_map.values
|
|
71
76
|
end
|
|
72
77
|
|
|
73
78
|
# Attribute type mapping.
|
|
@@ -106,9 +111,10 @@ module ElasticEmail
|
|
|
106
111
|
end
|
|
107
112
|
|
|
108
113
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
114
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
109
115
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
110
|
-
if (!
|
|
111
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::ContactActivity`. Please check the name to make sure it's valid. List of attributes: " +
|
|
116
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
117
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::ContactActivity`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
112
118
|
end
|
|
113
119
|
h[k.to_sym] = v
|
|
114
120
|
}
|
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.14.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -65,9 +65,14 @@ module ElasticEmail
|
|
|
65
65
|
}
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
+
# Returns attribute mapping this model knows about
|
|
69
|
+
def self.acceptable_attribute_map
|
|
70
|
+
attribute_map
|
|
71
|
+
end
|
|
72
|
+
|
|
68
73
|
# Returns all the JSON keys this model knows about
|
|
69
74
|
def self.acceptable_attributes
|
|
70
|
-
|
|
75
|
+
acceptable_attribute_map.values
|
|
71
76
|
end
|
|
72
77
|
|
|
73
78
|
# Attribute type mapping.
|
|
@@ -96,9 +101,10 @@ module ElasticEmail
|
|
|
96
101
|
end
|
|
97
102
|
|
|
98
103
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
104
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
99
105
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
100
|
-
if (!
|
|
101
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::ContactPayload`. Please check the name to make sure it's valid. List of attributes: " +
|
|
106
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
107
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::ContactPayload`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
102
108
|
end
|
|
103
109
|
h[k.to_sym] = v
|
|
104
110
|
}
|
|
@@ -154,6 +160,16 @@ module ElasticEmail
|
|
|
154
160
|
true
|
|
155
161
|
end
|
|
156
162
|
|
|
163
|
+
# Custom attribute writer method with validation
|
|
164
|
+
# @param [Object] email Value to be assigned
|
|
165
|
+
def email=(email)
|
|
166
|
+
if email.nil?
|
|
167
|
+
fail ArgumentError, 'email cannot be nil'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
@email = email
|
|
171
|
+
end
|
|
172
|
+
|
|
157
173
|
# Checks equality by comparing each attribute.
|
|
158
174
|
# @param [Object] Object to be compared
|
|
159
175
|
def ==(o)
|
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.14.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -33,9 +33,14 @@ module ElasticEmail
|
|
|
33
33
|
}
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
36
41
|
# Returns all the JSON keys this model knows about
|
|
37
42
|
def self.acceptable_attributes
|
|
38
|
-
|
|
43
|
+
acceptable_attribute_map.values
|
|
39
44
|
end
|
|
40
45
|
|
|
41
46
|
# Attribute type mapping.
|
|
@@ -61,9 +66,10 @@ module ElasticEmail
|
|
|
61
66
|
end
|
|
62
67
|
|
|
63
68
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
70
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
-
if (!
|
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::ContactUpdatePayload`. Please check the name to make sure it's valid. List of attributes: " +
|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::ContactUpdatePayload`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
73
|
end
|
|
68
74
|
h[k.to_sym] = v
|
|
69
75
|
}
|
|
@@ -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
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.14.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -38,9 +38,14 @@ module ElasticEmail
|
|
|
38
38
|
}
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
# Returns attribute mapping this model knows about
|
|
42
|
+
def self.acceptable_attribute_map
|
|
43
|
+
attribute_map
|
|
44
|
+
end
|
|
45
|
+
|
|
41
46
|
# Returns all the JSON keys this model knows about
|
|
42
47
|
def self.acceptable_attributes
|
|
43
|
-
|
|
48
|
+
acceptable_attribute_map.values
|
|
44
49
|
end
|
|
45
50
|
|
|
46
51
|
# Attribute type mapping.
|
|
@@ -68,9 +73,10 @@ module ElasticEmail
|
|
|
68
73
|
end
|
|
69
74
|
|
|
70
75
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
76
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
77
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
-
if (!
|
|
73
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::ContactsList`. Please check the name to make sure it's valid. List of attributes: " +
|
|
78
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::ContactsList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
80
|
end
|
|
75
81
|
h[k.to_sym] = v
|
|
76
82
|
}
|