Sha256: e6a745d4e20025ba675428996788e53c92acdb053d5f94548b0f65e3f148b6b5

Contents?: true

Size: 431 Bytes

Versions: 6

Compression:

Stored size: 431 Bytes

Contents

module OmiseGO
  class Client
    attr_accessor :config

    def initialize(options = nil)
      @config = load_config(options)
    end

    def call(path, params)
      request.call(path: path, body: params)
    end

    def request
      @request ||= Request.new(self)
    end

    private

    def load_config(options)
      return OmiseGO.configuration unless options
      Configuration.new(options.to_hash)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
omisego-0.12.0 lib/omisego/client.rb
omisego-0.11.0 lib/omisego/client.rb
omisego-0.10.0 lib/omisego/client.rb
omisego-0.9.6 lib/omisego/client.rb
omisego-0.9.5 lib/omisego/client.rb
omisego-0.9.4 lib/omisego/client.rb