class Eligible::Ocr

Public Class Methods

post(params, api_key = nil) click to toggle source
# File lib/eligible/ocr.rb, line 8
def self.post(params, api_key = nil)
  setup_file(params)
  send_request(:post, '/card_scans.json', api_key, params)
end

Private Class Methods

setup_file(params) click to toggle source
# File lib/eligible/ocr.rb, line 3
def self.setup_file(params)
  file = Util.value(params, :file)
  params[:file] = File.new(file, 'rb') if file.is_a?(String)
end