megam_api 0.68 → 0.69

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: 47bf2e1ae7eb471e7892ab92823de85edf1c1f09
4
- data.tar.gz: fbf2ba8e1e47c22b4055624b835163c466b6646a
3
+ metadata.gz: e15d29936192b95962d7f3b42696e9565f263da2
4
+ data.tar.gz: afa01f4b4c89107eee768d1712030c1e74cba2ca
5
5
  SHA512:
6
- metadata.gz: 90862d7bc0c48869701c7ff2b5b8520db8ba2446cd84fb29a5bf4c3fd966b30cbacb5f13762444784b04304f2887e570319e92243738acc29b1ba23c8e59a52d
7
- data.tar.gz: 5226d61ca6c178ad863999667a9cc7542aa799bca7e6e81089766c16448b0728ed5923dcb707b358db0f3519ee46d58c7723e3879e71233a04cfa2b5a0365796
6
+ metadata.gz: 67eebae80976dfb24ec61aeda4d5dfa737e5c88f68fe719b0c28db004cbd4b68aa9110e8e94abcd1bf504daf59a2ae1e5a4d25598e792f834ff968f5a06a3d50
7
+ data.tar.gz: d29fd9e6c401f98397687b772d492b809c95f0623db3e884e4dbf2f7feaee83a093b80e7108b6615967203ed493d4513ba938c9539464e1272debcbcbe15f2e3
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "0.68"
3
+ VERSION = "0.69"
4
4
  end
5
5
  end
@@ -20,12 +20,11 @@ module Megam
20
20
  def initialize(email=nil, api_key=nil, host=nil)
21
21
  @id = nil
22
22
  @name = nil
23
- @catalog = {}
24
- @plans=nil
25
- @cattype =nil
26
- @predef =nil
27
- @some_msg = {}
28
- @status = nil
23
+ @cattype = nil
24
+ @order = nil
25
+ @image = nil
26
+ @url = nil
27
+ @plans= nil
29
28
  @created_at = nil
30
29
  super(email, api_key, host)
31
30
  end
@@ -43,14 +42,6 @@ module Megam
43
42
  end
44
43
  end
45
44
 
46
- def catalog(arg=nil)
47
- if arg != nil
48
- @catalog = arg
49
- else
50
- @catalog
51
- end
52
- end
53
-
54
45
  def id(arg=nil)
55
46
  if arg != nil
56
47
  @id = arg
@@ -59,7 +50,6 @@ module Megam
59
50
  end
60
51
  end
61
52
 
62
-
63
53
  def plans(arg=nil)
64
54
  if arg != nil
65
55
  @plans = arg
@@ -68,28 +58,35 @@ module Megam
68
58
  end
69
59
  end
70
60
 
61
+ def cattype(arg=nil)
62
+ if arg != nil
63
+ @cattype = arg
64
+ else
65
+ @cattype
66
+ end
67
+ end
71
68
 
72
- def predef(arg=nil)
69
+ def order(arg=nil)
73
70
  if arg != nil
74
- @predef = arg
71
+ @order = arg
75
72
  else
76
- @predef
73
+ @order
77
74
  end
78
75
  end
79
76
 
80
- def cattype(arg=nil)
77
+ def image(arg=nil)
81
78
  if arg != nil
82
- @cattype = arg
79
+ @image = arg
83
80
  else
84
- @cattype
81
+ @image
85
82
  end
86
83
  end
87
84
 
88
- def status(arg=nil)
85
+ def url(arg=nil)
89
86
  if arg != nil
90
- @status = arg
87
+ @url = arg
91
88
  else
92
- @status
89
+ @url
93
90
  end
94
91
  end
95
92
 
@@ -119,12 +116,11 @@ module Megam
119
116
  index_hash["json_claz"] = self.class.name
120
117
  index_hash["id"] = id
121
118
  index_hash["name"] = name
122
- index_hash["catalog"] = catalog
123
- index_hash["plans"] = plans
124
119
  index_hash["cattype"] = cattype
125
- index_hash["predef"] = predef
126
- index_hash["status"] = status
127
- index_hash["some_msg"] = some_msg
120
+ index_hash["order"] = order
121
+ index_hash["image"] = image
122
+ index_hash["url"] = url
123
+ index_hash["plans"] = plans
128
124
  index_hash["created_at"] = created_at
129
125
  index_hash
130
126
  end
@@ -139,11 +135,11 @@ module Megam
139
135
  result = {
140
136
  "id" => id,
141
137
  "name" => name,
142
- "catalog" => catalog,
143
- "plans" => plans,
144
138
  "cattype" => cattype,
145
- "predef" => predef,
146
- "status" => status,
139
+ "order" => order,
140
+ "image" => image,
141
+ "url" => url,
142
+ "plans" => plans,
147
143
  "created_at" => created_at
148
144
  }
149
145
  result
@@ -153,25 +149,13 @@ module Megam
153
149
  app = new
154
150
  app.id(o["id"]) if o.has_key?("id")
155
151
  app.name(o["name"]) if o.has_key?("name")
156
-
157
- ct = o["catalog"]
158
- app.catalog[:logo] = ct["logo"] if ct && ct.has_key?("logo")
159
- app.catalog[:category] = ct["category"] if ct && ct.has_key?("category")
160
- app.catalog[:description] = ct["description"] if ct && ct.has_key?("description")
161
- app.catalog[:port] = ct["port"] if ct && ct.has_key?("port")
162
-
163
- app.plans(o["plans"]) if o.has_key?("plans")
164
152
  app.cattype(o["cattype"]) if o.has_key?("cattype")
165
- app.predef(o["predef"]) if o.has_key?("predef")
166
- app.status(o["status"]) if o.has_key?("status")
153
+ app.order(o["order"]) if o.has_key?("order")
154
+ app.image(o["image"]) if o.has_key?("image")
155
+ app.url(o["url"]) if o.has_key?("url")
156
+ app.plans(o["plans"]) if o.has_key?("plans")
167
157
  app.created_at(o["created_at"]) if o.has_key?("created_at")
168
158
 
169
- #success or error
170
- app.some_msg[:code] = o["code"] if o.has_key?("code")
171
- app.some_msg[:msg_type] = o["msg_type"] if o.has_key?("msg_type")
172
- app.some_msg[:msg]= o["msg"] if o.has_key?("msg")
173
- app.some_msg[:links] = o["links"] if o.has_key?("links")
174
-
175
159
  app
176
160
  end
177
161
 
@@ -184,11 +168,11 @@ module Megam
184
168
  def from_hash(o)
185
169
  @name = o["name"] if o.has_key?("name")
186
170
  @id = o["id"] if o.has_key?("id")
187
- @catalog = o["catalog"] if o.has_key?("catalog")
188
- @plans = o["plans"] if o.has_key?("plans")
189
171
  @cattype = o["cattype"] if o.has_key?("cattype")
190
- @predef = o["predef"] if o.has_key?("predef")
191
- @status = o["status"] if o.has_key?("status")
172
+ @order = o["order"] if o.has_key?("order")
173
+ @image = o["image"] if o.has_key?("image")
174
+ @url = o["url"] if o.has_key?("url")
175
+ @plans = o["plans"] if o.has_key?("plans")
192
176
  @created_at = o["created_at"] if o.has_key?("created_at")
193
177
  self
194
178
  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: '0.68'
4
+ version: '0.69'
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: 2015-09-21 00:00:00.000000000 Z
12
+ date: 2015-09-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: excon