Class: Revolut::ForeignExchange

Inherits:
Resource
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/revolut/resources/foreign_exchange.rb

Class Method Summary collapse

Methods inherited from Resource

coerce_with, create, delete, http_client, #initialize, list, retrieve, skip_coertion_for, #to_json, to_proc, update

Constructor Details

This class inherits a constructor from Revolut::Resource

Class Method Details

.exchange(**attrs) ⇒ Object



14
15
16
17
18
# File 'lib/revolut/resources/foreign_exchange.rb', line 14

def exchange(**attrs)
  response = http_client.post("/#{resource_name}", data: attrs)

  new(response.body)
end

.rate_resourceObject



23
24
25
# File 'lib/revolut/resources/foreign_exchange.rb', line 23

def rate_resource
  Revolut::Rate
end

.resource_nameObject



10
11
12
# File 'lib/revolut/resources/foreign_exchange.rb', line 10

def resource_name
  "exchange"
end