helo-email-sdk 1.0.0.pre.beta.2 → 1.0.0.pre.beta.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 612d57ecd6a1b1917fe6d79997e1e444bee7b26d2d7dc851a7727509f4f29e67
4
- data.tar.gz: 28bc563518998af787122744b916eab205993fff3d492ee00fd4b196e864f989
3
+ metadata.gz: 68419322a6f7e1bb6857bbb9e38f76ca48ea993bd31b1ac11756502b6ee54df6
4
+ data.tar.gz: c2e11364e91c861ea02c07afa73f5a2a6ee9b930c5e905c01ad6be8637a8b117
5
5
  SHA512:
6
- metadata.gz: 0e7b810a2624aaec9cfcb9818b90bdcbf5771bd70f566aab9b29f7d36e811003cd28895038fce168d2e50ddc476032b52c70f01ea08aca31debce6963e3e8ac9
7
- data.tar.gz: 847cf7cf9fe2e78f5d1ff75e246fbe68d88d1eab506b18588af26a1f00d490a866dd6f75dbb569dbd8251cce9c28a051197b1728ff941d4c36a4f53c39fbece4
6
+ metadata.gz: 249cbacbb3dbba114acc15bca15ebbbb0c530c401f67e332ca8043f6520b6bbbddee848293bf0189c226084ec365a1309e054bc7a90aadb77d0dcf9d943a23c2
7
+ data.tar.gz: ed1b2ddb57aebe804fe6d75223cd4f8f002c4d0fbdda2cb9cbf0ca9e1b86e180d01d6de6cb8851606fd978afa36fc6c2934b9b102870e097e96c9210615924bc
@@ -4,19 +4,19 @@ module Helo
4
4
  class Statistics < API
5
5
  def retrieve_hourly(request_data = {})
6
6
  request = StatisticsRetrieveHourlyRequest.new(request_data)
7
- response = @client.request(:get, "/activity/statistics/hourly", params: request.to_params)
7
+ response = @client.request(:get, "/statistics/hourly", params: request.to_params)
8
8
  StatisticsHourlyResponse.from_hash(response.body)
9
9
  end
10
10
 
11
11
  def retrieve_daily(request_data = {})
12
12
  request = StatisticsRetrieveDailyRequest.new(request_data)
13
- response = @client.request(:get, "/activity/statistics/daily", params: request.to_params)
13
+ response = @client.request(:get, "/statistics/daily", params: request.to_params)
14
14
  StatisticsDailyResponse.from_hash(response.body)
15
15
  end
16
16
 
17
17
  def retrieve_totals(request_data = {})
18
18
  request = StatisticsRetrieveTotalsRequest.new(request_data)
19
- response = @client.request(:get, "/activity/statistics/totals", params: request.to_params)
19
+ response = @client.request(:get, "/statistics/totals", params: request.to_params)
20
20
  StatisticsTotalsResponse.from_hash(response.body)
21
21
  end
22
22
 
@@ -10,15 +10,6 @@ module Helo::Core
10
10
  raise ArgumentError, "base_url is not configured" if configuration.base_url.to_s.empty?
11
11
 
12
12
  @configuration = configuration
13
- @connection = Faraday.new(url: configuration.base_url) do |f|
14
- f.request :json
15
- f.response :json
16
- f.adapter Faraday.default_adapter
17
- f.options.params_encoder = Faraday::FlatParamsEncoder
18
-
19
- # Allow custom Faraday configuration
20
- configuration.faraday_configuration_block&.call(f)
21
- end
22
13
  end
23
14
 
24
15
  def request(method, path, params: {}, body: nil, headers: {})
@@ -43,7 +34,17 @@ module Helo::Core
43
34
 
44
35
  private
45
36
 
46
- attr_reader :connection
37
+ def connection
38
+ @_connection ||= Faraday.new(url: configuration.base_url) do |f|
39
+ f.request :json
40
+ f.response :json
41
+ f.adapter Faraday.default_adapter
42
+ f.options.params_encoder = Faraday::FlatParamsEncoder
43
+
44
+ # Allow custom Faraday configuration
45
+ configuration.faraday_configuration_block&.call(f)
46
+ end
47
+ end
47
48
 
