megam_api 1.10.1 → 1.10.2
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/megam/api/version.rb +1 -1
- data/lib/megam/core/balances.rb +11 -11
- data/lib/megam/core/credits.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cf8c2bbc3f6facb862aef851e1c15365cee6783
|
4
|
+
data.tar.gz: f8e3f32b9dddb6e471129c67c1ed0ca983f4002c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef599964612fbd19bb6fb6791e0debcdaa421ff264f8fa3de79a3e344d103fdf1bb4fac9650fb97a70f67ea0ed8405cb0ef458c2c7835c54375e79fbc143b0d9
|
7
|
+
data.tar.gz: 56f1d379b97710130de879ca8d0e8a13a96b6ae0d523f5e315b76676196718808618baa6c7e0cbfa4bc3e5e8c6cde2ad6860ebe8f67ad8b98d745c76f417342e
|
data/lib/megam/api/version.rb
CHANGED
data/lib/megam/core/balances.rb
CHANGED
@@ -2,7 +2,7 @@ module Megam
|
|
2
2
|
class Balances < Megam::RestAdapter
|
3
3
|
def initialize(o)
|
4
4
|
@id = nil
|
5
|
-
@
|
5
|
+
@account_id = nil
|
6
6
|
@credit = nil
|
7
7
|
@created_at = nil
|
8
8
|
@updated_at = nil
|
@@ -22,11 +22,11 @@ module Megam
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
def
|
25
|
+
def account_id(arg=nil)
|
26
26
|
if arg != nil
|
27
|
-
@
|
27
|
+
@account_id= arg
|
28
28
|
else
|
29
|
-
@
|
29
|
+
@account_id
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -72,7 +72,7 @@ module Megam
|
|
72
72
|
index_hash = Hash.new
|
73
73
|
index_hash["json_claz"] = self.class.name
|
74
74
|
index_hash["id"] = id
|
75
|
-
index_hash["
|
75
|
+
index_hash["account_id"] = account_id
|
76
76
|
index_hash["credit"] = credit
|
77
77
|
index_hash["created_at"] = created_at
|
78
78
|
index_hash["updated_at"] = updated_at
|
@@ -88,7 +88,7 @@ module Megam
|
|
88
88
|
def for_json
|
89
89
|
result = {
|
90
90
|
"id" => id,
|
91
|
-
"
|
91
|
+
"account_id" => account_id,
|
92
92
|
"credit" => credit,
|
93
93
|
"created_at" => created_at,
|
94
94
|
"updated_at" => updated_at
|
@@ -99,7 +99,7 @@ module Megam
|
|
99
99
|
def self.json_create(o)
|
100
100
|
balances = new({})
|
101
101
|
balances.id(o["id"]) if o.has_key?("id")
|
102
|
-
balances.
|
102
|
+
balances.account_id(o["account_id"]) if o.has_key?("account_id")
|
103
103
|
balances.credit(o["credit"]) if o.has_key?("credit")
|
104
104
|
balances.created_at(o["created_at"]) if o.has_key?("created_at")
|
105
105
|
balances.updated_at(o["updated_at"]) if o.has_key?("updated_at")
|
@@ -111,15 +111,15 @@ module Megam
|
|
111
111
|
balances
|
112
112
|
end
|
113
113
|
|
114
|
-
def self.from_hash(o
|
115
|
-
balances = self.new(
|
114
|
+
def self.from_hash(o)
|
115
|
+
balances = self.new(o)
|
116
116
|
balances.from_hash(o)
|
117
117
|
balances
|
118
118
|
end
|
119
119
|
|
120
120
|
def from_hash(o)
|
121
121
|
@id = o[:id] if o.has_key?(:id)
|
122
|
-
@
|
122
|
+
@account_id = o[:account_id] if o.has_key?(:account_id)
|
123
123
|
@credit = o[:credit] if o.has_key?(:credit)
|
124
124
|
@created_at = o[:created_at] if o.has_key?(:created_at)
|
125
125
|
@updated_at = o[:updated_at] if o.has_key?(:updated_at)
|
@@ -157,7 +157,7 @@ module Megam
|
|
157
157
|
end
|
158
158
|
|
159
159
|
def self.update(params)
|
160
|
-
asm = from_hash(params
|
160
|
+
asm = from_hash(params)
|
161
161
|
asm.update
|
162
162
|
end
|
163
163
|
|
data/lib/megam/core/credits.rb
CHANGED
@@ -99,8 +99,8 @@ module Megam
|
|
99
99
|
cr
|
100
100
|
end
|
101
101
|
|
102
|
-
def self.from_hash(o
|
103
|
-
cr = self.new(
|
102
|
+
def self.from_hash(o)
|
103
|
+
cr = self.new(o)
|
104
104
|
cr.from_hash(o)
|
105
105
|
cr
|
106
106
|
end
|
@@ -114,7 +114,7 @@ module Megam
|
|
114
114
|
end
|
115
115
|
|
116
116
|
def self.create(params)
|
117
|
-
acct = from_hash(params
|
117
|
+
acct = from_hash(params)
|
118
118
|
acct.create
|
119
119
|
end
|
120
120
|
|
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.10.
|
4
|
+
version: 1.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajthilak, Kishorekumar Neelamegam, Ranjitha R, Vinodhini V, Rathish VBR, Rajesh
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-01-
|
12
|
+
date: 2017-01-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: excon
|