Coder Social home page Coder Social logo

veryfi-ruby's Issues

Newly released 1.0.2 gem is not loading properly in rails project

Hi,
it seems that the latest 1.0.2 gem is not working properly:

  • removed gem "veryfi", git: "https://github.com/veryfi/veryfi-ruby.git" from my Gemfile
  • added gem "veryfi", "~> 1.0.2"
  • bundle update veryfi
  • new gem was installed
  • spec started to fail because the veryfi gem was not properly loaded
  • require 'veryfi' in the console fails as well

Same behavior/issue is present in freshly created rails app.

Thanks.

Martin

Version bump

It looks like the release action for 1.0.2 never pushed the update to rubygems. Wondering if someone can take a look and bump the version for the faraday dependency

Thanks

Get BadRequest response with Readme example

Given:

  • Have valid credentials on Veryfi.com and set them on the docker.env file
  • Create VeryfiClient instance with the next code
VeryfiClient = Veryfi::Client.new(
  client_id: ENV.fetch('VERYFI_CLIENT_ID', nil),
  client_secret: ENV.fetch('VERYFI_CLIENT_SECRET', nil),
  username: ENV.fetch('VERYFI_USERNAME', nil),
  api_key: ENV.fetch('VERYFI_API_KEY', nil),
)
  • set request parameters as described on README
params = {
  file_path: 'spec/fixtures/purchase_vendor_bills/vendor_bill.pdf',
  auto_delete: true,
  boost_mode: false,
  async: false,
  external_id: '123456789',
  max_pages_to_process: 10,
  tags: ['tag1'],
  categories: [
    'Advertising & Marketing',
    'Automotive'
  ]
}

Then make a request with the below code
VeryfiClient.document.process(params)

and got an error

Veryfi::Error::BadRequest: Bad Request
from /project_gems/ruby/2.7.0/gems/veryfi-0.1.3/lib/veryfi/request.rb:63:in `make_request'

The same result with only :file_path parameter

params = {
  file_path: 'spec/fixtures/purchase_vendor_bills/vendor_bill.pdf',
}

UPDATE:: Made some investigation.

API responses 400 when "file_name" POST-parameter hasn't extension.
For example,

{
  "file_name": "invoice",
  "file_data": "application/pdf;base64,JVBERi0xLjQKJcfsj6IKJSVJbnZvY......."
}

returns 400

But

{
  "file_name": "invoice.pdf",
  "file_data": "application/pdf;base64,JVBERi0xLjQKJcfsj6IKJSVJbnZvY........"
}

returns 201.

Delete request for documents uploaded via web interface fails

Hello,

we run into weird problem with files which were uploaded to veryfi directly via web interface.
We are able to retrieve them via api request but we are not able to delete them.

Delete request fails with internal server error:

.rvm/gems/ruby-3.1.1/gems/veryfi-0.1.4/lib/veryfi/request.rb:63:in `make_request': Internal Server Error (Veryfi::Error::InternalError)

Delete request for documents uploaded via api works ok.

Is this a known bug or feature?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.