48
49
  def current_api_key
49
50
  token = configuration.api_key
@@ -11,9 +11,13 @@ module Helo
11
11
  COMPLAINED = "complained"
12
12
  UNSUBSCRIBED = "unsubscribed"
13
13
  RESUBSCRIBED = "resubscribed"
14
+ DOMAIN_KEY_VERIFIED = "domain-key-verified"
15
+ DOMAIN_KEY_VERIFICATION_FAILED = "domain-key-verification-failed"
16
+ RETURN_PATH_DOMAIN_VERIFIED = "return-path-domain-verified"
17
+ RETURN_PATH_DOMAIN_VERIFICATION_FAILED = "return-path-domain-verification-failed"
14
18
 
15
19
  def self.all
16
- [ACCEPTED, PROCESSED, BOUNCED, DELIVERED, OPENED, CLICKED, COMPLAINED, UNSUBSCRIBED, RESUBSCRIBED].freeze
20
+ [ACCEPTED, PROCESSED, BOUNCED, DELIVERED, OPENED, CLICKED, COMPLAINED, UNSUBSCRIBED, RESUBSCRIBED, DOMAIN_KEY_VERIFIED, DOMAIN_KEY_VERIFICATION_FAILED, RETURN_PATH_DOMAIN_VERIFIED, RETURN_PATH_DOMAIN_VERIFICATION_FAILED].freeze
17
21
  end
18
22
  end
19
23
  end
@@ -6,12 +6,12 @@ module Helo
6
6
 
7
7
  api_attribute :event_type, :string, key: "eventType"
8
8
  api_attribute :recipients, key: "recipients"
9
- api_attribute :timestamp, :datetime, key: "timestamp"
10
9
  api_attribute :message_id, :string, key: "messageId"
11
10
  api_attribute :channel_id, :string, key: "channelId"
12
11
  api_attribute :mail_type, :string, key: "mailType"
13
12
  api_attribute :subject, :string, key: "subject"
14
13
  api_attribute :tags, key: "tags"
15
14
  api_attribute :metadata, key: "metadata"
15
+ api_attribute :timestamp, :datetime, key: "timestamp"
16
16
  end
17
17
  end
@@ -7,12 +7,12 @@ module Helo
7
7
  api_attribute :event_type, :string, key: "eventType"
8
8
  api_attribute :recipient, :string, key: "recipient"
9
9
  api_attribute :details, :string, key: "details"
10
- api_attribute :timestamp, :datetime, key: "timestamp"
11
10
  api_attribute :message_id, :string, key: "messageId"
12
11
  api_attribute :channel_id, :string, key: "channelId"
13
12
  api_attribute :mail_type, :string, key: "mailType"
14
13
  api_attribute :subject, :string, key: "subject"
15
14
  api_attribute :tags, key: "tags"
16
15
  api_attribute :metadata, key: "metadata"
16
+ api_attribute :timestamp, :datetime, key: "timestamp"
17
17
  end
18
18
  end
@@ -7,12 +7,12 @@ module Helo
7
7
  api_attribute :event_type, :string, key: "eventType"
8
8
  api_attribute :recipient, :string, key: "recipient"
9
9
  api_attribute :details, :string, key: "details"
10
- api_attribute :timestamp, :datetime, key: "timestamp"
11
10
  api_attribute :message_id, :string, key: "messageId"
12
11
  api_attribute :channel_id, :string, key: "channelId"
13
12
  api_attribute :mail_type, :string, key: "mailType"
14
13
  api_attribute :subject, :string, key: "subject"
15
14
  api_attribute :tags, key: "tags"
16
15
  api_attribute :metadata, key: "metadata"
16
+ api_attribute :timestamp, :datetime, key: "timestamp"
17
17
  end
18
18
  end
