Class: Caren::Store::AccountEntry
- Inherits:
-
Base
- Object
- Base
- Caren::Store::AccountEntry
show all
- Defined in:
- lib/caren/store/account_entry.rb
Instance Attribute Summary
Attributes inherited from Base
#attributes, #original_xml
Class Method Summary
collapse
Methods inherited from Base
#as_xml, from_xml, hash_from_image, init_dependent_objects, #initialize, #node_root, search_url, #to_xml, to_xml
Constructor Details
This class inherits a constructor from Caren::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Caren::Base
Class Method Details
.all(account_id, session) ⇒ Object
18
19
20
|
# File 'lib/caren/store/account_entry.rb', line 18
def self.all account_id, session
from_xml session.get(self.resource_url(account_id))
end
|
.array_root ⇒ Object
22
23
24
|
# File 'lib/caren/store/account_entry.rb', line 22
def self.array_root
:account_entries
end
|
.find(account_id, id, session) ⇒ Object
14
15
16
|
# File 'lib/caren/store/account_entry.rb', line 14
def self.find account_id, id, session
from_xml session.get(self.resource_url(account_id,id))
end
|
.keys ⇒ Object
3
4
5
6
7
8
9
10
11
12
|
# File 'lib/caren/store/account_entry.rb', line 3
def self.keys
[:id, :account_id, :amount, :reserved, :source_id, :source_type, :external_source_id ] + super
end
|
.node_root ⇒ Object
26
27
28
|
# File 'lib/caren/store/account_entry.rb', line 26
def self.node_root
:account_entry
end
|
.resource_location ⇒ Object
30
31
32
|
# File 'lib/caren/store/account_entry.rb', line 30
def self.resource_location
"/api/pro/store/account/%i/account_entries"
end
|