didww-v3 3.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codespellrc +4 -0
- data/.github/workflows/codespell.yml +26 -0
- data/.github/workflows/tests.yml +5 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile +1 -2
- data/README.md +5 -1
- data/codespell_ignore_words.txt +1 -0
- data/lib/didww/client.rb +7 -2
- data/lib/didww/complex_objects/configurations/sip_configuration.rb +1 -1
- data/lib/didww/complex_objects/did_order_item.rb +1 -0
- data/lib/didww/resource/available_did.rb +1 -0
- data/lib/didww/resource/did_group.rb +12 -11
- data/lib/didww/resource/nanpa_prefix.rb +18 -0
- data/lib/didww/resource/qty_based_pricing.rb +1 -1
- data/lib/didww/version.rb +1 -1
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c311027f0ab58fdac3f8cd0558485659e23a623c1eec3065369e7a2a44bcad3b
|
4
|
+
data.tar.gz: 6f64fd27e3f51c0c77a3102f7efcdbc1d62d0aecc7b3b83eb233d4c385bbeb10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb9c3864d94db9f49eac0324b695d44a56bf5387816c53203bea979c7a705f2e8a348559b0804151c34bd080e55ccef149e62e1738030e87f69ceda4aa5d96d1
|
7
|
+
data.tar.gz: cb964ac512ecc7a75083e9be7373529c754fc3b9d6809eae7e420726d8f7a4f7a7504f7aa414da352a9ff8f8bba0c2949149d73c1bc492311e0e065bc8347b71
|
data/.codespellrc
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
name: Codespell Spell Checking
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
|
8
|
+
pull_request:
|
9
|
+
branches:
|
10
|
+
- master
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
codespell:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- name: Checkout code
|
18
|
+
uses: actions/checkout@v2
|
19
|
+
|
20
|
+
- name: Install codespell
|
21
|
+
run: |
|
22
|
+
sudo apt-get update
|
23
|
+
sudo apt-get install -y codespell
|
24
|
+
|
25
|
+
- name: Run codespell
|
26
|
+
run: codespell
|
data/.github/workflows/tests.yml
CHANGED
@@ -4,24 +4,25 @@ on:
|
|
4
4
|
push:
|
5
5
|
branches:
|
6
6
|
- master
|
7
|
+
schedule:
|
8
|
+
- cron: "0 9 * * *"
|
7
9
|
|
8
10
|
jobs:
|
9
11
|
test:
|
10
12
|
runs-on: ubuntu-latest
|
11
13
|
strategy:
|
12
14
|
matrix:
|
13
|
-
ruby: [ '2.
|
14
|
-
rails: [ '~>
|
15
|
+
ruby: [ '2.7', '3.0', '3.1', '3.2' ]
|
16
|
+
rails: [ '~> 6.0', '~> 6.1', '~> 7.0' ]
|
15
17
|
name: Tests with Ruby ${{ matrix.ruby }} Activesupport ${{ matrix.rails }}
|
16
18
|
env:
|
17
19
|
RAILS_VERSION: ${{ matrix.rails }}
|
18
20
|
steps:
|
19
21
|
- uses: actions/checkout@v2
|
20
|
-
- uses:
|
22
|
+
- uses: ruby/setup-ruby@v1
|
21
23
|
with:
|
22
24
|
ruby-version: ${{ matrix.ruby }}
|
23
25
|
- name: Run tests
|
24
26
|
run: |
|
25
|
-
gem install bundler -v 2.2.7
|
26
27
|
bundle install
|
27
28
|
bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,20 @@ 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
|
+
## [4.1.0]
|
8
|
+
### Breaking Changes
|
9
|
+
- 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)
|
10
|
+
- removed DIDWW::Resource::DidGroup::FEATURE_SMS in favor of DIDWW::Resource::DidGroup::FEATURE_SMS_IN and DIDWW::Resource::DidGroup::FEATURE_SMS_OUT [#42](https://github.com/didww/didww-v3-ruby/pull/42)
|
11
|
+
|
12
|
+
## [4.0.0]
|
13
|
+
### Breaking Changes
|
14
|
+
- /v3/did_groups removed `local_prefix` attribute
|
15
|
+
### Added
|
16
|
+
- /v3/nanpa_prefixes endpoints being added.
|
17
|
+
|
18
|
+
### Changes
|
19
|
+
- /v3/orders endpoints being updated. Added nanpa_prefix_id attribute for DID order item.
|
20
|
+
|
7
21
|
## [3.0.0]
|
8
22
|
### Breaking Changes
|
9
23
|
- /v3/trunks being moved to /v3/voice_in_trunks.
|
data/Gemfile
CHANGED
@@ -16,11 +16,10 @@ gem 'pry'
|
|
16
16
|
gem 'byebug'
|
17
17
|
gem 'awesome_print'
|
18
18
|
gem 'http_logger'
|
19
|
-
gem 'rubocop', '~> 1.
|
19
|
+
gem 'rubocop', '~> 1.28.2'
|
20
20
|
gem 'rubocop-performance'
|
21
21
|
gem 'rubocop-rake'
|
22
22
|
gem 'rubocop-rspec'
|
23
23
|
gem 'simplecov'
|
24
|
-
gem 'smart_rspec'
|
25
24
|
gem 'webmock'
|
26
25
|
gem 'bundler-audit'
|
data/README.md
CHANGED
@@ -12,7 +12,11 @@ The DIDWW API v3 is a fully compliant implementation of the [JSON API specificat
|
|
12
12
|
|
13
13
|
Read more https://doc.didww.com/api
|
14
14
|
|
15
|
-
Gem Versions **
|
15
|
+
Gem Versions **4.X.X** and branch [master](https://github.com/didww/didww-v3-ruby) are intended to use with DIDWW API 3 version [2022-05-10](https://doc.didww.com/api3/2022-05-10/index.html).
|
16
|
+
|
17
|
+
Gem Versions **3.X.X** and branch [release-3](https://github.com/didww/didww-v3-ruby/tree/release-3) are intended to use with DIDWW API 3 version [2021-12-15](https://doc.didww.com/api3/2021-12-15/index.html).
|
18
|
+
|
19
|
+
Gem Versions **2.X.X** and branch [release-2](https://github.com/didww/didww-v3-ruby/tree/release-2) are intended to use with DIDWW API 3 version [2021-04-19](https://doc.didww.com/api3/2021-04-19/index.html).
|
16
20
|
|
17
21
|
Gem Versions **1.X.X** and branch [release-1](https://github.com/didww/didww-v3-ruby/tree/release-1) are intended to use with DIDWW API 3 version [2017-09-18](https://doc.didww.com/api3/2017-09-18/index.html).
|
18
22
|
|
@@ -0,0 +1 @@
|
|
1
|
+
|
data/lib/didww/client.rb
CHANGED
@@ -8,8 +8,8 @@ require 'didww/resource/base'
|
|
8
8
|
module DIDWW
|
9
9
|
module Client
|
10
10
|
BASE_URLS = {
|
11
|
-
sandbox:
|
12
|
-
production: 'https://
|
11
|
+
sandbox: 'https://sandbox-api.didww.com/v3/'.freeze,
|
12
|
+
production: 'https://api.didww.com/v3/'.freeze
|
13
13
|
}.freeze
|
14
14
|
DEFAULT_MODE = :sandbox
|
15
15
|
|
@@ -154,6 +154,10 @@ module DIDWW
|
|
154
154
|
@@api_mode = arg
|
155
155
|
end
|
156
156
|
|
157
|
+
def nanpa_prefixes
|
158
|
+
Resource::NanpaPrefix
|
159
|
+
end
|
160
|
+
|
157
161
|
private
|
158
162
|
|
159
163
|
def http_verbose?
|
@@ -203,6 +207,7 @@ module DIDWW
|
|
203
207
|
require 'didww/resource/area'
|
204
208
|
require 'didww/resource/voice_out_trunk'
|
205
209
|
require 'didww/resource/voice_out_trunk_regenerate_credential'
|
210
|
+
require 'didww/resource/nanpa_prefix'
|
206
211
|
end
|
207
212
|
|
208
213
|
end
|
@@ -56,7 +56,7 @@ module DIDWW
|
|
56
56
|
property :rtp_ping, type: :boolean
|
57
57
|
# Type: Boolean
|
58
58
|
# Nullable: No
|
59
|
-
# Description: Use RTP PING when connecting a call. After establishing the call, DIDWW will send empty RTP packet "RTP PING". It is
|
59
|
+
# Description: Use RTP PING when connecting a call. After establishing the call, DIDWW will send empty RTP packet "RTP PING". It is necessary if both parties operate in Symmetric RTP / Comedia mode and expect the other party to start sending RTP first.
|
60
60
|
|
61
61
|
property :rtp_timeout, type: :integer
|
62
62
|
# Type: Integer
|
@@ -3,14 +3,19 @@ module DIDWW
|
|
3
3
|
module Resource
|
4
4
|
class DidGroup < Base
|
5
5
|
# Possible values for did_group.features array
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
FEATURE_VOICE_IN = 'voice_in'
|
7
|
+
FEATURE_VOICE_OUT = 'voice_out'
|
8
|
+
FEATURE_T38 = 't38'
|
9
|
+
FEATURE_IN_SMS = 'sms_in'
|
10
|
+
FEATURE_OUT_SMS = 'sms_out'
|
11
|
+
|
9
12
|
FEATURES = {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
13
|
+
FEATURE_VOICE_IN => 'Voice IN',
|
14
|
+
FEATURE_VOICE_OUT => 'Voice OUT',
|
15
|
+
FEATURE_T38 => 'T.38 Fax',
|
16
|
+
FEATURE_IN_SMS => 'SMS IN',
|
17
|
+
FEATURE_OUT_SMS => 'SMS OUT'
|
18
|
+
}.freeze
|
14
19
|
|
15
20
|
has_one :country, class: Country
|
16
21
|
has_one :city, class: City
|
@@ -23,10 +28,6 @@ module DIDWW
|
|
23
28
|
# Type: String
|
24
29
|
# Description: DID Group prefix (city or area calling code)
|
25
30
|
|
26
|
-
property :local_prefix, type: :string
|
27
|
-
# Type: String
|
28
|
-
# Description: DID Group local prefix
|
29
|
-
|
30
31
|
property :features, type: :complex_object # TODO implement array of strings?
|
31
32
|
# Type: Array of strings
|
32
33
|
# Description: Features available for the DID Group, including voice, sms and t38. A DID Group may have multiple features.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module DIDWW
|
4
|
+
module Resource
|
5
|
+
class NanpaPrefix < Base
|
6
|
+
has_one :country, class_name: Country
|
7
|
+
has_one :region, class_name: Region
|
8
|
+
|
9
|
+
property :npa, type: :string
|
10
|
+
# Type: String
|
11
|
+
# Description: NPA codes, or area codes consisting of three digits
|
12
|
+
property :nxx, type: :string
|
13
|
+
# Type: String
|
14
|
+
# Description: Refer to three-digit code
|
15
|
+
# that forms the second part of a 10-digit North American phone number
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -6,7 +6,7 @@ module DIDWW
|
|
6
6
|
|
7
7
|
property :qty, type: :integer
|
8
8
|
# Type: Integer
|
9
|
-
# Description: A
|
9
|
+
# Description: A threshold starting at which provided prices per channel apply
|
10
10
|
|
11
11
|
property :setup_price, type: :decimal
|
12
12
|
# Type: String
|
data/lib/didww/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: didww-v3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Korobeinikov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -101,6 +101,8 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- ".codespellrc"
|
105
|
+
- ".github/workflows/codespell.yml"
|
104
106
|
- ".github/workflows/tests.yml"
|
105
107
|
- ".gitignore"
|
106
108
|
- ".rspec"
|
@@ -112,6 +114,7 @@ files:
|
|
112
114
|
- Rakefile
|
113
115
|
- bin/console
|
114
116
|
- bin/setup
|
117
|
+
- codespell_ignore_words.txt
|
115
118
|
- didww-v3.gemspec
|
116
119
|
- lib/didww.rb
|
117
120
|
- lib/didww/base_middleware.rb
|
@@ -146,6 +149,7 @@ files:
|
|
146
149
|
- lib/didww/resource/encrypted_file.rb
|
147
150
|
- lib/didww/resource/export.rb
|
148
151
|
- lib/didww/resource/identity.rb
|
152
|
+
- lib/didww/resource/nanpa_prefix.rb
|
149
153
|
- lib/didww/resource/order.rb
|
150
154
|
- lib/didww/resource/permanent_supporting_document.rb
|
151
155
|
- lib/didww/resource/pop.rb
|
@@ -186,7 +190,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
190
|
- !ruby/object:Gem::Version
|
187
191
|
version: '0'
|
188
192
|
requirements: []
|
189
|
-
|
193
|
+
rubyforge_project:
|
194
|
+
rubygems_version: 2.7.6.2
|
190
195
|
signing_key:
|
191
196
|
specification_version: 4
|
192
197
|
summary: Ruby client for DIDWW API v3
|