@@ -7,12 +7,12 @@ module Helo
7
7
  api_attribute :event_type, :string, key: "eventType"
8
8
  api_attribute :recipient, :string, key: "recipient"
9
9
  api_attribute :details, :string, key: "details"
10
- api_attribute :timestamp, :datetime, key: "timestamp"
11
10
  api_attribute :message_id, :string, key: "messageId"
12
11
  api_attribute :channel_id, :string, key: "channelId"
13
12
  api_attribute :mail_type, :string, key: "mailType"
14
13
  api_attribute :subject, :string, key: "subject"
15
14
  api_attribute :tags, key: "tags"
16
15
  api_attribute :metadata, key: "metadata"
16
+ api_attribute :timestamp, :datetime, key: "timestamp"
17
17
  end
18
18
  end
@@ -7,12 +7,12 @@ module Helo
7
7
  api_attribute :event_type, :string, key: "eventType"
8
8
  api_attribute :recipient, :string, key: "recipient"
9
9
  api_attribute :details, :string, key: "details"
10
- api_attribute :timestamp, :datetime, key: "timestamp"
11
10
  api_attribute :message_id, :string, key: "messageId"
12
11
  api_attribute :channel_id, :string, key: "channelId"
13
12
  api_attribute :mail_type, :string, key: "mailType"
14
13
  api_attribute :subject, :string, key: "subject"
15
14
  api_attribute :tags, key: "tags"
16
15
  api_attribute :metadata, key: "metadata"
16
+ api_attribute :timestamp, :datetime, key: "timestamp"
17
17
  end
18
18
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Helo
4
+ class DeliveryWebhookPayloadCommon
5
+ include Helo::Core::Model
6
+
7
+ api_attribute :message_id, :string, key: "messageId"
8
+ api_attribute :channel_id, :string, key: "channelId"
9
+ api_attribute :mail_type, :string, key: "mailType"
10
+ api_attribute :subject, :string, key: "subject"
11
+ api_attribute :tags, key: "tags"
12
+ api_attribute :metadata, key: "metadata"
13
+ api_attribute :timestamp, :datetime, key: "timestamp"
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Helo
4
+ class DomainKeyVerificationFailedPayload
5
+ include Helo::Core::Model
6
+
7
+ api_attribute :event_type, :string, key: "eventType"
8
+ api_attribute :domain_id, :string, key: "domainId"
9
+ api_attribute :domain_name, :string, key: "domainName"
10
+ api_attribute :dns_record_host, :string, key: "dnsRecordHost"
11
+ api_attribute :timestamp, :datetime, key: "timestamp"
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Helo
4
+ class DomainKeyVerifiedPayload
5
+ include Helo::Core::Model
6
+
7
+ api_attribute :event_type, :string, key: "eventType"
8
+ api_attribute :domain_id, :string, key: "domainId"
9
+ api_attribute :domain_name, :string, key: "domainName"
10
+ api_attribute :dns_record_host, :string, key: "dnsRecordHost"
11
+ api_attribute :timestamp, :datetime, key: "timestamp"
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Helo
4
+ class DomainPayloadCommon
5
+ include Helo::Core::Model
6
+
7
+ api_attribute :domain_id, :string, key: "domainId"
8
+ api_attribute :domain_name, :string, key: "domainName"
9
+ api_attribute :dns_record_host, :string, key: "dnsRecordHost"
10
+ api_attribute :timestamp, :datetime, key: "timestamp"
11
+ end
12
+ end
@@ -13,5 +13,7 @@ module Helo
13
13
  api_attribute :status, :string, key: "status"
14
14
  api_attribute :subject, :string, key: "subject"
15
15
  api_attribute :recipients, key: "recipients"
16
+ api_attribute :tags, key: "tags"
17
+ api_attribute :statistics, Helo::Core::ModelType.new("Helo::MessageStatistics"), key: "statistics"
16
18
  end
17
19
  end
