Sha256: 47d66ddf739bf0fcd551a37bff23451bea75ca6091d0cdd3e5c38e20bdba3a15

Contents?: true

Size: 571 Bytes

Versions: 1

Compression:

Stored size: 571 Bytes

Contents

require "MagentoTwo/configuration"
require "MagentoTwo/version"

module MagentoTwo
  class Client
    attr_accessor :endpoint

    def initialize
      @version = MagentoTwo::VERSION
      @endpoint = MagentoTwo.configuration.host
      @connection = Faraday.new(
        url: @endpoint,
        headers: {
          'Content-Type' => 'application/json',
          'Authorization' => "Bearer #{MagentoTwo.configuration.token}",
          'User-Agent' => "MagentoTwo/#{@version} (A Magento 2 API Wrapper on Ruby))"
        }
      )
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
MagentoTwo-0.1.0 lib/MagentoTwo/client.rb