veryfi 0.1.4 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2dfb0025549fca927a9ac0badcd5cb0aca467bb4bd67cd899b715a01499fbdbd
4
- data.tar.gz: ad4805a5f6729fbad09d3d5b0c9f3454182dbcc8c010b9ad534bff9943c220bd
3
+ metadata.gz: 6a8a7ef98c7b70d163aa1913799e26981c1a3297e510cf561c1ad7295791c037
4
+ data.tar.gz: 2fadf010651b719a5849c229f0db4ade66332dc93fc789e28ca7c76c4f53952a
5
5
  SHA512:
6
- metadata.gz: 6cddf104265757d407e4523359fa6b0aa1a0674527b723cd4ce67b1dcdfb0707089edf7dccc591fc931aeb9e7f880438077760f51d497ba20221d17da7642140
7
- data.tar.gz: 998431b237b95ef26ab665f79792a3ae7057fb0cfef5d6a31f8697010d1849f2257eda0bf5968995535d49aef7e0f4b3b1f170ab1ecddc14f4e0e9d945cee5bc
6
+ metadata.gz: a1c27daa4725f3e8c112fbbb49aee4f0b724aede5135152c5879ae4bcfd6c2747764dbf891a02e0199a64511b99ca0499d70315a64dfa1859153c53617f780e3
7
+ data.tar.gz: e600661fdde8df1cfa89c7d804cb7a32a215a53e3d59522eeea8ed012a654c4f693ad85207efa532e5fc6d3f80efa32eda450d49c96fbd8510a8430027ef21a9
@@ -1,9 +1,7 @@
1
1
  name: Release
2
-
3
2
  on:
4
- workflow_dispatch:
5
- branches:
6
- - main
3
+ release:
4
+ types: [created]
7
5
 
8
6
  jobs:
9
7
  publish:
@@ -12,11 +10,11 @@ jobs:
12
10
  steps:
13
11
  - uses: actions/checkout@v2
14
12
  - name: Set up Ruby
15
- run: |
16
- sudo apt install ruby-full=1:2.7+1
17
- sudo gem install bundler:2.2
18
- bundle _2.2.0_ install
19
- sudo apt update
13
+ uses: ruby/setup-ruby@v1
14
+ with:
15
+ ruby-version: 2.7
16
+ # runs 'bundle install' and caches installed gems automatically
17
+ bundler-cache: true
20
18
  - name: Release Gem
21
19
  uses: discourse/publish-rubygems-action@v2-beta
22
20
  env:
@@ -1,19 +1,24 @@
1
1
  name: Test
2
2
 
3
- on: [push, pull_request]
3
+ on:
4
+ pull_request:
5
+ branches: [ main ]
4
6
 
5
7
  jobs:
6
8
  build:
7
9
  runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ ruby_version: [2.6, 2.7]
8
13
  env:
9
14
  CI: true
10
15
  steps:
11
16
  - uses: actions/checkout@v2
12
17
  - name: Set up Ruby
13
- run: |
14
- sudo apt install ruby-full=1:2.7+1
15
- sudo gem install bundler:2.2
16
- bundle _2.2.0_ install
17
- sudo apt update
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: ${{ matrix.ruby_version }}
21
+ # runs 'bundle install' and caches installed gems automatically
22
+ bundler-cache: true
18
23
  - name: Run CI scripts
19
24
  run: bin/ci
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- veryfi (0.1.4)
4
+ veryfi (1.0.0)
5
5
  base64 (~> 0.1)
6
6
  faraday (~> 1.7)
7
7
  openssl (~> 2.2)
@@ -21,7 +21,7 @@ GEM
21
21
  rexml
22
22
  diff-lcs (1.4.4)
23
23
  docile (1.4.0)
24
- faraday (1.9.3)
24
+ faraday (1.10.0)
25
25
  faraday-em_http (~> 1.0)
26
26
  faraday-em_synchrony (~> 1.0)
27
27
  faraday-excon (~> 1.1)
@@ -45,7 +45,7 @@ GEM
45
45
  faraday-rack (1.0.0)
46
46
  faraday-retry (1.0.3)
47
47
  hashdiff (1.0.1)
48
- ipaddr (1.2.3)
48
+ ipaddr (1.2.4)
49
49
  method_source (1.0.0)
50
50
  multipart-post (2.1.1)
51
51
  openssl (2.2.1)
@@ -30,17 +30,15 @@ module Veryfi
30
30
  end
31
31
 
32
32
  def all(params = {})
33
- response = request.get("/partner/documents/", params)
34
-
35
- response.is_a?(Hash) ? [response] : response
33
+ request.get("/partner/documents/", params)
36
34
  end
37
35
 
38
36
  def process(raw_params)
39
37
  params = setup_create_params(raw_params)
40
38
 
41
39
  file_content = File.read(params[:file_path])
42
- file_name = File.basename(params[:file_path])
43
40
  file_data = Base64.encode64(file_content).gsub("\n", "")
41
+ file_name = params[:file_name] || File.basename(params[:file_path], ".*")
44
42
 
45
43
  payload = params.reject { |k| k == :file_path }.merge(
46
44
  file_name: file_name,
@@ -11,7 +11,6 @@ module Veryfi
11
11
 
12
12
  def all(document_id, params = {})
13
13
  response = request.get("/partner/documents/#{document_id}/line-items/", params)
14
-
15
14
  response["line_items"]
16
15
  end
17
16
 
data/lib/veryfi/client.rb CHANGED
@@ -10,7 +10,7 @@ module Veryfi
10
10
  username:,
11
11
  api_key:,
12
12
  base_url: "https://api.veryfi.com/api/",
13
- api_version: "v7",
13
+ api_version: "v8",
14
14
  timeout: 20
15
15
  )
16
16
  @request = Veryfi::Request.new(client_id, client_secret, username, api_key, base_url, api_version, timeout)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Veryfi
4
- VERSION = "0.1.4"
4
+ VERSION = "1.0.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: veryfi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Veryfi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-19 00:00:00.000000000 Z
11
+ date: 2022-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64