tenios-api 1.0.6 → 1.1.1

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: 8370041249fab07d5612a7ab194318f1f8d241d7b0dfa4ecc0631410b7ac4e1f
4
- data.tar.gz: 300afe17af0c5726c1693368c3012084d62acd813f122b886c3778455533cd35
3
+ metadata.gz: 0367ac48d457fe9c1bf85ea5f2a40d7a2cfb5c4be21f800947eb1705cf986c52
4
+ data.tar.gz: d5515039af3b4cc78385f8a331d3bdad03afd06ad1553fa25029a5424891d7b2
5
5
  SHA512:
6
- metadata.gz: 835967c7f1d407e193a297d8e18f99f1fd1831608fe90c21d193b8c012a168c67991ed56f22ec9a7423ca166920e38390338d34c9e1f6636d8e4114742366ed2
7
- data.tar.gz: fd1c63d0ea0e2f86615bf688b7534ff7e3b9b9807f01543ce8bd665797729b5ee2565ef4889bd5f48f95cd2e47f1d982d9f5a0755d5befd4ca97ba99ede006bd
6
+ metadata.gz: cb0e276faade0c6a7fc62dea73d87c59169c9e253a4264e256988bf249769dff9201ab78ba5e83cc030a0b224a271e561a5c5821305e7a66d833915763b43619
7
+ data.tar.gz: 71590fe046f10eecd4e765435d53679ddf75cd0939f5c2bb3fd98acf6e6db185ed6764f891a4d111d25302e8c7e7db680cf1338055e5edfc1c0860e452748711
data/CHANGELOG.md CHANGED
@@ -8,6 +8,29 @@
8
8
  ### Security
9
9
  ### Misc
10
10
 
11
+ ## [1.1.1] - 2026-08-14
12
+
13
+ ### Changed
14
+
15
+ * Drop `faraday_middleware` dependency (deprecated upstream, no Faraday 2 support). `:gzip` now uses the `faraday-gzip` gem instead.
16
+ * Relax `faraday` from `~> 1` to `>= 1, < 3`, allowing Faraday 2.
17
+
18
+ ## [1.1.0] - 2023-02-08
19
+
20
+ ### Added
21
+
22
+ * Support for `/transfer-call` API
23
+
24
+ [1.1.0]: https://github.com/carwow/tenios-api-ruby/compare/v1.0.6...v1.1.0
25
+
26
+ ## [1.0.6] - 2023-01-04
27
+
28
+ ### Fixed
29
+
30
+ * Ruby 3.1 support - splat kargs in `CallDetailsRecords#retrieve`
31
+
32
+ [1.0.6]: https://github.com/carwow/tenios-api-ruby/compare/v1.0.5...v1.0.6
33
+
11
34
  ## [1.0.5] - 2022-12-21
12
35
 
13
36
  ### Changed
@@ -15,7 +38,7 @@
15
38
  * Relax ruby version constraint to support ruby 3.1
16
39
  * Relax faraday version constraint to major v1
17
40
 
18
- [1.0.5]: https://github.com/carwow/tenios-api-ruby/compare/v1.0.3...v1.0.4
41
+ [1.0.5]: https://github.com/carwow/tenios-api-ruby/compare/v1.0.4...v1.0.5
19
42
 
20
43
  ## [1.0.4] - 2021-02-22
21
44
 
data/README.md CHANGED
@@ -75,6 +75,19 @@ client.record_call.stop(
75
75
  )
