didww-v3 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b9d2050b020b277986e901d03abe6bf5eda30bf7467fccac600a05e6e8b34fa
|
4
|
+
data.tar.gz: e9c82237c0ee626fd84805b9cf3f5435146aa556b5de2299b8edc9c04a2614fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f6fdeee5e7606f6b7d71260e0fc59382fbb6ba125fe871162c1794d6a0f388d9e8b89658b018b2edb07861d4d053da9bfbf2476c02cbe4abb4944b0796a4eb3
|
7
|
+
data.tar.gz: 427a2f03a69dd97fa21d87e483965a0ca63d681ce4feccb3c3dd1e8411ad94167c79aa4ba18599ac76385c8fb1ccd261558bd97f5544fd968e5d0aff1929b108
|
data/lib/didww/client.rb
CHANGED
@@ -81,6 +81,14 @@ module DIDWW
|
|
81
81
|
Resource::Trunk
|
82
82
|
end
|
83
83
|
|
84
|
+
def available_dids
|
85
|
+
Resource::AvailableDid
|
86
|
+
end
|
87
|
+
|
88
|
+
def did_reservations
|
89
|
+
Resource::DidReservation
|
90
|
+
end
|
91
|
+
|
84
92
|
def api_mode=(arg)
|
85
93
|
unless BASE_URLS.keys.include?(arg)
|
86
94
|
raise ArgumentError.new("Mode should be in #{BASE_URLS.keys} (given '#{arg}').")
|
@@ -118,6 +126,8 @@ module DIDWW
|
|
118
126
|
require 'didww/resources/stock_keeping_unit'
|
119
127
|
require 'didww/resources/trunk_group'
|
120
128
|
require 'didww/resources/trunk'
|
129
|
+
require 'didww/resources/available_did'
|
130
|
+
require 'didww/resources/did_reservation'
|
121
131
|
end
|
122
132
|
|
123
133
|
end
|
@@ -2,13 +2,15 @@ module DIDWW
|
|
2
2
|
module ComplexObject
|
3
3
|
class DidOrderItem < Base
|
4
4
|
# passed at order creation
|
5
|
-
property :qty,
|
6
|
-
property :
|
5
|
+
property :qty, type: :int
|
6
|
+
property :available_did_id, type: :string
|
7
|
+
property :did_reservation_id, type: :string
|
8
|
+
property :sku_id, type: :string
|
7
9
|
|
8
10
|
# returned
|
9
|
-
property :setup_price,
|
10
|
-
property :monthly_price,
|
11
|
-
property :did_group_id,
|
11
|
+
property :setup_price, type: :decimal
|
12
|
+
property :monthly_price, type: :decimal
|
13
|
+
property :did_group_id, type: :string
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
@@ -49,6 +49,10 @@ module DIDWW
|
|
49
49
|
# TODO
|
50
50
|
# Meta attributes
|
51
51
|
#
|
52
|
+
# :available_dids_enabled
|
53
|
+
# Type: Boolean
|
54
|
+
# Description: Defines if particular DID from this DID group can be ordered via available_dids or did_reservations.
|
55
|
+
#
|
52
56
|
# needs_registration
|
53
57
|
# Type: Boolean
|
54
58
|
# Description: Defines if end-user registration is required for this DID Group.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module DIDWW
|
2
|
+
module Resource
|
3
|
+
class DidReservation < Base
|
4
|
+
has_one :available_did
|
5
|
+
|
6
|
+
property :expire_at, type: :time
|
7
|
+
# Type: DateTime
|
8
|
+
# Description: DateTime when the DID reservation expired or will expire. DateTime is in the ISO 8601 format "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", where "SSS" are milliseconds and 'Z' denotes Zulu time (UTC).
|
9
|
+
|
10
|
+
property :created_at, type: :time
|
11
|
+
# Type: DateTime
|
12
|
+
# Description: DID reservation created at DateTime.
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
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: 1.
|
4
|
+
version: 1.2.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: 2018-
|
11
|
+
date: 2018-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -265,6 +265,7 @@ files:
|
|
265
265
|
- lib/didww/complex_objects/configurations/sip_configuration.rb
|
266
266
|
- lib/didww/complex_objects/did_order_item.rb
|
267
267
|
- lib/didww/middleware.rb
|
268
|
+
- lib/didww/resources/available_did.rb
|
268
269
|
- lib/didww/resources/balance.rb
|
269
270
|
- lib/didww/resources/base.rb
|
270
271
|
- lib/didww/resources/cdr_export.rb
|
@@ -273,6 +274,7 @@ files:
|
|
273
274
|
- lib/didww/resources/did.rb
|
274
275
|
- lib/didww/resources/did_group.rb
|
275
276
|
- lib/didww/resources/did_group_type.rb
|
277
|
+
- lib/didww/resources/did_reservation.rb
|
276
278
|
- lib/didww/resources/order.rb
|
277
279
|
- lib/didww/resources/pop.rb
|
278
280
|
- lib/didww/resources/region.rb
|