megam_api 1.5.rc1 → 1.5.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/megam/api.rb +18 -3
- data/lib/megam/api/billingtranscations.rb +40 -0
- data/lib/megam/api/eventsbilling.rb +50 -0
- data/lib/megam/api/eventscontainer.rb +50 -0
- data/lib/megam/api/{events.rb → eventsstorage.rb} +4 -5
- data/lib/megam/api/eventsvm.rb +50 -0
- data/lib/megam/api/snapshots.rb +50 -0
- data/lib/megam/api/version.rb +1 -1
- data/lib/megam/core/billingtranscations.rb +244 -0
- data/lib/megam/core/billingtranscations_collection.rb +136 -0
- data/lib/megam/core/{events.rb → eventsbilling.rb} +10 -18
- data/lib/megam/core/eventsbilling_collection.rb +137 -0
- data/lib/megam/core/eventscontainer.rb +190 -0
- data/lib/megam/core/eventscontainer_collection.rb +137 -0
- data/lib/megam/core/eventsstorage.rb +172 -0
- data/lib/megam/core/eventsstorage_collection.rb +137 -0
- data/lib/megam/core/eventsvm.rb +190 -0
- data/lib/megam/core/{events_collection.rb → eventsvm_collection.rb} +38 -38
- data/lib/megam/core/json_compat.rb +36 -6
- data/lib/megam/core/snapshots.rb +184 -0
- data/lib/megam/core/snapshots_collection.rb +137 -0
- data/test/test_billingtranscations.rb +33 -0
- data/test/test_eventsbilling.rb +30 -0
- data/test/test_eventscontainer.rb +30 -0
- data/test/test_eventsstorage.rb +14 -0
- data/test/test_eventsvm.rb +30 -0
- data/test/test_snapshots.rb +32 -0
- metadata +32 -7
- data/test/test_events.rb +0 -17
@@ -0,0 +1,33 @@
|
|
1
|
+
require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
|
2
|
+
|
3
|
+
class TestApps < MiniTest::Unit::TestCase
|
4
|
+
#=begin
|
5
|
+
def test_post_billingtranscations
|
6
|
+
tmp_hash = { :accounts_id => "5555555",
|
7
|
+
:gateway => "paypal",
|
8
|
+
:amountin => "5",
|
9
|
+
:amountout => "5.99",
|
10
|
+
:fees => "0.99",
|
11
|
+
:tranid => "HGH111",
|
12
|
+
:trandate => "31/21/2012",
|
13
|
+
:currency_type => "USD"
|
14
|
+
}
|
15
|
+
|
16
|
+
response = megams.post_billingtranscations(tmp_hash)
|
17
|
+
assert_equal(201, response.status)
|
18
|
+
end
|
19
|
+
#=end
|
20
|
+
|
21
|
+
#=begin
|
22
|
+
def test_get_billingtranscations
|
23
|
+
response = megams.get_billingtranscations
|
24
|
+
assert_equal(200, response.status)
|
25
|
+
end
|
26
|
+
#=end
|
27
|
+
=begin
|
28
|
+
def test_get_billingtranscations
|
29
|
+
response = megams.get_billingtranscations("iaas_default")
|
30
|
+
assert_equal(200, response.status)
|
31
|
+
end
|
32
|
+
=end
|
33
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
|
2
|
+
|
3
|
+
class TestApps < MiniTest::Unit::TestCase
|
4
|
+
|
5
|
+
#=begin
|
6
|
+
def test_get_eventsbilling
|
7
|
+
tmp_hash = {
|
8
|
+
"account_id" => "",
|
9
|
+
"created_at" => "2016-05-05 10:57:30 +0000",
|
10
|
+
"assembly_id" => "ASM9038606864211614815",
|
11
|
+
"event_type" => "",
|
12
|
+
"data" => []
|
13
|
+
}
|
14
|
+
response = megams.get_eventsbilling("0", tmp_hash)
|
15
|
+
|
16
|
+
assert_equal(200, response.status)
|
17
|
+
end
|
18
|
+
|
19
|
+
#=end
|
20
|
+
#=begin
|
21
|
+
def test_list_eventsbilling
|
22
|
+
response = megams.list_eventsbilling("0")
|
23
|
+
assert_equal(200, response.status)
|
24
|
+
end
|
25
|
+
def test_index_eventsbilling
|
26
|
+
response = megams.index_eventsbilling
|
27
|
+
assert_equal(200, response.status)
|
28
|
+
end
|
29
|
+
#=end
|
30
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
|
2
|
+
|
3
|
+
class TestApps < MiniTest::Unit::TestCase
|
4
|
+
|
5
|
+
#=begin
|
6
|
+
def test_get_eventscontainer
|
7
|
+
tmp_hash = {
|
8
|
+
"account_id" => "",
|
9
|
+
"created_at" => "2016-05-05 10:57:30 +0000",
|
10
|
+
"assembly_id" => "ASM9038606864211614815",
|
11
|
+
"event_type" => "",
|
12
|
+
"data" => []
|
13
|
+
}
|
14
|
+
response = megams.get_eventscontainer("0", tmp_hash)
|
15
|
+
|
16
|
+
assert_equal(200, response.status)
|
17
|
+
end
|
18
|
+
|
19
|
+
#=end
|
20
|
+
#=begin
|
21
|
+
def test_list_eventscontainer
|
22
|
+
response = megams.list_eventscontainer("0")
|
23
|
+
assert_equal(200, response.status)
|
24
|
+
end
|
25
|
+
def test_index_eventscontainer
|
26
|
+
response = megams.index_eventscontainer
|
27
|
+
assert_equal(200, response.status)
|
28
|
+
end
|
29
|
+
#=end
|
30
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
|
2
|
+
|
3
|
+
class TestApps < MiniTest::Unit::TestCase
|
4
|
+
#=begin
|
5
|
+
def test_list_eventsstorage
|
6
|
+
response = megams.list_eventsstorage("0")
|
7
|
+
assert_equal(200, response.status)
|
8
|
+
end
|
9
|
+
def test_index_eventsstorage
|
10
|
+
response = megams.index_eventsstorage
|
11
|
+
assert_equal(200, response.status)
|
12
|
+
end
|
13
|
+
#=end
|
14
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
|
2
|
+
|
3
|
+
class TestApps < MiniTest::Unit::TestCase
|
4
|
+
|
5
|
+
#=begin
|
6
|
+
def test_get_eventsvm
|
7
|
+
tmp_hash = {
|
8
|
+
"account_id" => "",
|
9
|
+
"created_at" => "2016-05-05 10:57:30 +0000",
|
10
|
+
"assembly_id" => "ASM9038606864211614815",
|
11
|
+
"event_type" => "",
|
12
|
+
"data" => []
|
13
|
+
}
|
14
|
+
response = megams.get_eventsvm("0", tmp_hash)
|
15
|
+
|
16
|
+
assert_equal(200, response.status)
|
17
|
+
end
|
18
|
+
|
19
|
+
#=end
|
20
|
+
#=begin
|
21
|
+
def test_list_eventsvm
|
22
|
+
response = megams.list_eventsvm("0")
|
23
|
+
assert_equal(200, response.status)
|
24
|
+
end
|
25
|
+
def test_index_eventsvm
|
26
|
+
response = megams.index_eventsvm
|
27
|
+
assert_equal(200, response.status)
|
28
|
+
end
|
29
|
+
#=end
|
30
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
|
2
|
+
|
3
|
+
class TestApps < MiniTest::Unit::TestCase
|
4
|
+
|
5
|
+
=begin
|
6
|
+
def test_post_snapshots
|
7
|
+
tmp_hash = {
|
8
|
+
:account_id => "test@megam.io",
|
9
|
+
:asm_id => "ASM5355764237644862300",
|
10
|
+
:org_id => "ORG7879663326321337888",
|
11
|
+
:name => "pop.megambox.com",
|
12
|
+
|
13
|
+
}
|
14
|
+
|
15
|
+
response = megams.post_snapshots(tmp_hash)
|
16
|
+
assert_equal(201, response.status)
|
17
|
+
end
|
18
|
+
=end
|
19
|
+
|
20
|
+
#=begin
|
21
|
+
def test_get_snapshots
|
22
|
+
response = megams.get_snapshots("ASM5355764237644862351")
|
23
|
+
assert_equal(200, response.status)
|
24
|
+
end
|
25
|
+
#=end
|
26
|
+
#=begin
|
27
|
+
def test_list_snapshots
|
28
|
+
response = megams.list_snapshots
|
29
|
+
assert_equal(200, response.status)
|
30
|
+
end
|
31
|
+
#=end
|
32
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: megam_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajthilak, Kishorekumar Neelamegam, Thomas Alrin, Yeshwanth Kumar, Subash Sethurajan,
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-06-
|
12
|
+
date: 2016-06-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: excon
|
@@ -138,15 +138,20 @@ files:
|
|
138
138
|
- lib/megam/api/assembly.rb
|
139
139
|
- lib/megam/api/balances.rb
|
140
140
|
- lib/megam/api/billedhistories.rb
|
141
|
+
- lib/megam/api/billingtranscations.rb
|
141
142
|
- lib/megam/api/components.rb
|
142
143
|
- lib/megam/api/domains.rb
|
143
144
|
- lib/megam/api/errors.rb
|
144
|
-
- lib/megam/api/
|
145
|
+
- lib/megam/api/eventsbilling.rb
|
146
|
+
- lib/megam/api/eventscontainer.rb
|
147
|
+
- lib/megam/api/eventsstorage.rb
|
148
|
+
- lib/megam/api/eventsvm.rb
|
145
149
|
- lib/megam/api/marketplaces.rb
|
146
150
|
- lib/megam/api/organizations.rb
|
147
151
|
- lib/megam/api/promos.rb
|
148
152
|
- lib/megam/api/requests.rb
|
149
153
|
- lib/megam/api/sensors.rb
|
154
|
+
- lib/megam/api/snapshots.rb
|
150
155
|
- lib/megam/api/sshkeys.rb
|
151
156
|
- lib/megam/api/version.rb
|
152
157
|
- lib/megam/core/account.rb
|
@@ -158,13 +163,21 @@ files:
|
|
158
163
|
- lib/megam/core/balances_collection.rb
|
159
164
|
- lib/megam/core/billedhistories.rb
|
160
165
|
- lib/megam/core/billedhistories_collection.rb
|
166
|
+
- lib/megam/core/billingtranscations.rb
|
167
|
+
- lib/megam/core/billingtranscations_collection.rb
|
161
168
|
- lib/megam/core/components.rb
|
162
169
|
- lib/megam/core/components_collection.rb
|
163
170
|
- lib/megam/core/domain_collection.rb
|
164
171
|
- lib/megam/core/domains.rb
|
165
172
|
- lib/megam/core/error.rb
|
166
|
-
- lib/megam/core/
|
167
|
-
- lib/megam/core/
|
173
|
+
- lib/megam/core/eventsbilling.rb
|
174
|
+
- lib/megam/core/eventsbilling_collection.rb
|
175
|
+
- lib/megam/core/eventscontainer.rb
|
176
|
+
- lib/megam/core/eventscontainer_collection.rb
|
177
|
+
- lib/megam/core/eventsstorage.rb
|
178
|
+
- lib/megam/core/eventsstorage_collection.rb
|
179
|
+
- lib/megam/core/eventsvm.rb
|
180
|
+
- lib/megam/core/eventsvm_collection.rb
|
168
181
|
- lib/megam/core/json_compat.rb
|
169
182
|
- lib/megam/core/konipai.rb
|
170
183
|
- lib/megam/core/log.rb
|
@@ -179,6 +192,8 @@ files:
|
|
179
192
|
- lib/megam/core/rest_adapter.rb
|
180
193
|
- lib/megam/core/sensors.rb
|
181
194
|
- lib/megam/core/sensors_collection.rb
|
195
|
+
- lib/megam/core/snapshots.rb
|
196
|
+
- lib/megam/core/snapshots_collection.rb
|
182
197
|
- lib/megam/core/sshkey.rb
|
183
198
|
- lib/megam/core/sshkey_collection.rb
|
184
199
|
- lib/megam/core/stuff.rb
|
@@ -201,15 +216,20 @@ files:
|
|
201
216
|
- test/test_assembly.rb
|
202
217
|
- test/test_balances.rb
|
203
218
|
- test/test_billedhistories.rb
|
219
|
+
- test/test_billingtranscations.rb
|
204
220
|
- test/test_components.rb
|
205
221
|
- test/test_domains.rb
|
206
|
-
- test/
|
222
|
+
- test/test_eventsbilling.rb
|
223
|
+
- test/test_eventscontainer.rb
|
224
|
+
- test/test_eventsstorage.rb
|
225
|
+
- test/test_eventsvm.rb
|
207
226
|
- test/test_helper.rb
|
208
227
|
- test/test_marketplaces.rb
|
209
228
|
- test/test_organizations.rb
|
210
229
|
- test/test_promos.rb
|
211
230
|
- test/test_requests.rb
|
212
231
|
- test/test_sensors.rb
|
232
|
+
- test/test_snapshots.rb
|
213
233
|
- test/test_sshkeys.rb
|
214
234
|
homepage: http://github.com/megamsys/megam_api
|
215
235
|
licenses:
|
@@ -244,13 +264,18 @@ test_files:
|
|
244
264
|
- test/test_assembly.rb
|
245
265
|
- test/test_balances.rb
|
246
266
|
- test/test_billedhistories.rb
|
267
|
+
- test/test_billingtranscations.rb
|
247
268
|
- test/test_components.rb
|
248
269
|
- test/test_domains.rb
|
249
|
-
- test/
|
270
|
+
- test/test_eventsbilling.rb
|
271
|
+
- test/test_eventscontainer.rb
|
272
|
+
- test/test_eventsstorage.rb
|
273
|
+
- test/test_eventsvm.rb
|
250
274
|
- test/test_helper.rb
|
251
275
|
- test/test_marketplaces.rb
|
252
276
|
- test/test_organizations.rb
|
253
277
|
- test/test_promos.rb
|
254
278
|
- test/test_requests.rb
|
255
279
|
- test/test_sensors.rb
|
280
|
+
- test/test_snapshots.rb
|
256
281
|
- test/test_sshkeys.rb
|
data/test/test_events.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require File.expand_path("#{File.dirname(__FILE__)}/test_helper")
|
2
|
-
|
3
|
-
class TestApps < MiniTest::Unit::TestCase
|
4
|
-
|
5
|
-
=begin
|
6
|
-
def test_get_events
|
7
|
-
response = megams.get_events("ASM9038606864211614815")
|
8
|
-
assert_equal(200, response.status)
|
9
|
-
end
|
10
|
-
=end
|
11
|
-
#=begin
|
12
|
-
def test_list_events
|
13
|
-
response = megams.list_events("10")
|
14
|
-
assert_equal(200, response.status)
|
15
|
-
end
|
16
|
-
#=end
|
17
|
-
end
|