76
76
  ```
77
77
 
78
+ ### Transfer Call
79
+
80
+ [Tenios documentation](https://www.tenios.de/en/doc/transfer-call-api)
81
+
82
+ #### Transfer
83
+
84
+ ```ruby
85
+ client.transfer_call(
86
+ call_uuid: '9315b018-86bd-424f-a086-7095ce427130',
87
+ destination: '+441234567890'
88
+ )
89
+ ```
90
+
78
91
  ## Contributing
79
92
 
80
93
  Bug reports and pull requests are welcome on GitHub at https://github.com/carwow/tenios-api-ruby.
@@ -2,7 +2,8 @@
2
2
 
3
3
  require "json"
4
4
  require "faraday"
5
- require "faraday_middleware"
5
+ require "faraday/gzip"
6
+ require_relative "transfer_call"
6
7
 
7
8
  module Tenios
8
9
  module API
@@ -33,6 +34,11 @@ module Tenios
33
34
  endpoint :number, :Number
34
35
  endpoint :record_call, :RecordCall
35
36
 
37
+ def transfer_call(...)
38
+ @transfer_call ||= Tenios::API::TransferCall.new(self)
39
+ @transfer_call.transfer_call(...)
40
+ end
41
+
36
42
  # @api private
37
43
  def post(path, **payload)
38
44
  @http_client.post(path, payload.merge(access_key: @access_key)).body
@@ -45,7 +51,7 @@ module Tenios
45
51
  c.request :json
46
52
  c.response :json
47
53
  c.response :raise_error
48
- c.use :gzip
54
+ c.request :gzip
49
55
 
50
56
  c.adapter Faraday.default_adapter
51
57
  }
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tenios
4
+ module API
5
+ class TransferCall
6
+ EXTERNAL_NUMBER = "EXTERNALNUMBER"
7
+ SIP_USER = "SIP_USER"
8
+ SIP_TRUNK = "SIP_TRUNK"
9
+
10
+ DESTINATION_TYPES = [
11
+ EXTERNAL_NUMBER,
12
+ SIP_USER,
13
+ SIP_TRUNK
14
+ ].freeze
15
+
16
+ attr_reader :client
17
+
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ def transfer_call(call_uuid:, destination:, destination_type: EXTERNAL_NUMBER)
23
+ raise "destination_type must be one of #{DESTINATION_TYPES}" unless DESTINATION_TYPES.include?(destination_type)
24
+
25
+ client.post(
26
+ "/transfer-call",
27
+ call_uuid: call_uuid,
28
+ destination_type: destination_type,
29
+ destination: destination
30
+ )
31
+ end
32
+ end
33
+ end
34
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tenios
4
4
  module API
5
- VERSION = "1.0.6"
5
+ VERSION = "1.1.1"
6
6
  end
7
7
  end
data/tenios-api.gemspec CHANGED
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
22
22
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.start_with? "spec" }
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.add_dependency "faraday", "~> 1"
26
- spec.add_dependency "faraday_middleware", "~> 1"
25
+ spec.add_dependency "faraday", ">= 1", "< 3"
26
+ spec.add_dependency "faraday-gzip", "~> 2.0"
27
27
 
28
28
  spec.add_development_dependency "pry", "~> 0.14"
29
29
  spec.add_development_dependency "rake", "~> 13"
metadata CHANGED
@@ -1,43 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tenios-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - carwow Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-04 00:00:00.000000000 Z
11
+ date: 2026-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '3'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '1'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '3'
27
33
  - !ruby/object:Gem::Dependency
28
- name: faraday_middleware
34
+ name: faraday-gzip
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: '1'
39
+ version: '2.0'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: '1'
46
+ version: '2.0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: pry
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -117,6 +123,7 @@ files:
117
123
  - lib/tenios/api/client.rb
118
124
  - lib/tenios/api/number.rb
119
125
  - lib/tenios/api/record_call.rb
126
+ - lib/tenios/api/transfer_call.rb
120
127
  - lib/tenios/api/verification.rb
121
128
  - lib/tenios/api/version.rb
122
129
  - tenios-api.gemspec
@@ -143,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
150
  - !ruby/object:Gem::Version
144
151
  version: '0'
145
152
  requirements: []
146
- rubygems_version: 3.3.11
153
+ rubygems_version: 3.5.20
147
154
  signing_key:
148
155
  specification_version: 4
149
156
  summary: Tenios API Client ☎️