Class: KillBillClient::Model::Account
Constant Summary
collapse
- KILLBILL_API_ACCOUNTS_PREFIX =
"#{KILLBILL_API_PREFIX}/accounts"
Constants inherited
from Resource
Resource::KILLBILL_API_PREFIX
Instance Attribute Summary
Attributes inherited from Resource
#uri
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Resource
attribute, delete, from_json, from_response, get, head, instantiate_record_from_json, post, put, #refresh, #to_hash, #to_json
Class Method Details
.find_by_id(account_id, with_balance = false, with_balance_and_cba = false) ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/killbill_client/models/account.rb', line 7
def find_by_id(account_id, with_balance = false, with_balance_and_cba = false)
get "#{KILLBILL_API_ACCOUNTS_PREFIX}/#{account_id}",
{
:accountWithBalance => with_balance,
:accountWithBalanceAndCBA => with_balance_and_cba
}
end
|
Instance Method Details
#create(user = nil, reason = nil, comment = nil) ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/killbill_client/models/account.rb', line 16
def create(user = nil, reason = nil, = nil)
created_account = self.class.post KILLBILL_API_ACCOUNTS_PREFIX,
to_json,
{},
{
:user => user,
:reason => reason,
:comment => ,
}
created_account.refresh
end
|
#payments ⇒ Object
28
29
30
31
32
33
|
# File 'lib/killbill_client/models/account.rb', line 28
def payments
self.class.get "#{KILLBILL_API_ACCOUNTS_PREFIX}/#{account_id}/payments",
{},
{},
Payment
end
|