@@ -26,5 +26,6 @@ module Helo
26
26
  api_attribute :attachments, Helo::Core::ArrayType.new("Helo::MessageDetailsResponseAttachment"), key: "attachments"
27
27
  api_attribute :tracking, Helo::Core::ModelType.new("Helo::MessageDetailsResponseTracking"), key: "tracking"
28
28
  api_attribute :events, Helo::Core::ArrayType.new("Helo::MessageDetailsResponseEvent"), key: "events"
29
+ api_attribute :statistics, Helo::Core::ModelType.new("Helo::MessageStatistics"), key: "statistics"
29
30
  end
30
31
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Helo
4
+ class MessageStatistics
5
+ include Helo::Core::Model
6
+
7
+ api_attribute :delivered, :integer, key: "delivered"
8
+ api_attribute :bounced, :integer, key: "bounced"
9
+ api_attribute :opened, :integer, key: "opened"
10
+ api_attribute :clicked, :integer, key: "clicked"
11
+ api_attribute :complained, :integer, key: "complained"
12
+ api_attribute :unsubscribed, :integer, key: "unsubscribed"
13
+ end
14
+ end
@@ -7,12 +7,12 @@ module Helo
7
7
  api_attribute :event_type, :string, key: "eventType"
8
8
  api_attribute :recipient, :string, key: "recipient"
9
9
  api_attribute :details, :string, key: "details"
10
- api_attribute :timestamp, :datetime, key: "timestamp"
11
10
  api_attribute :message_id, :string, key: "messageId"
12
11
  api_attribute :channel_id, :string, key: "channelId"
13
12
  api_attribute :mail_type, :string, key: "mailType"
14
13
  api_attribute :subject, :string, key: "subject"
15
14
  api_attribute :tags, key: "tags"
16
15
  api_attribute :metadata, key: "metadata"
16
+ api_attribute :timestamp, :datetime, key: "timestamp"
17
17
  end
18
18
  end
@@ -6,12 +6,12 @@ module Helo
6
6
 
7
7
  api_attribute :event_type, :string, key: "eventType"
8
8
  api_attribute :recipients, key: "recipients"
9
- api_attribute :timestamp, :datetime, key: "timestamp"
10
9
  api_attribute :message_id, :string, key: "messageId"
11
10
  api_attribute :channel_id, :string, key: "channelId"
12
11
  api_attribute :mail_type, :string, key: "mailType"
13
12
  api_attribute :subject, :string, key: "subject"
14
13
  api_attribute :tags, key: "tags"
15
14
  api_attribute :metadata, key: "metadata"
15
+ api_attribute :timestamp, :datetime, key: "timestamp"
16
16
  end
17
17
  end
@@ -7,12 +7,12 @@ module Helo
7
7
  api_attribute :event_type, :string, key: "eventType"
8
8
  api_attribute :recipient, :string, key: "recipient"
9
9
  api_attribute :details, :string, key: "details"
10
- api_attribute :timestamp, :datetime, key: "timestamp"
11
10
  api_attribute :message_id, :string, key: "messageId"
12
11
  api_attribute :channel_id, :string, key: "channelId"
13
12
  api_attribute :mail_type, :string, key: "mailType"
14
13
  api_attribute :subject, :string, key: "subject"
15
14
  api_attribute :tags, key: "tags"
16
15
  api_attribute :metadata, key: "metadata"
16
+ api_attribute :timestamp, :datetime, key: "timestamp"
17
17
  end
18
18
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Helo
4
+ class ReturnPathDomainVerificationFailedPayload
5
+ include Helo::Core::Model
6
+
7
+ api_attribute :event_type, :string, key: "eventType"
8
+ api_attribute :domain_id, :string, key: "domainId"
9
+ api_attribute :domain_name, :string, key: "domainName"
10
+ api_attribute :dns_record_host, :string, key: "dnsRecordHost"
11
+ api_attribute :timestamp, :datetime, key: "timestamp"
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Helo
4
+ class ReturnPathDomainVerifiedPayload
5
+ include Helo::Core::Model
6
+
7
+ api_attribute :event_type, :string, key: "eventType"
8
+ api_attribute :domain_id, :string, key: "domainId"
9
+ api_attribute :domain_name, :string, key: "domainName"
10
+ api_attribute :dns_record_host, :string, key: "dnsRecordHost"
11
+ api_attribute :timestamp, :datetime, key: "timestamp"
12
+ end
13
+ end
@@ -7,12 +7,12 @@ module Helo
7
7
  api_attribute :event_type, :string, key: "eventType"
8
8
  api_attribute :recipient, :string, key: "recipient"
9
9
  api_attribute :details, :string, key: "details"
10
- api_attribute :timestamp, :datetime, key: "timestamp"
11
10
  api_attribute :message_id, :string, key: "messageId"
12
11
  api_attribute :channel_id, :string, key: "channelId"
13
12
  api_attribute :mail_type, :string, key: "mailType"
14
13
  api_attribute :subject, :string, key: "subject"
15
14
  api_attribute :tags, key: "tags"
16
15
  api_attribute :metadata, key: "metadata"
16
+ api_attribute :timestamp, :datetime, key: "timestamp"
17
17
  end
18
18
  end
@@ -5,11 +5,5 @@ module Helo
5
5
  include Helo::Core::Model
6
6
 
7
7
  api_attribute :timestamp, :datetime, key: "timestamp"
8
- api_attribute :message_id, :string, key: "messageId"
9
- api_attribute :channel_id, :string, key: "channelId"
10
- api_attribute :mail_type, :string, key: "mailType"
11
- api_attribute :subject, :string, key: "subject"
12
- api_attribute :tags, key: "tags"
13
- api_attribute :metadata, key: "metadata"
14
8
  end
15
9
  end
data/lib/helo/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Helo
4
- VERSION = "1.0.0-beta.2"
4
+ VERSION = "1.0.0-beta.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helo-email-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.2
4
+ version: 1.0.0.pre.beta.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Helo Email
@@ -147,9 +147,13 @@ files:
147
147
  - lib/helo/models/create_webhook_request.rb
148
148
  - lib/helo/models/delivered_webhook_payload.rb
149
149
  - lib/helo/models/delivery_stats.rb
150
+ - lib/helo/models/delivery_webhook_payload_common.rb
150
151
  - lib/helo/models/dns_record_response.rb
151
152
  - lib/helo/models/dns_records_response.rb
152
153
  - lib/helo/models/domain_channel_response.rb
154
+ - lib/helo/models/domain_key_verification_failed_payload.rb
155
+ - lib/helo/models/domain_key_verified_payload.rb
156
+ - lib/helo/models/domain_payload_common.rb
153
157
  - lib/helo/models/domain_response.rb
154
158
  - lib/helo/models/domain_with_dns_response.rb
155
159
  - lib/helo/models/domains_list_request.rb
@@ -160,6 +164,7 @@ files:
160
164
  - lib/helo/models/message_details_response_attachment.rb
161
165
  - lib/helo/models/message_details_response_event.rb
162
166
  - lib/helo/models/message_details_response_tracking.rb
167
+ - lib/helo/models/message_statistics.rb
163
168
  - lib/helo/models/opened_webhook_payload.rb
164
169
  - lib/helo/models/paginated_events_response.rb
165
170
  - lib/helo/models/paginated_messages_response.rb
@@ -177,6 +182,8 @@ files:
177
182
  - lib/helo/models/remove_suppressions_request.rb
178
183
  - lib/helo/models/remove_suppressions_response.rb
179
184
  - lib/helo/models/resubscribed_webhook_payload.rb
185
+ - lib/helo/models/return_path_domain_verification_failed_payload.rb
186
+ - lib/helo/models/return_path_domain_verified_payload.rb
180
187
  - lib/helo/models/send_broadcast_request.rb
181
188
  - lib/helo/models/send_broadcast_request_message.rb
182
189
  - lib/helo/models/send_broadcast_request_template.rb