Module: Revolut::Clients::Payments

Included in:
Revolut::Client
Defined in:
lib/revolut/clients/payments.rb

Overview

Revolut Payments

Instance Method Summary collapse

Instance Method Details

#cancel_transaction(id) ⇒ Hash

Cancel transaction

Parameters:

  • id (UUID)

    Id of transaction.

Returns:

  • (Hash)

    Response from API.

See Also:



56
57
58
# File 'lib/revolut/clients/payments.rb', line 56

def cancel_transaction(id)
  connection.delete("transaction/#{id}")
end

#pay(params = {}) ⇒ Hash

Create payment

Parameters:

  • params (Hash) (defaults to: {})

    A customizable set of params.

Returns:

  • (Hash)

    Response from API.

See Also:



25
26
27
# File 'lib/revolut/clients/payments.rb', line 25

def pay(params = {})
  connection.post('pay', params)
end

#transaction(id, params = {}) ⇒ Hash

Get transaction

Parameters:

  • id (UUID)

    Id of transaction.

Returns:

  • (Hash)

    Response from API.

See Also:



45
46
47
# File 'lib/revolut/clients/payments.rb', line 45

def transaction(id, params = {})
  connection.get("transaction/#{id}", params)
end

#transactionsHash

List transactions



34
35
36
# File 'lib/revolut/clients/payments.rb', line 34

def transactions
  connection.get('transactions')
end

#transfer(params = {}) ⇒ Hash

Transfer payment

Parameters:

  • params (Hash) (defaults to: {})

    A customizable set of params.

Returns:

  • (Hash)

    Response from API.

See Also:



14
15
16
# File 'lib/revolut/clients/payments.rb', line 14

def transfer(params = {})
  connection.post('transfer', params)
end