Sha256: 25a0f262cb940a0ea9a4421e641d288eb4a86d2832aedfd86142dc573d1f4c99

Contents?: true

Size: 541 Bytes

Versions: 3

Compression:

Stored size: 541 Bytes

Contents

module Gocoin
  class Xrate

    attr_reader :client

    def initialize(client)
      @client = client
    end

    def get(options = {})
      @client.logger.debug 'Gocoin::Xrate#get method called.'

      headers = @client.headers.merge(options[:headers] || {})
      options = @client.options.merge options
      route = '/prices'

      config = {
        url: "https://#{@client.options[:xrate_host]}#{route}",
        method: 'GET',
        headers: {},
        options: {}
      }

      @client.raw_request config
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gocoin-0.1.4 lib/gocoin/xrate.rb
gocoin-0.1.3 lib/gocoin/xrate.rb
gocoin-0.1.2 lib/gocoin/xrate.rb