Class: CloudPayments::Namespaces::Payments
- Inherits:
-
Base
- Object
- Base
- CloudPayments::Namespaces::Payments
show all
- Defined in:
- lib/cloud_payments/namespaces/payments.rb
Instance Attribute Summary
Attributes inherited from Base
#client, #parent_path
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #request, resource_name
Instance Method Details
#cards ⇒ Object
5
6
7
|
# File 'lib/cloud_payments/namespaces/payments.rb', line 5
def cards
Cards.new(client, resource_path)
end
|
#confirm(id, amount) ⇒ Object
13
14
15
|
# File 'lib/cloud_payments/namespaces/payments.rb', line 13
def confirm(id, amount)
request(:confirm, transaction_id: id, amount: amount)[:success]
end
|
#find(invoice_id) ⇒ Object
37
38
39
40
|
# File 'lib/cloud_payments/namespaces/payments.rb', line 37
def find(invoice_id)
response = request(:find, invoice_id: invoice_id)
Transaction.new(response[:model])
end
|
#get(id) ⇒ Object
32
33
34
35
|
# File 'lib/cloud_payments/namespaces/payments.rb', line 32
def get(id)
response = request(:get, transaction_id: id)
Transaction.new(response[:model])
end
|
#post3ds(id, pa_res) ⇒ Object
27
28
29
30
|
# File 'lib/cloud_payments/namespaces/payments.rb', line 27
def post3ds(id, pa_res)
response = request(:post3ds, transaction_id: id, pa_res: pa_res)
Transaction.new(response[:model])
end
|
#refund(id, amount) ⇒ Object
23
24
25
|
# File 'lib/cloud_payments/namespaces/payments.rb', line 23
def refund(id, amount)
request(:refund, transaction_id: id, amount: amount)[:success]
end
|
#tokens ⇒ Object
9
10
11
|
# File 'lib/cloud_payments/namespaces/payments.rb', line 9
def tokens
Tokens.new(client, resource_path)
end
|
#void(id) ⇒ Object
Also known as:
cancel
17
18
19
|
# File 'lib/cloud_payments/namespaces/payments.rb', line 17
def void(id)
request(:void, transaction_id: id)[:success]
end
|