megam_api 1.8.6 → 1.8.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7987adb1d65e950e63fb3049925f74052b203c8
4
- data.tar.gz: e5904f5d7b0c40ac201967059b3e8a577bcf9e05
3
+ metadata.gz: 02d2482daec0b4dd2d4fb4f323503eca81085dcf
4
+ data.tar.gz: 7c8c06d82820074532de54b9282b8f93d6ed52a7
5
5
  SHA512:
6
- metadata.gz: d837684ffef7d8b794db05491435814f89ccdcc4dfeea0d0b257014af8b92223b70c8c67154ec10c4d4a89cc26d499524e7f492cc626044039953caf9001e267
7
- data.tar.gz: 92b676edfa0f8410487e96a68046a7a34f75d7800890dbd73f88b85e54d47c4950734c885dd3ce102e6d80f4e5a738b43f97404c13817f13d5ec7f637871f585
6
+ metadata.gz: 6f353a3add0bf9411c5ecb34c225914629ac1710eef02498af85e4b821decd50ecc06d6002982c219b9de99dfa9d2527ebb18e25fe7d0184e64efdb8f8ce1fe8
7
+ data.tar.gz: 156f6666cc9d27e6c7add544eaf83259c249e68d8560ffce7d58d50dfe45afff49c92110e5eb37acd2ee3a942a0ad92970c1668260e1c33bea7025fbf7dd9479
@@ -21,7 +21,7 @@ module Megam
21
21
  end
22
22
 
23
23
  def post_license(new_license)
24
- @options = {:path => '/license/content',
24
+ @options = {:path => '/licenses/content',
25
25
  :body => Megam::JSONCompat.to_json(new_license)}.merge(@options)
26
26
 
27
27
  request(
@@ -1,6 +1,6 @@
1
1
  module Megam
2
2
  class API
3
3
 
4
- VERSION = "1.8.6"
4
+ VERSION = "1.8.7"
5
5
  end
6
6
  end
@@ -171,6 +171,8 @@ module Megam
171
171
  Megam::EventsVm
172
172
  when MEGAM_EVENTSVMCOLLECTION
173
173
  Megam::EventsVmCollection
174
+ when MEGAM_LICENSE
175
+ Megam::License
174
176
  when MEGAM_LICENSECOLLECTION
175
177
  Megam::LicenseCollection
176
178
  when MEGAM_EVENTSALL
@@ -1,12 +1,8 @@
1
1
  module Megam
2
2
  class License < Megam::RestAdapter
3
3
  def initialize(o)
4
- @id = nil
5
- @name = nil
6
4
  @org_id = nil
7
- @privatekey=nil
8
- @publickey=nil
9
- @created_at = nil
5
+ @data = nil
10
6
  @some_msg = {}
11
7
  super(o)
12
8
  end
@@ -15,22 +11,6 @@ module Megam
15
11
  self
16
12
  end
17
13
 
18
- def id(arg=nil)
19
- if arg != nil
20
- @id = arg
21
- else
22
- @id
23
- end
24
- end
25
-
26
- def name(arg=nil)
27
- if arg != nil
28
- @name = arg
29
- else
30
- @name
31
- end
32
- end
33
-
34
14
  def org_id(arg=nil)
35
15
  if arg != nil
36
16
  @org_id= arg
@@ -39,28 +19,14 @@ module Megam
39
19
  end
40
20
  end
41
21
 
42
- def privatekey(arg=nil)
43
- if arg != nil
44
- @privatekey = arg
45
- else
46
- @privatekey
47
- end
48
- end
49
22
 
50
- def publickey(arg=nil)
51
- if arg != nil
52
- @publickey = arg
53
- else
54
- @publickey
55
- end
56
- end
57
23
 
58
24
 
59
- def created_at(arg=nil)
25
+ def data(arg=nil)
60
26
  if arg != nil
61
- @created_at = arg
27
+ @data = arg
62
28
  else
63
- @created_at
29
+ @data
64
30
  end
65
31
  end
66
32
 
@@ -80,12 +46,8 @@ module Megam
80
46
  def to_hash
81
47
  index_hash = Hash.new
82
48
  index_hash["json_claz"] = self.class.name
83
- index_hash["id"] = id
84
- index_hash["name"] = name
85
49
  index_hash["org_id"] = org_id
86
- index_hash["privatekey"] = privatekey
87
- index_hash["publickey"] = publickey
88
- index_hash["created_at"] = created_at
50
+ index_hash["data"] = data
89
51
  index_hash
90
52
  end
91
53
 
@@ -97,12 +59,8 @@ module Megam
97
59
 
98
60
  def for_json
99
61
  result = {
100
- "id" => id,
101
- "name" => name,
102
62
  "org_id" => org_id,
103
- "privatekey" => privatekey,
104
- "publickey" => publickey,
105
- "created_at" => created_at
63
+ "data" => data
106
64
  }
107
65
  result
108
66
  end
@@ -110,11 +68,7 @@ module Megam
110
68
  #
111
69
  def self.json_create(o)
112
70
  license = new({})
113
- license.id(o["id"]) if o.has_key?("id")
114
- license.name(o["name"]) if o.has_key?("name")
115
- license.privatekey(o["privatekey"]) if o.has_key?("privatekey")
116
- license.publickey(o["publickey"]) if o.has_key?("publickey")
117
- license.created_at(o["created_at"]) if o.has_key?("created_at")
71
+ license.created_at(o["data"]) if o.has_key?("data")
118
72
  #success or error
119
73
  license.some_msg[:code] = o["code"] if o.has_key?("code")
120
74
  license.some_msg[:msg_type] = o["msg_type"] if o.has_key?("msg_type")
@@ -130,12 +84,8 @@ module Megam
130
84
  end
131
85
 
132
86
  def from_hash(o)
133
- @id = o[:id] if o.has_key?(:id)
134
- @name = o[:name] if o.has_key?(:name)
135
87
  @org_id = o[:org_id] if o.has_key?(:org_id)
136
- @privatekey = o[:privatekey] if o.has_key?(:privatekey)
137
- @publickey = o[:publickey] if o.has_key?(:publickey)
138
- @created_at = o[:created_at] if o.has_key?(:created_at)
88
+ @data = o[:data] if o.has_key?(:data)
139
89
  self
140
90
  end
141
91
 
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.8.6
4
+ version: 1.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajthilak, Kishorekumar Neelamegam, Ranjitha R, Vinodhini V, Rathish VBR, Rajesh