def call(call, access_token = false, params = {}, risk_token = false, client_ip = false)
      path = call.start_with?('/') ? call : call.prepend('/')
      url  = URI.parse(api_endpoint + path)

      call = Net::HTTP::Post.new(url.path, {
        'Content-Type' => 'application/json',
        'User-Agent'   => 'WePay Ruby SDK'
      })

      unless params.empty?
        call.body = params.to_json
      end

      if access_token then call.add_field('Authorization', "Bearer #{access_token}"); end
      if @api_version then call.add_field('Api-Version', @api_version); end
      if risk_token then call.add_field('WePay-Risk-Token', risk_token); end
      if client_ip then call.add_field('Client-IP', client_ip); end

      make_request(call, url)
    end
def call(call, access_token = false, params = {}, risk_token = false, client_ip = false)
      path = call.start_with?('/') ? call : call.prepend('/')
      url  = URI.parse(api_endpoint + path)

      call = Net::HTTP::Post.new(url.path, {
        'Content-Type' => 'application/json',
        'User-Agent'   => 'WePay Ruby SDK'
      })

      unless params.empty?
        call.body = params.to_json
      end

      if access_token then call.add_field('Authorization', "Bearer #{access_token}"); end
      if @api_version then call.add_field('Api-Version', @api_version); end
      if risk_token then call.add_field('WePay-Risk-Token', risk_token); end
      if client_ip then call.add_field('Client-IP', client_ip); end

      make_request(call, url)
    end
Execute a call to the WePay API.