Sha256: 1ce9a586ad2664f52db7dc50a89847706429e801c6e0895a589069e0cb5f629b

Contents?: true

Size: 372 Bytes

Versions: 16

Compression:

Stored size: 372 Bytes

Contents

module Eligible
  class Ocr < APIResource
    def self.setup_file(params)
      file = Util.value(params, :file)
      params[:file] = File.new(file, 'rb') if file.is_a?(String)
    end

    def self.post(params, api_key = nil)
      setup_file(params)
      send_request(:post, '/card_scans.json', api_key, params)
    end

    private_class_method :setup_file
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
eligible-2.9.17 lib/eligible/ocr.rb
eligible-2.9.16 lib/eligible/ocr.rb
eligible-2.9.15 lib/eligible/ocr.rb
eligible-2.9.14 lib/eligible/ocr.rb
eligible-2.9.13 lib/eligible/ocr.rb
eligible-2.9.12 lib/eligible/ocr.rb
eligible-2.9.11 lib/eligible/ocr.rb
eligible-2.9.10 lib/eligible/ocr.rb
eligible-2.9.9 lib/eligible/ocr.rb
eligible-2.9.8 lib/eligible/ocr.rb
eligible-2.9.7 lib/eligible/ocr.rb
eligible-2.9.6 lib/eligible/ocr.rb
eligible-2.9.5 lib/eligible/ocr.rb
eligible-2.9.4 lib/eligible/ocr.rb
eligible-2.9.3 lib/eligible/ocr.rb
eligible-2.9.2 lib/eligible/ocr.rb