Sha256: 92aaef6b6dd04bef1fe7956118dbf7567fbb717e42de31474231485a1411133b

Contents?: true

Size: 341 Bytes

Versions: 9

Compression:

Stored size: 341 Bytes

Contents

require "omise/object"

module Omise
  class Forex < OmiseObject
    self.endpoint = "/forex"

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

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
omise-0.11.0 lib/omise/forex.rb
omise-0.10.1 lib/omise/forex.rb
omise-0.10.0 lib/omise/forex.rb
omise-0.9.1 lib/omise/forex.rb
omise-0.9.0 lib/omise/forex.rb
omise-0.7.2 lib/omise/forex.rb
omise-0.8.0 lib/omise/forex.rb
omise-0.7.1 lib/omise/forex.rb
omise-0.7.0 lib/omise/forex.rb