helo-email-sdk 1.0.0.pre.beta.8 → 1.0.0.pre.beta.9

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: 852fa9a2c34cbc3be20c3558728f38c8abbf47a9a9f2d2d3e45437fcd4d2b85b
4
- data.tar.gz: 707b42c1a813522d8de58824a9a643b0988bd68146093b6dd0d8086f10fed313
3
+ metadata.gz: 763e8c10e5f8bb0185d0bb5d403ac124251f4617eb576e43529819511c2c48fb
4
+ data.tar.gz: b66d39d5a778657060dd56c36acbbd7c9c6589805c1409007a66b707d72f02fd
5
5
  SHA512:
6
- metadata.gz: f2c36e51775728b06ff913d23e8c023c4f07c82f005ffdb65b1c5b2819a9b56c15ea9184e80fbb145f0d4080a2bfa9eb3094df4f7ba2363fd9d8536e8bd80a68
7
- data.tar.gz: 93642eb5ee38435c28a3b7179fb7fdc59ab8d142e44d6aa76cc5d7a34d7a25ae3ddf17baaf0a702741b1ccf507aa5f434d366bba406f0ad0298b1e99849ad57e
6
+ metadata.gz: e8018c7857a5bdc849ef2d98678616f143ff1ba8a4719c479cbf4f45eac46ec1a04f5a55e611ec11235f03b9384917f7459af3fbf8ec892177064533fab4a7a2
7
+ data.tar.gz: '0959f7281a4591ddfa71f429d8e636fa8e00a0f59a17a182504308159777f96c6827aed144506369729354dfc0f9650957018ba7378ce741b858bd3c706a1652'
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # helo-email-sdk
2
2
 
3
- Helo API
3
+ Helo Email API (https://helohq.com)
4
4
 
5
5
  ## Installation
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Helo
4
4
  class Sending < API
5
- def transactional(request_data, channel_id: nil, idempotency_key: nil)
5
+ def send_transactional(request_data, channel_id: nil, idempotency_key: nil)
6
6
  request = SendMessageRequest.new(request_data)
7
7
  headers = {}
8
8
  headers["X-Helo-Channel-Id"] = channel_id unless channel_id.nil?
@@ -11,7 +11,7 @@ module Helo
11
11
  SendMessageAcceptedResponse.from_hash(response.body)
12
12
  end
13
13
 
14
- def transactional_batch(request_data, channel_id: nil, idempotency_key: nil)
14
+ def send_transactional_batch(request_data, channel_id: nil, idempotency_key: nil)
15
15
  request = SendMessageBatchRequest.new(request_data)
16
16
  headers = {}
17
17
  headers["X-Helo-Channel-Id"] = channel_id unless channel_id.nil?
@@ -20,7 +20,7 @@ module Helo
20
20
  SendMessageBatchResponse.from_hash(response.body)
21
21
  end
22
22
 
23
- def broadcast(request_data, channel_id: nil, idempotency_key: nil)
23
+ def send_broadcast(request_data, channel_id: nil, idempotency_key: nil)
24
24
  request = SendBroadcastRequest.new(request_data)
25
25
  headers = {}
26
26
  headers["X-Helo-Channel-Id"] = channel_id unless channel_id.nil?
@@ -29,7 +29,7 @@ module Helo
29
29
  SendBroadcastResponse.from_hash(response.body)
30
30
  end
31
31
 
32
- def broadcast_message(request_data, channel_id: nil, idempotency_key: nil)
32
+ def send_broadcast_message(request_data, channel_id: nil, idempotency_key: nil)
33
33
  request = SendMessageRequest.new(request_data)
34
34
  headers = {}
35
35
  headers["X-Helo-Channel-Id"] = channel_id unless channel_id.nil?
@@ -38,6 +38,6 @@ module Helo
38
38
  SendMessageAcceptedResponse.from_hash(response.body)
39
39
  end
40
40
 
41
- class_methods :transactional, :transactional_batch, :broadcast, :broadcast_message
41
+ class_methods :send_transactional, :send_transactional_batch, :send_broadcast, :send_broadcast_message
42
42
  end
43
43
  end
data/lib/helo/client.rb CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  module Helo
4
4
  class Client < Helo::Core::Client
5
+ # Identifies the package and the Ruby it is running on. RUBY_PLATFORM covers
6
+ # OS and architecture in one ("arm64-darwin24", "x86_64-linux").
7
+ USER_AGENT = "helo-email-sdk/1.0.0-beta.9 (ruby #{RUBY_VERSION}; #{RUBY_PLATFORM})"
8
+
9
+ def user_agent
10
+ USER_AGENT
11
+ end
12
+
5
13
  private
6
14
 
7
15
  def handle_error_response(response)
@@ -21,6 +21,8 @@ module Helo::Core
21
21
  token = current_api_key
22
22
  req.headers["Authorization"] = "Bearer #{token}" if token
23
23
 
24
+ req.headers["User-Agent"] = user_agent if user_agent
25
+
24
26
  # Apply per-request headers verbatim (already in wire form)
25
27
  headers.each do |key, value|
26
28
  req.headers[key.to_s] = value.to_s
@@ -32,6 +34,12 @@ module Helo::Core
32
34
  handle_connection_error(e)
33
35
  end
34
36
 
37
+ # The generated Client subclass overrides this with the package identity it
38
+ # was generated for; Helo::Core on its own has no package to name.
39
+ def user_agent
40
+ nil
41
+ end
42
+
35
43
  private
36
44
 
37
45
  def connection
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.8"
4
+ VERSION = "1.0.0-beta.9"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
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.8
4
+ version: 1.0.0.pre.beta.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Helo Email
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-09-04 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activemodel
@@ -253,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
253
253
  - !ruby/object:Gem::Version
254
254
  version: '0'
255
255
  requirements: []
256
- rubygems_version: 3.6.2
256
+ rubygems_version: 4.0.10
257
257
  specification_version: 4
258
258
  summary: Helo Ruby SDK
259
259
  test_files: []