ElasticEmail 4.0.29 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +132 -0
- data/CONTRIBUTING.md +76 -0
- data/ElasticEmail.gemspec +2 -2
- data/LICENSE +21 -0
- data/README.md +171 -64
- data/SECURITY.md +31 -0
- data/VERSION +1 -1
- data/docs/Webhook.md +7 -1
- data/docs/WebhookApi.md +72 -0
- data/docs/WebhookCreatePayload.md +5 -1
- data/docs/WebhookDeliveryMethod.md +15 -0
- data/lib/ElasticEmail/api/campaigns_api.rb +1 -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 +1 -1
- data/lib/ElasticEmail/api/segments_api.rb +1 -1
- data/lib/ElasticEmail/api/statistics_api.rb +1 -1
- data/lib/ElasticEmail/api/sub_accounts_api.rb +1 -1
- data/lib/ElasticEmail/api/suppressions_api.rb +1 -1
- data/lib/ElasticEmail/api/templates_api.rb +1 -1
- data/lib/ElasticEmail/api/verifications_api.rb +1 -1
- data/lib/ElasticEmail/api/webhook_api.rb +64 -1
- data/lib/ElasticEmail/api_client.rb +9 -8
- 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 +4 -10
- data/lib/ElasticEmail/models/api_key_payload.rb +4 -30
- data/lib/ElasticEmail/models/body_content_type.rb +1 -1
- data/lib/ElasticEmail/models/body_part.rb +4 -20
- data/lib/ElasticEmail/models/campaign.rb +4 -30
- data/lib/ElasticEmail/models/campaign_options.rb +4 -10
- data/lib/ElasticEmail/models/campaign_recipient.rb +4 -10
- data/lib/ElasticEmail/models/campaign_status.rb +1 -1
- data/lib/ElasticEmail/models/campaign_template.rb +4 -20
- data/lib/ElasticEmail/models/certificate_validation_status.rb +1 -1
- data/lib/ElasticEmail/models/channel_log_status_summary.rb +4 -10
- data/lib/ElasticEmail/models/compression_format.rb +1 -1
- data/lib/ElasticEmail/models/consent_data.rb +4 -10
- data/lib/ElasticEmail/models/consent_tracking.rb +1 -1
- data/lib/ElasticEmail/models/contact.rb +4 -10
- data/lib/ElasticEmail/models/contact_activity.rb +4 -10
- data/lib/ElasticEmail/models/contact_payload.rb +4 -20
- 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 +4 -10
- data/lib/ElasticEmail/models/contacts_list.rb +4 -10
- data/lib/ElasticEmail/models/delivery_optimization_type.rb +1 -1
- data/lib/ElasticEmail/models/dkim_record.rb +4 -10
- data/lib/ElasticEmail/models/domain_data.rb +4 -10
- data/lib/ElasticEmail/models/domain_detail.rb +4 -10
- data/lib/ElasticEmail/models/domain_owner.rb +1 -1
- data/lib/ElasticEmail/models/domain_payload.rb +4 -10
- data/lib/ElasticEmail/models/domain_update_payload.rb +4 -10
- data/lib/ElasticEmail/models/email_content.rb +4 -20
- data/lib/ElasticEmail/models/email_data.rb +4 -10
- data/lib/ElasticEmail/models/email_job_failed_status.rb +4 -10
- data/lib/ElasticEmail/models/email_job_status.rb +4 -10
- data/lib/ElasticEmail/models/email_message_data.rb +4 -30
- data/lib/ElasticEmail/models/email_predicted_validation_status.rb +1 -1
- data/lib/ElasticEmail/models/email_recipient.rb +4 -20
- data/lib/ElasticEmail/models/email_send.rb +4 -10
- data/lib/ElasticEmail/models/email_status.rb +4 -10
- data/lib/ElasticEmail/models/email_transactional_message_data.rb +4 -30
- data/lib/ElasticEmail/models/email_validation_result.rb +4 -10
- data/lib/ElasticEmail/models/email_validation_status.rb +1 -1
- data/lib/ElasticEmail/models/email_view.rb +4 -10
- data/lib/ElasticEmail/models/emails_payload.rb +4 -10
- data/lib/ElasticEmail/models/encoding_type.rb +1 -1
- data/lib/ElasticEmail/models/event_type.rb +1 -1
- data/lib/ElasticEmail/models/events_order_by.rb +1 -1
- data/lib/ElasticEmail/models/export_file_formats.rb +1 -1
- data/lib/ElasticEmail/models/export_link.rb +4 -10
- data/lib/ElasticEmail/models/export_status.rb +1 -1
- data/lib/ElasticEmail/models/file_info.rb +4 -10
- data/lib/ElasticEmail/models/file_payload.rb +4 -20
- data/lib/ElasticEmail/models/file_upload_result.rb +4 -10
- data/lib/ElasticEmail/models/inbound_payload.rb +4 -50
- data/lib/ElasticEmail/models/inbound_route.rb +4 -10
- 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 +4 -20
- data/lib/ElasticEmail/models/list_update_payload.rb +4 -10
- data/lib/ElasticEmail/models/log_job_status.rb +1 -1
- data/lib/ElasticEmail/models/log_status_summary.rb +4 -10
- data/lib/ElasticEmail/models/merge_email_payload.rb +4 -30
- data/lib/ElasticEmail/models/message_attachment.rb +4 -30
- 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 +4 -10
- data/lib/ElasticEmail/models/new_smtp_credentials.rb +4 -10
- data/lib/ElasticEmail/models/options.rb +4 -10
- data/lib/ElasticEmail/models/recipient_event.rb +4 -10
- data/lib/ElasticEmail/models/segment.rb +4 -10
- data/lib/ElasticEmail/models/segment_payload.rb +4 -30
- data/lib/ElasticEmail/models/smtp_credentials.rb +4 -10
- data/lib/ElasticEmail/models/smtp_credentials_payload.rb +4 -20
- data/lib/ElasticEmail/models/sort_order_item.rb +4 -30
- data/lib/ElasticEmail/models/split_optimization_type.rb +1 -1
- data/lib/ElasticEmail/models/split_options.rb +4 -10
- data/lib/ElasticEmail/models/sub_account_info.rb +4 -10
- data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +4 -20
- data/lib/ElasticEmail/models/subaccount_email_settings.rb +4 -10
- data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +4 -10
- data/lib/ElasticEmail/models/subaccount_payload.rb +4 -30
- data/lib/ElasticEmail/models/subaccount_settings_info.rb +4 -10
- data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +4 -10
- data/lib/ElasticEmail/models/suppression.rb +4 -10
- data/lib/ElasticEmail/models/template.rb +4 -10
- data/lib/ElasticEmail/models/template_payload.rb +4 -20
- 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 +4 -20
- data/lib/ElasticEmail/models/utm.rb +4 -10
- data/lib/ElasticEmail/models/verification_file_result.rb +4 -10
- data/lib/ElasticEmail/models/verification_file_result_details.rb +4 -10
- data/lib/ElasticEmail/models/verification_status.rb +1 -1
- data/lib/ElasticEmail/models/webhook.rb +61 -14
- data/lib/ElasticEmail/models/webhook_create_payload.rb +52 -34
- data/lib/ElasticEmail/models/webhook_delivery_method.rb +40 -0
- data/lib/ElasticEmail/models/webhook_update_payload.rb +4 -10
- data/lib/ElasticEmail/version.rb +2 -2
- data/lib/ElasticEmail.rb +2 -1
- data/spec/api/campaigns_api_spec.rb +1 -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 +1 -1
- 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 +1 -1
- 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 +13 -1
- 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 +1 -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 +1 -1
- data/spec/models/domain_data_spec.rb +1 -1
- data/spec/models/domain_detail_spec.rb +1 -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 +13 -1
- data/spec/models/webhook_delivery_method_spec.rb +30 -0
- data/spec/models/webhook_spec.rb +19 -1
- data/spec/models/webhook_update_payload_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +110 -102
|
@@ -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.11.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -36,6 +36,33 @@ module ElasticEmail
|
|
|
36
36
|
|
|
37
37
|
attr_accessor :notification_for_error
|
|
38
38
|
|
|
39
|
+
# Sign every request with HMAC-SHA256. Can be set only when the webhook is created. Default: false.
|
|
40
|
+
attr_accessor :enable_signing
|
|
41
|
+
|
|
42
|
+
attr_accessor :delivery_method
|
|
43
|
+
|
|
44
|
+
class EnumAttributeValidator
|
|
45
|
+
attr_reader :datatype
|
|
46
|
+
attr_reader :allowable_values
|
|
47
|
+
|
|
48
|
+
def initialize(datatype, allowable_values)
|
|
49
|
+
@allowable_values = allowable_values.map do |value|
|
|
50
|
+
case datatype.to_s
|
|
51
|
+
when /Integer/i
|
|
52
|
+
value.to_i
|
|
53
|
+
when /Float/i
|
|
54
|
+
value.to_f
|
|
55
|
+
else
|
|
56
|
+
value
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def valid?(value)
|
|
62
|
+
!value || allowable_values.include?(value)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
39
66
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
67
|
def self.attribute_map
|
|
41
68
|
{
|
|
@@ -47,18 +74,15 @@ module ElasticEmail
|
|
|
47
74
|
:'notification_for_clicked' => :'NotificationForClicked',
|
|
48
75
|
:'notification_for_unsubscribed' => :'NotificationForUnsubscribed',
|
|
49
76
|
:'notification_for_abuse_report' => :'NotificationForAbuseReport',
|
|
50
|
-
:'notification_for_error' => :'NotificationForError'
|
|
77
|
+
:'notification_for_error' => :'NotificationForError',
|
|
78
|
+
:'enable_signing' => :'EnableSigning',
|
|
79
|
+
:'delivery_method' => :'DeliveryMethod'
|
|
51
80
|
}
|
|
52
81
|
end
|
|
53
82
|
|
|
54
|
-
# Returns attribute mapping this model knows about
|
|
55
|
-
def self.acceptable_attribute_map
|
|
56
|
-
attribute_map
|
|
57
|
-
end
|
|
58
|
-
|
|
59
83
|
# Returns all the JSON keys this model knows about
|
|
60
84
|
def self.acceptable_attributes
|
|
61
|
-
|
|
85
|
+
attribute_map.values
|
|
62
86
|
end
|
|
63
87
|
|
|
64
88
|
# Attribute type mapping.
|
|
@@ -72,13 +96,16 @@ module ElasticEmail
|
|
|
72
96
|
:'notification_for_clicked' => :'Boolean',
|
|
73
97
|
:'notification_for_unsubscribed' => :'Boolean',
|
|
74
98
|
:'notification_for_abuse_report' => :'Boolean',
|
|
75
|
-
:'notification_for_error' => :'Boolean'
|
|
99
|
+
:'notification_for_error' => :'Boolean',
|
|
100
|
+
:'enable_signing' => :'Boolean',
|
|
101
|
+
:'delivery_method' => :'WebhookDeliveryMethod'
|
|
76
102
|
}
|
|
77
103
|
end
|
|
78
104
|
|
|
79
105
|
# List of attributes with nullable: true
|
|
80
106
|
def self.openapi_nullable
|
|
81
107
|
Set.new([
|
|
108
|
+
:'enable_signing',
|
|
82
109
|
])
|
|
83
110
|
end
|
|
84
111
|
|
|
@@ -90,10 +117,9 @@ module ElasticEmail
|
|
|
90
117
|
end
|
|
91
118
|
|
|
92
119
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
93
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
94
120
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
95
|
-
if (!
|
|
96
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::WebhookCreatePayload`. Please check the name to make sure it's valid. List of attributes: " +
|
|
121
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
122
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::WebhookCreatePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
97
123
|
end
|
|
98
124
|
h[k.to_sym] = v
|
|
99
125
|
}
|
|
@@ -137,6 +163,16 @@ module ElasticEmail
|
|
|
137
163
|
if attributes.key?(:'notification_for_error')
|
|
138
164
|
self.notification_for_error = attributes[:'notification_for_error']
|
|
139
165
|
end
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'enable_signing')
|
|
168
|
+
self.enable_signing = attributes[:'enable_signing']
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'delivery_method')
|
|
172
|
+
self.delivery_method = attributes[:'delivery_method']
|
|
173
|
+
else
|
|
174
|
+
self.delivery_method = 'Get'
|
|
175
|
+
end
|
|
140
176
|
end
|
|
141
177
|
|
|
142
178
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -164,26 +200,6 @@ module ElasticEmail
|
|
|
164
200
|
true
|
|
165
201
|
end
|
|
166
202
|
|
|
167
|
-
# Custom attribute writer method with validation
|
|
168
|
-
# @param [Object] name Value to be assigned
|
|
169
|
-
def name=(name)
|
|
170
|
-
if name.nil?
|
|
171
|
-
fail ArgumentError, 'name cannot be nil'
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
@name = name
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
# Custom attribute writer method with validation
|
|
178
|
-
# @param [Object] url Value to be assigned
|
|
179
|
-
def url=(url)
|
|
180
|
-
if url.nil?
|
|
181
|
-
fail ArgumentError, 'url cannot be nil'
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
@url = url
|
|
185
|
-
end
|
|
186
|
-
|
|
187
203
|
# Checks equality by comparing each attribute.
|
|
188
204
|
# @param [Object] Object to be compared
|
|
189
205
|
def ==(o)
|
|
@@ -197,7 +213,9 @@ module ElasticEmail
|
|
|
197
213
|
notification_for_clicked == o.notification_for_clicked &&
|
|
198
214
|
notification_for_unsubscribed == o.notification_for_unsubscribed &&
|
|
199
215
|
notification_for_abuse_report == o.notification_for_abuse_report &&
|
|
200
|
-
notification_for_error == o.notification_for_error
|
|
216
|
+
notification_for_error == o.notification_for_error &&
|
|
217
|
+
enable_signing == o.enable_signing &&
|
|
218
|
+
delivery_method == o.delivery_method
|
|
201
219
|
end
|
|
202
220
|
|
|
203
221
|
# @see the `==` method
|
|
@@ -209,7 +227,7 @@ module ElasticEmail
|
|
|
209
227
|
# Calculates hash code according to all attributes.
|
|
210
228
|
# @return [Integer] Hash code
|
|
211
229
|
def hash
|
|
212
|
-
[name, url, notify_once_per_email, notification_for_sent, notification_for_opened, notification_for_clicked, notification_for_unsubscribed, notification_for_abuse_report, notification_for_error].hash
|
|
230
|
+
[name, url, notify_once_per_email, notification_for_sent, notification_for_opened, notification_for_clicked, notification_for_unsubscribed, notification_for_abuse_report, notification_for_error, enable_signing, delivery_method].hash
|
|
213
231
|
end
|
|
214
232
|
|
|
215
233
|
# Builds the object from hash
|
|
@@ -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.11.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module ElasticEmail
|
|
17
|
+
class WebhookDeliveryMethod
|
|
18
|
+
GET = "Get".freeze
|
|
19
|
+
POST_JSON = "PostJson".freeze
|
|
20
|
+
|
|
21
|
+
def self.all_vars
|
|
22
|
+
@all_vars ||= [GET, POST_JSON].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 WebhookDeliveryMethod.all_vars.include?(value)
|
|
37
|
+
raise "Invalid ENUM value #{value} for class #WebhookDeliveryMethod"
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -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.11.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -54,14 +54,9 @@ 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
|
-
|
|
62
57
|
# Returns all the JSON keys this model knows about
|
|
63
58
|
def self.acceptable_attributes
|
|
64
|
-
|
|
59
|
+
attribute_map.values
|
|
65
60
|
end
|
|
66
61
|
|
|
67
62
|
# Attribute type mapping.
|
|
@@ -102,10 +97,9 @@ module ElasticEmail
|
|
|
102
97
|
end
|
|
103
98
|
|
|
104
99
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
105
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
106
100
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
107
|
-
if (!
|
|
108
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::WebhookUpdatePayload`. Please check the name to make sure it's valid. List of attributes: " +
|
|
101
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
102
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ElasticEmail::WebhookUpdatePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
109
103
|
end
|
|
110
104
|
h[k.to_sym] = v
|
|
111
105
|
}
|
data/lib/ElasticEmail/version.rb
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
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.11.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
module ElasticEmail
|
|
14
|
-
VERSION = '4.0
|
|
14
|
+
VERSION = '4.3.0'
|
|
15
15
|
end
|
data/lib/ElasticEmail.rb
CHANGED
|
@@ -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.11.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -114,6 +114,7 @@ require 'ElasticEmail/models/verification_file_result_details'
|
|
|
114
114
|
require 'ElasticEmail/models/verification_status'
|
|
115
115
|
require 'ElasticEmail/models/webhook'
|
|
116
116
|
require 'ElasticEmail/models/webhook_create_payload'
|
|
117
|
+
require 'ElasticEmail/models/webhook_delivery_method'
|
|
117
118
|
require 'ElasticEmail/models/webhook_update_payload'
|
|
118
119
|
|
|
119
120
|
# APIs
|
data/spec/api/emails_api_spec.rb
CHANGED
data/spec/api/events_api_spec.rb
CHANGED
data/spec/api/files_api_spec.rb
CHANGED
data/spec/api/lists_api_spec.rb
CHANGED
|
@@ -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.11.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -69,6 +69,18 @@ describe 'WebhookApi' do
|
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
+
# unit tests for webhook_by_publicid_secret_rotate_post
|
|
73
|
+
# Rotate Webhook Secret
|
|
74
|
+
# Replace the signing secret of a webhook created with signing. The old secret stops being used at once - there is no grace period. The new secret is returned only in this response. Notifications your endpoint rejects while it still has the old secret are retried and signed with the new one. Required Access Level: ModifyWebNotifications
|
|
75
|
+
# @param publicid
|
|
76
|
+
# @param [Hash] opts the optional parameters
|
|
77
|
+
# @return [Webhook]
|
|
78
|
+
describe 'webhook_by_publicid_secret_rotate_post test' do
|
|
79
|
+
it 'should work' do
|
|
80
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
72
84
|
# unit tests for webhook_get
|
|
73
85
|
# Load Webhooks
|
|
74
86
|
# Returns a list of notification webhooks. Required Access Level: ViewWebNotifications
|
data/spec/models/api_key_spec.rb
CHANGED
data/spec/models/contact_spec.rb
CHANGED