module Revolut::Clients::Payments

Revolut Payments

Public Instance Methods

cancel_transaction(id) click to toggle source

Cancel transaction

@see revolutdev.github.io/business-api/?shell–production#cancel-payment

@param id [UUID] Id of transaction.

@return [Hash] Response from API.

# File lib/revolut/clients/payments.rb, line 56
def cancel_transaction(id)
  connection.delete("transaction/#{id}")
end
pay(params = {}) click to toggle source

Create payment

@see revolutdev.github.io/business-api/?shell–production#create-payment

@param params [Hash] A customizable set of params.

@return [Hash] Response from API.

# File lib/revolut/clients/payments.rb, line 25
def pay(params = {})
  connection.post('pay', params)
end
transaction(id, params = {}) click to toggle source

Get transaction

@see revolutdev.github.io/business-api/?shell–production#check-payment-status

@param id [UUID] Id of transaction.

@return [Hash] Response from API.

# File lib/revolut/clients/payments.rb, line 45
def transaction(id, params = {})
  connection.get("transaction/#{id}", params)
end
transactions() click to toggle source

List transactions

@see revolutdev.github.io/business-api/?shell–production#get-transactions

@return [Hash] Response from API.

# File lib/revolut/clients/payments.rb, line 34
def transactions
  connection.get('transactions')
end
transfer(params = {}) click to toggle source

Transfer payment

@see revolutdev.github.io/business-api/?shell–production#transfer

@param params [Hash] A customizable set of params.

@return [Hash] Response from API.

# File lib/revolut/clients/payments.rb, line 14
def transfer(params = {})
  connection.post('transfer', params)
end