caren-api 0.6.16 → 0.6.17
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/caren-api.gemspec +2 -2
- data/lib/caren/store/account.rb +14 -6
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.17
|
data/caren-api.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "caren-api"
|
8
|
-
s.version = "0.6.
|
8
|
+
s.version = "0.6.17"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andre Foeken"]
|
12
|
-
s.date = "2012-06-
|
12
|
+
s.date = "2012-06-21"
|
13
13
|
s.description = "You can use this gem as inspiration of the base of your connections with Caren."
|
14
14
|
s.email = "andre.foeken@nedap.com"
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/caren/store/account.rb
CHANGED
@@ -17,11 +17,11 @@ class Caren::Store::Account < Caren::Base
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def deposit_credits amount, session
|
20
|
-
self.class.from_xml session.post self.
|
20
|
+
self.class.from_xml session.post self.deposit_credits_url, amount_xml(amount)
|
21
21
|
end
|
22
22
|
|
23
23
|
def withdraw_credits amount, session
|
24
|
-
self.class.from_xml session.post self.
|
24
|
+
self.class.from_xml session.post self.withdraw_credits_url, amount_xml(amount)
|
25
25
|
end
|
26
26
|
|
27
27
|
def self.confirm_credits caren_event, session
|
@@ -49,12 +49,20 @@ class Caren::Store::Account < Caren::Base
|
|
49
49
|
builder.tag! "amount", amount
|
50
50
|
end
|
51
51
|
|
52
|
-
def
|
53
|
-
|
52
|
+
def deposit_credits_url
|
53
|
+
if id
|
54
|
+
"/api/pro/store/accounts/#{id}/deposit_credits"
|
55
|
+
else
|
56
|
+
"/api/pro/people/#{person_id}/accounts/#{billable_timeline_id}/deposit_credits"
|
57
|
+
end
|
54
58
|
end
|
55
59
|
|
56
|
-
def
|
57
|
-
|
60
|
+
def withdraw_credits_url
|
61
|
+
if id
|
62
|
+
"/api/pro/store/accounts/#{id}/withdraw_credits"
|
63
|
+
else
|
64
|
+
"/api/pro/people/#{person_id}/accounts/#{billable_timeline_id}/withdraw_credits"
|
65
|
+
end
|
58
66
|
end
|
59
67
|
|
60
68
|
def self.confirm_credits_url
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caren-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 37
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 17
|
10
|
+
version: 0.6.17
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andre Foeken
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-06-
|
18
|
+
date: 2012-06-21 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
requirement: &id001 !ruby/object:Gem::Requirement
|