telnyx 5.8.0 → 5.8.2

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: 17b3584d429807420773e0e159a73c0b63e4932ccfbb149898a50ab8d323d29f
4
- data.tar.gz: 9ea5e15eaa92bd060bd99d6d61c9dc5d6c07556377bc4448bb0344d5de57d2b8
3
+ metadata.gz: 5c6abe3f36e6d4ecaec26f367084d4beeb440430a544f3c27bbb9ac34bbfb964
4
+ data.tar.gz: 510322b5b0759d267b1882c3036777bb3d4a2fa048c8bb0c7dffd0bd6e2ebb78
5
5
  SHA512:
6
- metadata.gz: aa4a2e3b63998d0633c0dd6d09f4e8e33bb551f9d01b2d27ec1b06807204f7bf930b162b156006e6c5084c9477d6ad4905f4c0ce98aeb4ca292ce1cfca8fce52
7
- data.tar.gz: 43256ff98a895e97a5ca64fe6844ff7606ed3d29280f4cc14bb468297093674fda475d5daf9fdeaa62bb8572b2d1e98b459daa3ae0d75fae0b3553acb74c335c
6
+ metadata.gz: 49cb112e59ac86257e19c08734f19732456923c7656024b4a1d2a586db92468270227a75945b39f78d7ee5c8bb79b07d3277cd076d3811f26660f4dfe891ef5a
7
+ data.tar.gz: 726dfbf641336474e52fdb03d908a66964c99399fb1a28042d14a2a9b3efdf7f584078377fd4ab7c48c937542da69c0e2b4c7d2e3981ba32bd6601d8c6b89326
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.8.2 (2026-02-02)
4
+
5
+ Full Changelog: [v5.8.1...v5.8.2](https://github.com/team-telnyx/telnyx-ruby/compare/v5.8.1...v5.8.2)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **client/oauth:** send grant_type in the right location ([9c80812](https://github.com/team-telnyx/telnyx-ruby/commit/9c80812de3e8cb0a1e0c22edf105e42a824669e6))
10
+
11
+ ## 5.8.1 (2026-02-02)
12
+
13
+ Full Changelog: [v5.8.0...v5.8.1](https://github.com/team-telnyx/telnyx-ruby/compare/v5.8.0...v5.8.1)
14
+
15
+ ### Bug Fixes
16
+
17
+ * **client:** always add content-length to post body, even when empty ([6290783](https://github.com/team-telnyx/telnyx-ruby/commit/6290783a2b1ed09d5f7bc239da897f58a9c136e2))
18
+
3
19
  ## 5.8.0 (2026-01-30)
4
20
 
5
21
  Full Changelog: [v5.7.2...v5.8.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.7.2...v5.8.0)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "telnyx", "~> 5.8.0"
27
+ gem "telnyx", "~> 5.8.2"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
data/lib/telnyx/client.rb CHANGED
@@ -509,13 +509,7 @@ module Telnyx
509
509
  return {} unless @client_id && @client_secret
510
510
 
511
511
  path = Telnyx::Internal::Util.interpolate_path("https://api.telnyx.com/v2/oauth/token")
512
- token_url = Telnyx::Internal::Util.join_parsed_uri(
513
- @base_url_components,
514
- {
515
- path: path,
516
- query: {grant_type: "client_credentials"}
517
- }
518
- )
512
+ token_url = Telnyx::Internal::Util.join_parsed_uri(@base_url_components, {path: path})
519
513
 
520
514
  @oauth_client_auth_state = Telnyx::Internal::OAuth2ClientCredentials.new(
521
515
  token_url: token_url.to_s,
@@ -61,9 +61,10 @@ module Telnyx
61
61
  method: :post,
62
62
  url: URI(@token_url),
63
63
  headers: {
64
- "Authorization" => "Basic #{Base64.strict_encode64("#{@client_id}:#{@client_secret}")}"
64
+ "Authorization" => "Basic #{Base64.strict_encode64("#{@client_id}:#{@client_secret}")}",
65
+ "Content-Type" => "application/x-www-form-urlencoded"
65
66
  },
66
- body: nil,
67
+ body: "grant_type=client_credentials",
67
68
  max_retries: @client.max_retries,
68
69
  timeout: @timeout
69
70
  }
@@ -75,7 +75,7 @@ module Telnyx
75
75
 
76
76
  case body
77
77
  in nil
78
- nil
78
+ req["content-length"] ||= 0 unless req["transfer-encoding"]
79
79
  in String
80
80
  req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"]
81
81
  req.body_stream = Telnyx::Internal::Util::ReadIOAdapter.new(body, &blk)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "5.8.0"
4
+ VERSION = "5.8.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telnyx
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.8.0
4
+ version: 5.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Telnyx
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-30 00:00:00.000000000 Z
11
+ date: 2026-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi