Class: Omise::Forex

Inherits:
OmiseObject show all
Defined in:
lib/omise/forex.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OmiseObject

location, resource

Methods included from Attributes

#[], #as_json, #assign_attributes, #attributes, #destroyed?, #initialize, #key?, #location, #method_missing, #predicate?, #respond_to_missing?

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Omise::Attributes

Class Method Details

.from(currency, attributes = {}) ⇒ Object



7
8
9
# File 'lib/omise/forex.rb', line 7

def self.from(currency, attributes = {})
  new resource(location(currency.to_s.downcase), attributes).get(attributes)
end

Instance Method Details

#reload(attributes = {}) ⇒ Object



11
12
13
# File 'lib/omise/forex.rb', line 11

def reload(attributes = {})
  assign_attributes resource(attributes).get(attributes)
end