class JumioRock::PerformNetverifyParams
Constants
- IMAGE_MAX_SIZE
Attributes
callbackUrl[RW]
frontsideImage[R]
merchantIdScanReference[R]
Public Class Methods
new(scan_reference, front_side_image_path)
click to toggle source
# File lib/jumio_rock/perform_netverify_params.rb, line 10 def initialize(scan_reference, front_side_image_path) @merchantIdScanReference = scan_reference encode_image front_side_image_path end
Private Instance Methods
check_image_size(bytesize)
click to toggle source
# File lib/jumio_rock/perform_netverify_params.rb, line 28 def check_image_size(bytesize) bytesize < IMAGE_MAX_SIZE end
encode(str)
click to toggle source
# File lib/jumio_rock/perform_netverify_params.rb, line 22 def encode(str) image_base64 = Base64.encode64(str) raise "image max size 5MB" unless check_image_size(image_base64.bytesize()) @frontsideImage = image_base64.gsub(/\n/, "") end
encode_image(path)
click to toggle source
# File lib/jumio_rock/perform_netverify_params.rb, line 17 def encode_image(path) file = File.read(path) encode(file) end