caren-api 0.6.12 → 0.6.13
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.
- data/VERSION +1 -1
- data/caren-api.gemspec +2 -2
- data/lib/caren/caren.rb +3 -1
- data/lib/caren/store/account.rb +8 -0
- metadata +4 -4
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.6.
|
|
1
|
+
0.6.13
|
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.13"
|
|
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-14"
|
|
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/caren.rb
CHANGED
|
@@ -123,7 +123,9 @@ module Caren
|
|
|
123
123
|
:billables => Caren::Store::Billable,
|
|
124
124
|
:invoices => Caren::Store::Invoice,
|
|
125
125
|
:payments => Caren::Store::Payment,
|
|
126
|
-
:line_items => Caren::Store::LineItem
|
|
126
|
+
:line_items => Caren::Store::LineItem,
|
|
127
|
+
:accounts => Caren::Store::Account,
|
|
128
|
+
:account_entries => Caren::Store::AccountEntries
|
|
127
129
|
}
|
|
128
130
|
end
|
|
129
131
|
|
data/lib/caren/store/account.rb
CHANGED
|
@@ -24,6 +24,10 @@ class Caren::Store::Account < Caren::Base
|
|
|
24
24
|
self.class.from_xml session.post self.class.withdraw_credits_url(self.id), amount_xml(amount)
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
def self.confirm_credits caren_event, session
|
|
28
|
+
from_xml session.post confirm_credits_url, caren_event.to_xml
|
|
29
|
+
end
|
|
30
|
+
|
|
27
31
|
def self.reserve_credits caren_event, session
|
|
28
32
|
from_xml session.post reserve_credits_url, caren_event.to_xml
|
|
29
33
|
end
|
|
@@ -52,6 +56,10 @@ class Caren::Store::Account < Caren::Base
|
|
|
52
56
|
def self.withdraw_credits_url id
|
|
53
57
|
"/api/pro/store/accounts/#{id}/withdraw_credits"
|
|
54
58
|
end
|
|
59
|
+
|
|
60
|
+
def self.confirm_credits_url
|
|
61
|
+
"/api/pro/store/accounts/confirm_credits"
|
|
62
|
+
end
|
|
55
63
|
|
|
56
64
|
def self.reserve_credits_url
|
|
57
65
|
"/api/pro/store/accounts/reserve_credits"
|
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: 29
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 6
|
|
9
|
-
-
|
|
10
|
-
version: 0.6.
|
|
9
|
+
- 13
|
|
10
|
+
version: 0.6.13
|
|
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-14 00:00:00 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
21
|
requirement: &id001 !ruby/object:Gem::Requirement
|