sendly 3.18.2 → 3.19.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bade33a147b49cd340671aaf86a187388360ba9c2e8d58fa0d51b6b486620bb8
4
- data.tar.gz: eb35d212b0466da3fe3ae102e80a8314a0fd6081f8a8e1c89e680ad715c7fb7f
3
+ metadata.gz: b7d9a1a0d9c6b34ef0cc437f69aba803ee3444f14015fc602af2e7fbeb5a7139
4
+ data.tar.gz: b0b757f9590b4b72030c2a45a9e8d8e810aff15c43de46caaa477e67f66ab6af
5
5
  SHA512:
6
- metadata.gz: 321cb814654988946c7029a44233383a28caaae97702d374669ad77be6b9c277befc22166fd42f16018f90d723ab4ee1050c1dbccd4483d3e636ea3ccffbf8fa
7
- data.tar.gz: 9f1244a84aa2c84848e83fc74eb15bdcf2aea5ecaebf1e3406796a6d64aeb4e6c081cf81555455e0be89a2cfbed20439225f1301d99bd61d74876236a261e9fb
6
+ metadata.gz: 990960c6fa0679ff0166d2b4117f2d7edb2102ff67bc4aeff5d4243b5fdf80db387b26c45215d5befd9e07c66c86d6dd169b69cb907ef9b8d0ac34a4c5689967
7
+ data.tar.gz: 43ae6e3f869d5ca169d7ecaa93171e79ce69e343bb7584c7c1bca70b8eabf47869d41e31b6d1168225d174f2d95ab1b7ba000e93023d1c1bf98cf44218e55a8b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sendly (3.18.2)
4
+ sendly (3.19.0)
5
5
  faraday (~> 2.0)
6
6
  faraday-retry (~> 2.0)
7
7
 
data/lib/sendly/client.rb CHANGED
@@ -20,21 +20,26 @@ module Sendly
20
20
  # @return [Integer] Maximum retry attempts
21
21
  attr_reader :max_retries
22
22
 
23
+ # @return [String, nil] Organization ID
24
+ attr_accessor :organization_id
25
+
23
26
  # Create a new Sendly client
24
27
  #
25
28
  # @param api_key [String] Your Sendly API key
26
29
  # @param base_url [String] API base URL (optional)
27
30
  # @param timeout [Integer] Request timeout in seconds (default: 30)
28
31
  # @param max_retries [Integer] Maximum retry attempts (default: 3)
32
+ # @param organization_id [String, nil] Organization ID (optional)
29
33
  #
30
34
  # @example
31
35
  # client = Sendly::Client.new("sk_live_v1_xxx")
32
36
  # client = Sendly::Client.new("sk_live_v1_xxx", timeout: 60, max_retries: 5)
33
- def initialize(api_key:, base_url: nil, timeout: 30, max_retries: 3)
37
+ def initialize(api_key:, base_url: nil, timeout: 30, max_retries: 3, organization_id: nil)
34
38
  @api_key = api_key
35
39
  @base_url = (base_url || Sendly.base_url).chomp("/")
36
40
  @timeout = timeout
37
41
  @max_retries = max_retries
42
+ @organization_id = organization_id || ENV["SENDLY_ORG_ID"]
38
43
 
39
44
  validate_api_key!
40
45
  end
@@ -173,6 +178,7 @@ module Sendly
173
178
  req["Accept"] = "application/json"
174
179
  req["User-Agent"] = "sendly-ruby/#{VERSION}"
175
180
  req["Content-Type"] = "multipart/form-data; boundary=#{boundary}"
181
+ req["X-Organization-Id"] = @organization_id if @organization_id
176
182
  req.body = body.join
177
183
 
178
184
  attempt = 0
@@ -280,6 +286,7 @@ module Sendly
280
286
  req["Content-Type"] = "application/json"
281
287
  req["Accept"] = "application/json"
282
288
  req["User-Agent"] = "sendly-ruby/#{VERSION}"
289
+ req["X-Organization-Id"] = @organization_id if @organization_id
283
290
 
284
291
  req.body = body.to_json if body
285
292
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sendly
4
- VERSION = "3.18.2"
4
+ VERSION = "3.19.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendly
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.18.2
4
+ version: 3.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sendly
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-03-06 00:00:00.000000000 Z
11
+ date: 2026-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday