didww-v3 5.2.0 → 5.3.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 +4 -4
- data/CHANGELOG.md +41 -0
- data/README.md +30 -0
- data/lib/didww/client.rb +6 -1
- data/lib/didww/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c780bc13f7f052f1733482ee69b37994b6bd8c9926a498857947faf23865c8d2
|
|
4
|
+
data.tar.gz: 22be4b92ea6dd9616dc2e67b77b51b3305876b51b6fed40cba6ce7abb8d015e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c80b1331067374890afec7505eeff625af09f4c36d6e093585483005091c56db11cfd36a4a6ba62547c3e3a300d9b7acc37d78502c8db45f8a91f6cf86c9b83
|
|
7
|
+
data.tar.gz: 549b86aadb2a060b2ed3ae5f84e4d9f0140c012080087ee84b7feb800137957b0726f39c347a1574ea1109e09e8d39b875b2f416389e8633f4cd008f092ca44a
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,47 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [5.3.0]
|
|
8
|
+
### Added
|
|
9
|
+
- `DIDWW::Client.customize_connection` to allow customizing the Faraday connection (e.g. proxy, timeouts, custom middleware).
|
|
10
|
+
|
|
11
|
+
## [5.2.0]
|
|
12
|
+
### Changes
|
|
13
|
+
- Extract status predicate methods into `HasStatusHelpers` concern.
|
|
14
|
+
- Merge shared auth header logic into `BaseMiddleware`, `JsonapiMiddleware` inherits and adds `Content-Type`.
|
|
15
|
+
- Replace 29 resource accessor methods with `RESOURCE_CLASSES` hash and `define_method`.
|
|
16
|
+
- Document date and datetime field types in README.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- Fix date type attributes: use `:time` for ISO 8601 timestamps.
|
|
20
|
+
- Add missing resource fields: `reference`, `permanent`, `iso`, `contact_email`.
|
|
21
|
+
- Add `requirement` relationship to `DidGroup`.
|
|
22
|
+
- Skip `Api-Key` header on `public_keys` endpoint.
|
|
23
|
+
- Add `User-Agent` header to export download.
|
|
24
|
+
- Use timing-safe comparison for callback signature validation.
|
|
25
|
+
- Fix `is_expired` boolean changed to `expires_at` date on `Proof`.
|
|
26
|
+
|
|
27
|
+
## [5.1.0]
|
|
28
|
+
### Added
|
|
29
|
+
- `X-DIDWW-API-Version` header sent with requests.
|
|
30
|
+
- Exclusive relationship auto-nullification for DID `voice_in_trunk`/`voice_in_trunk_group`.
|
|
31
|
+
- Export gzip decompression support (`.csv.gz`).
|
|
32
|
+
- `VoiceOutTrunk` CRUD tests and fixtures.
|
|
33
|
+
|
|
34
|
+
### Changes
|
|
35
|
+
- Rename test fixtures from `sample_N` to self-descriptive names.
|
|
36
|
+
|
|
37
|
+
## [5.0.0]
|
|
38
|
+
### Breaking Changes
|
|
39
|
+
- Remove H323 and IAX2 trunk configuration support.
|
|
40
|
+
- Update dependencies and CI for current Ruby/Rails versions.
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
- Add missing relationship declarations and tests for included resources.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
- Fix compatibility with `json_api_client` 1.23.0 and newer Ruby.
|
|
47
|
+
|
|
7
48
|
## [4.1.0]
|
|
8
49
|
### Breaking Changes
|
|
9
50
|
- removed DIDWW::Resource::DidGroup::FEATURE_VOICE in favor DIDWW::Resource::DidGroup::FEATURE_VOICE_IN and DIDWW::Resource::DidGroup::FEATURE_VOICE_OUT [#42](https://github.com/didww/didww-v3-ruby/pull/42)
|
data/README.md
CHANGED
|
@@ -100,6 +100,36 @@ end
|
|
|
100
100
|
| `:production` | `https://api.didww.com/v3/` |
|
|
101
101
|
| `:sandbox` | `https://sandbox-api.didww.com/v3/` |
|
|
102
102
|
|
|
103
|
+
### Connection Customization
|
|
104
|
+
|
|
105
|
+
Use `customize_connection` to customize the underlying Faraday connection, for example to configure a proxy or add custom middleware:
|
|
106
|
+
|
|
107
|
+
```ruby
|
|
108
|
+
# Using a proxy
|
|
109
|
+
DIDWW::Client.configure do |config|
|
|
110
|
+
config.api_key = 'YOUR_API_KEY'
|
|
111
|
+
config.api_mode = :production
|
|
112
|
+
config.customize_connection do |conn|
|
|
113
|
+
# conn is a JsonApiClient::Connection instance
|
|
114
|
+
conn.faraday.proxy = 'http://proxy.example.com:8080'
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
```ruby
|
|
120
|
+
# Adding custom middleware and timeouts
|
|
121
|
+
DIDWW::Client.configure do |config|
|
|
122
|
+
config.api_key = 'YOUR_API_KEY'
|
|
123
|
+
config.api_mode = :production
|
|
124
|
+
config.customize_connection do |conn|
|
|
125
|
+
# conn is a JsonApiClient::Connection instance
|
|
126
|
+
conn.use MyCustomMiddleware
|
|
127
|
+
conn.faraday.options.timeout = 30
|
|
128
|
+
conn.faraday.options.open_timeout = 10
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
```
|
|
132
|
+
|
|
103
133
|
### API Version
|
|
104
134
|
|
|
105
135
|
The SDK sends `X-DIDWW-API-Version: 2022-05-10` by default. You can override it per block:
|
data/lib/didww/client.rb
CHANGED
|
@@ -14,10 +14,14 @@ module DIDWW
|
|
|
14
14
|
DEFAULT_MODE = :sandbox
|
|
15
15
|
DEFAULT_API_VERSION = '2022-05-10'
|
|
16
16
|
|
|
17
|
-
mattr_accessor :api_key, :api_mode, :http_verbose, :api_version
|
|
17
|
+
mattr_accessor :api_key, :api_mode, :http_verbose, :api_version, :_customize_conn_block
|
|
18
18
|
self.api_version = DEFAULT_API_VERSION
|
|
19
19
|
|
|
20
20
|
class << self
|
|
21
|
+
def customize_connection(&block)
|
|
22
|
+
self._customize_conn_block = block
|
|
23
|
+
end
|
|
24
|
+
|
|
21
25
|
def configure
|
|
22
26
|
yield self if block_given?
|
|
23
27
|
connect!
|
|
@@ -107,6 +111,7 @@ module DIDWW
|
|
|
107
111
|
DIDWW::Resource::Base.connection do |connection|
|
|
108
112
|
connection.use Faraday::Response::Logger if http_verbose?
|
|
109
113
|
connection.use DIDWW::JsonapiMiddleware
|
|
114
|
+
_customize_conn_block.call(connection) if _customize_conn_block
|
|
110
115
|
end
|
|
111
116
|
JsonApiClient::Paginating::Paginator.page_param = 'number'
|
|
112
117
|
JsonApiClient::Paginating::Paginator.per_page_param = 'size'
|
data/lib/didww/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: didww-v3
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Korobeinikov
|
|
@@ -211,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
211
211
|
- !ruby/object:Gem::Version
|
|
212
212
|
version: '0'
|
|
213
213
|
requirements: []
|
|
214
|
-
rubygems_version: 3.
|
|
214
|
+
rubygems_version: 3.6.9
|
|
215
215
|
specification_version: 4
|
|
216
216
|
summary: Ruby client for DIDWW API v3
|
|
217
217
|
test_files: []
|