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: 43a4e5a0894af4c05f6f8978c5fdd42408120d8ea1bdc18e7cb1c34db6da0fee
4
- data.tar.gz: 8b9b921c0f5681a01b2ec5f3e1e418098f472fbc043d46d35a72ce6f2d37902b
3
+ metadata.gz: 8b9d2050b020b277986e901d03abe6bf5eda30bf7467fccac600a05e6e8b34fa
4
+ data.tar.gz: e9c82237c0ee626fd84805b9cf3f5435146aa556b5de2299b8edc9c04a2614fd
5
5
  SHA512:
6
- metadata.gz: c6b6e91a29e36efc401ce726270c523b5b09e5c88686db3f268033ae411ede30fc22e151617cb40638824092e4c81c763967efd4482e8d0de32a506ec19b2170
7
- data.tar.gz: 1561b27a4ee5bdc930a2b1580d32da56d73abe622ae549e64a18f64246d06d8e14237151c1a82284b09070363050c50cabe2627ff97a726effd20f01848fea8c
6
+ metadata.gz: 2f6fdeee5e7606f6b7d71260e0fc59382fbb6ba125fe871162c1794d6a0f388d9e8b89658b018b2edb07861d4d053da9bfbf2476c02cbe4abb4944b0796a4eb3
7
+ data.tar.gz: 427a2f03a69dd97fa21d87e483965a0ca63d681ce4feccb3c3dd1e8411ad94167c79aa4ba18599ac76385c8fb1ccd261558bd97f5544fd968e5d0aff1929b108
@@ -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, type: :int
6
- property :sku_id, type: :string
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, type: :decimal
10
- property :monthly_price, type: :decimal
11
- property :did_group_id, type: :string
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
@@ -0,0 +1,12 @@
1
+ module DIDWW
2
+ module Resource
3
+ class AvailableDid < Base
4
+ has_one :did_group
5
+
6
+ property :number, type: :string
7
+ # Type: String
8
+ # Description: The actual DID number in the format [country code][area code][subscriber number].
9
+
10
+ end
11
+ end
12
+ 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
@@ -1,3 +1,3 @@
1
1
  module DIDWW
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  end
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.1.0
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-03-05 00:00:00.000000000 Z
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