Class: KillBillClient::Model::Payment
Constant Summary
collapse
- KILLBILL_API_PAYMENTS_PREFIX =
"#{KILLBILL_API_PREFIX}/payments"
Constants inherited
from Resource
Resource::KILLBILL_API_PAGINATION_PREFIX, Resource::KILLBILL_API_PREFIX
Instance Attribute Summary
Attributes inherited from Resource
#clazz, #etag, #response, #session_id, #uri
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Resource
#==, #_to_hash, attribute, create_alias, delete, extract_session_id, from_json, from_response, get, has_many, has_one, #hash, head, instantiate_record_from_json, post, put, #refresh, #to_hash, #to_json
Class Method Details
.find_by_id(payment_id, with_refunds_and_chargebacks = false, options = {}) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/killbill_client/models/payment.rb', line 13
def find_by_id(payment_id, with_refunds_and_chargebacks = false, options = {})
get "#{KILLBILL_API_PAYMENTS_PREFIX}/#{payment_id}",
{
:withRefundsAndChargebacks => with_refunds_and_chargebacks
},
options
end
|
.find_in_batches(offset = 0, limit = 100, options = {}) ⇒ Object
.find_in_batches_by_search_key(search_key, offset = 0, limit = 100, options = {}) ⇒ Object
30
31
32
33
34
35
36
37
|
# File 'lib/killbill_client/models/payment.rb', line 30
def find_in_batches_by_search_key(search_key, offset = 0, limit = 100, options = {})
get "#{KILLBILL_API_PAYMENTS_PREFIX}/search/#{search_key}",
{
:offset => offset,
:limit => limit
},
options
end
|
Instance Method Details
#create(external_payment = false, user = nil, reason = nil, comment = nil, options = {}) ⇒ Object
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/killbill_client/models/payment.rb', line 40
def create(external_payment = false, user = nil, reason = nil, = nil, options = {})
self.class.post "#{Account::KILLBILL_API_ACCOUNTS_PREFIX}/#{account_id}/payments",
to_json,
{
:externalPayment => external_payment
},
{
:user => user,
:reason => reason,
:comment => ,
}.merge(options)
end
|