didww-v3 1.2.0 → 1.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/lib/didww/client.rb +11 -0
- data/lib/didww/complex_objects/capacity_order_item.rb +16 -0
- data/lib/didww/complex_objects/did_order_item.rb +5 -0
- data/lib/didww/resources/capacity_pool.rb +46 -0
- data/lib/didww/resources/did.rb +6 -0
- data/lib/didww/resources/order.rb +1 -0
- data/lib/didww/resources/qty_based_pricing.rb +19 -0
- data/lib/didww/resources/shared_capacity_group.rb +26 -0
- data/lib/didww/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f190a01670c1359b390201bc4cdd569f500ae20ed97ad5438f81903e55c442f
|
4
|
+
data.tar.gz: fd332a3bc4bfe59ec7d12bfd60b706b2206bfdd2a77216a551405125231f1d1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5aacd2fc1d81c7ad726a46ceea8837f64ff1469b851b164b1d4a34ea131b8fff47eecba16e4b477b615029a39a911df22f985f2a185aa6d2b95a559114866d7
|
7
|
+
data.tar.gz: 1665800d20ba7bca592b52cef5ad1aea3398fa7be9d045169cad71bf9b030f51f147c77ef1d373c582765a0c38ec3da318ae38e3dee9a822f4559ef815f64448
|
data/lib/didww/client.rb
CHANGED
@@ -37,10 +37,18 @@ module DIDWW
|
|
37
37
|
Resource::Balance.all.first
|
38
38
|
end
|
39
39
|
|
40
|
+
def capacity_pools
|
41
|
+
Resource::CapacityPool
|
42
|
+
end
|
43
|
+
|
40
44
|
def cdr_exports
|
41
45
|
Resource::CdrExport
|
42
46
|
end
|
43
47
|
|
48
|
+
def shared_capacity_groups
|
49
|
+
Resource::SharedCapacityGroup
|
50
|
+
end
|
51
|
+
|
44
52
|
def cities
|
45
53
|
Resource::City
|
46
54
|
end
|
@@ -114,7 +122,9 @@ module DIDWW
|
|
114
122
|
|
115
123
|
def require_didww_resources
|
116
124
|
require 'didww/resources/balance'
|
125
|
+
require 'didww/resources/capacity_pool'
|
117
126
|
require 'didww/resources/cdr_export'
|
127
|
+
require 'didww/resources/shared_capacity_group'
|
118
128
|
require 'didww/resources/city'
|
119
129
|
require 'didww/resources/country'
|
120
130
|
require 'didww/resources/did_group_type'
|
@@ -122,6 +132,7 @@ module DIDWW
|
|
122
132
|
require 'didww/resources/did'
|
123
133
|
require 'didww/resources/order'
|
124
134
|
require 'didww/resources/pop'
|
135
|
+
require 'didww/resources/qty_based_pricing'
|
125
136
|
require 'didww/resources/region'
|
126
137
|
require 'didww/resources/stock_keeping_unit'
|
127
138
|
require 'didww/resources/trunk_group'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module DIDWW
|
2
|
+
module ComplexObject
|
3
|
+
class CapacityOrderItem < Base
|
4
|
+
# passed at order creation
|
5
|
+
property :qty, type: :int
|
6
|
+
property :capacity_pool_id, type: :string
|
7
|
+
|
8
|
+
# returned
|
9
|
+
property :nrc, type: :decimal
|
10
|
+
property :mrc, type: :decimal
|
11
|
+
property :propated_mrc, type: :boolean
|
12
|
+
property :billed_from, type: :string
|
13
|
+
property :billed_to, type: :string
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -10,6 +10,11 @@ module DIDWW
|
|
10
10
|
# returned
|
11
11
|
property :setup_price, type: :decimal
|
12
12
|
property :monthly_price, type: :decimal
|
13
|
+
property :nrc, type: :decimal
|
14
|
+
property :mrc, type: :decimal
|
15
|
+
property :propated_mrc, type: :boolean
|
16
|
+
property :billed_from, type: :string
|
17
|
+
property :billed_to, type: :string
|
13
18
|
property :did_group_id, type: :string
|
14
19
|
end
|
15
20
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module DIDWW
|
2
|
+
module Resource
|
3
|
+
class CapacityPool < Base
|
4
|
+
has_many :countries, class: 'Country'
|
5
|
+
has_many :shared_capacity_groups, class: 'SharedCapacityGroup'
|
6
|
+
has_many :qty_based_pricings, class: 'QtyBasedPricing'
|
7
|
+
|
8
|
+
property :name, type: :string
|
9
|
+
# Type: String
|
10
|
+
# Description: Capacity pool name
|
11
|
+
|
12
|
+
property :renew_date, type: :string
|
13
|
+
# Type: String
|
14
|
+
# Description: Next monthly renew date in format 'YYYY-MM-DD'
|
15
|
+
|
16
|
+
property :total_channels_count, type: :integer
|
17
|
+
# Type: Integer
|
18
|
+
# Description: Channels count owned by customer in this pool
|
19
|
+
|
20
|
+
property :assigned_channels_count, type: :integer
|
21
|
+
# Type: Integer
|
22
|
+
# Description: Channels used by at least one service in this pool
|
23
|
+
|
24
|
+
property :minimum_limit, type: :integer
|
25
|
+
# Type: Integer
|
26
|
+
# Description: A minimum amount of channels in this pool. Customer cannot remove unassigned channels below this level.
|
27
|
+
|
28
|
+
property :minimum_qty_per_order, type: :integer
|
29
|
+
# Type: Integer
|
30
|
+
# Description: A minimum amount of new channels to add to this pool in one order.
|
31
|
+
|
32
|
+
property :setup_price, type: :decimal
|
33
|
+
# Type: String
|
34
|
+
# Description: Non-recurring price per channel
|
35
|
+
|
36
|
+
property :monthly_price, type: :decimal
|
37
|
+
# Type: String
|
38
|
+
# Description: Monthly recurring price per channel
|
39
|
+
|
40
|
+
property :metered_rate, type: :decimal
|
41
|
+
# Type: String
|
42
|
+
# Description: Metered rate per minute
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/didww/resources/did.rb
CHANGED
@@ -3,6 +3,8 @@ module DIDWW
|
|
3
3
|
class Did < Base
|
4
4
|
has_one :trunk
|
5
5
|
has_one :trunk_group
|
6
|
+
has_one :capacity_pool
|
7
|
+
has_one :shared_capacity_group
|
6
8
|
|
7
9
|
property :blocked, type: :boolean
|
8
10
|
# Type: Boolean
|
@@ -36,6 +38,10 @@ module DIDWW
|
|
36
38
|
# Type: Integer
|
37
39
|
# Description: The number of channels included with this DID.
|
38
40
|
|
41
|
+
property :dedicated_channels_count, type: :integer
|
42
|
+
# Type: Integer
|
43
|
+
# Description: The number of channels included with this DID.
|
44
|
+
|
39
45
|
property :expires_at, type: :time
|
40
46
|
# Type: DateTime
|
41
47
|
# Description: DateTime when the DID 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).
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module DIDWW
|
2
|
+
module Resource
|
3
|
+
class QtyBasedPricing < Base
|
4
|
+
belongs_to :capacity_pool
|
5
|
+
|
6
|
+
property :qty, type: :integer
|
7
|
+
# Type: Integer
|
8
|
+
# Description: A treshold starting at which provided prices per channel apply
|
9
|
+
|
10
|
+
property :setup_price, type: :decimal
|
11
|
+
# Type: String
|
12
|
+
# Description: Non-recurring price per channel
|
13
|
+
|
14
|
+
property :monthly_price, type: :decimal
|
15
|
+
# Type: String
|
16
|
+
# Description: Monthly recurring price per channel
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module DIDWW
|
2
|
+
module Resource
|
3
|
+
class SharedCapacityGroup < Base
|
4
|
+
has_one :capacity_pool, class: 'CapacityPool'
|
5
|
+
|
6
|
+
has_many :dids, class: 'Did'
|
7
|
+
|
8
|
+
property :name, type: :string
|
9
|
+
# Type: String
|
10
|
+
# Description: Shared capacity group name
|
11
|
+
|
12
|
+
property :shared_channels_count, type: :integer
|
13
|
+
# Type: Integer
|
14
|
+
# Description: Channels count assigned to this Group and shared among its DIDs
|
15
|
+
|
16
|
+
property :metered_channels_count, type: :integer
|
17
|
+
# Type: Integer
|
18
|
+
# Description: Maximum amount of Metered channels used by this Group DIDs
|
19
|
+
|
20
|
+
property :created_at, type: :time
|
21
|
+
# Type: DateTime
|
22
|
+
# Description: Shared capacity group created at DateTime
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
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.3.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-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -255,6 +255,7 @@ files:
|
|
255
255
|
- lib/didww.rb
|
256
256
|
- lib/didww/client.rb
|
257
257
|
- lib/didww/complex_objects/base.rb
|
258
|
+
- lib/didww/complex_objects/capacity_order_item.rb
|
258
259
|
- lib/didww/complex_objects/cdr_export_filter.rb
|
259
260
|
- lib/didww/complex_objects/configurations.rb
|
260
261
|
- lib/didww/complex_objects/configurations/base.rb
|
@@ -268,6 +269,7 @@ files:
|
|
268
269
|
- lib/didww/resources/available_did.rb
|
269
270
|
- lib/didww/resources/balance.rb
|
270
271
|
- lib/didww/resources/base.rb
|
272
|
+
- lib/didww/resources/capacity_pool.rb
|
271
273
|
- lib/didww/resources/cdr_export.rb
|
272
274
|
- lib/didww/resources/city.rb
|
273
275
|
- lib/didww/resources/country.rb
|
@@ -277,7 +279,9 @@ files:
|
|
277
279
|
- lib/didww/resources/did_reservation.rb
|
278
280
|
- lib/didww/resources/order.rb
|
279
281
|
- lib/didww/resources/pop.rb
|
282
|
+
- lib/didww/resources/qty_based_pricing.rb
|
280
283
|
- lib/didww/resources/region.rb
|
284
|
+
- lib/didww/resources/shared_capacity_group.rb
|
281
285
|
- lib/didww/resources/stock_keeping_unit.rb
|
282
286
|
- lib/didww/resources/trunk.rb
|
283
287
|
- lib/didww/resources/trunk/const.rb
|