class CheckIssuing::Request

Public Instance Methods

delete(path, options={}) click to toggle source
# File lib/check_issuing/request.rb, line 23
def delete(path, options={})
  set_auth(options)
  @response = self.class.delete(CheckIssuing.endpoint + path, options)
end
get(path, options={}) click to toggle source
# File lib/check_issuing/request.rb, line 8
def get(path, options={})
  set_auth(options)
  @response = self.class.get(CheckIssuing.endpoint + path, options)
end
parsed_response() click to toggle source
# File lib/check_issuing/request.rb, line 32
def parsed_response
  self.response.parsed_response if self.response.present?
end
post(path, options={}) click to toggle source
# File lib/check_issuing/request.rb, line 13
def post(path, options={})
  set_auth(options)
  @response = self.class.post(CheckIssuing.endpoint + path, options)
end
put(path, options={}) click to toggle source
# File lib/check_issuing/request.rb, line 18
def put(path, options={})
  set_auth(options)
  @response = self.class.put(CheckIssuing.endpoint + path, options)
end
response() click to toggle source
# File lib/check_issuing/request.rb, line 28
def response
  @response
end

Private Instance Methods

set_auth(options) click to toggle source
# File lib/check_issuing/request.rb, line 38
def set_auth(options)
  options[:body] ||= {}
  options[:body][:akey] ||= CheckIssuing.api_key
  options[:body][:client_id] ||= CheckIssuing.client_id


  options[:http_proxyaddr] = CheckIssuing.proxy_host if CheckIssuing.proxy_host.present?
  options[:http_proxyport] = CheckIssuing.proxy_port if CheckIssuing.proxy_port.present?
  options[:http_proxyuser] = CheckIssuing.proxy_user if CheckIssuing.proxy_user.present?
  options[:http_proxypass] = CheckIssuing.proxy_password if CheckIssuing.proxy_user.present?
end