class AdvisorsCommandClient::Connection

Public Class Methods

new(username, api_key, url) click to toggle source
# File lib/advisors_command_client/connection.rb, line 11
def initialize(username, api_key, url)
  @username = username
  @api_key = api_key
  @url = url
end

Public Instance Methods

build() click to toggle source
# File lib/advisors_command_client/connection.rb, line 17
def build
  Faraday.new(@url) do |faraday|
    faraday.request :json
    faraday.use AdvisorsCommandClient::Connection::WsseAuth, @username, @api_key
    faraday.adapter :typhoeus
    faraday.response :json, content_type: /\bjson$/
  end
end