Module: Hyperwallet::Client::Payment
- Included in:
- Hyperwallet::Client
- Defined in:
- lib/hyperwallet/resources/payment.rb
Constant Summary collapse
- PATH =
'payments'.freeze
Instance Method Summary collapse
- #create_payment(amount:, client_payment_id:, destination_token:, program_token:, currency: 'USD', purpose: 'OTHER') ⇒ Object
- #find_payment(id) ⇒ Object
- #list_payments(options = {}) ⇒ Object
Instance Method Details
#create_payment(amount:, client_payment_id:, destination_token:, program_token:, currency: 'USD', purpose: 'OTHER') ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/hyperwallet/resources/payment.rb', line 14 def create_payment( amount:, client_payment_id:, destination_token:, program_token:, currency: 'USD', purpose: 'OTHER' ) = { amount: amount, clientPaymentId: client_payment_id, currency: currency, destinationToken: destination_token, programToken: program_token, purpose: purpose } post(payment_path, ) end |
#find_payment(id) ⇒ Object
10 11 12 |
# File 'lib/hyperwallet/resources/payment.rb', line 10 def find_payment(id) get(payment_path(id)) end |
#list_payments(options = {}) ⇒ Object
6 7 8 |
# File 'lib/hyperwallet/resources/payment.rb', line 6 def list_payments( = {}) get(payment_path, ) end |