Skip to content

Commit

Permalink
Change default API to V8 (#10)
Browse files Browse the repository at this point in the history
* Change default API to V8


Co-authored-by: Sebastian Carmona <sebastiancarmona@hotmail.ca>
  • Loading branch information
manycoding and Kaevan89 authored Apr 5, 2022
1 parent c7a3569 commit fd20fcf
Show file tree
Hide file tree
Showing 14 changed files with 535 additions and 193 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Release

on:
workflow_dispatch:
branches:
- main
release:
types: [created]

jobs:
publish:
Expand All @@ -12,11 +10,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
run: |
sudo apt install ruby-full=1:2.7+1
sudo gem install bundler:2.2
bundle _2.2.0_ install
sudo apt update
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
# runs 'bundle install' and caches installed gems automatically
bundler-cache: true
- name: Release Gem
uses: discourse/publish-rubygems-action@v2-beta
env:
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
name: Test

on: [push, pull_request]
on:
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby_version: [2.6, 2.7]
env:
CI: true
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
run: |
sudo apt install ruby-full=1:2.7+1
sudo gem install bundler:2.2
bundle _2.2.0_ install
sudo apt update
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
# runs 'bundle install' and caches installed gems automatically
bundler-cache: true
- name: Run CI scripts
run: bin/ci
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
veryfi (0.1.4)
veryfi (1.0.0)
base64 (~> 0.1)
faraday (~> 1.7)
openssl (~> 2.2)
Expand All @@ -21,7 +21,7 @@ GEM
rexml
diff-lcs (1.4.4)
docile (1.4.0)
faraday (1.9.3)
faraday (1.10.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
Expand All @@ -45,7 +45,7 @@ GEM
faraday-rack (1.0.0)
faraday-retry (1.0.3)
hashdiff (1.0.1)
ipaddr (1.2.3)
ipaddr (1.2.4)
method_source (1.0.0)
multipart-post (2.1.1)
openssl (2.2.1)
Expand Down Expand Up @@ -129,4 +129,4 @@ DEPENDENCIES
webmock (~> 3.14)

BUNDLED WITH
2.2.26
2.2.26
4 changes: 1 addition & 3 deletions lib/veryfi/api/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ def initialize(request)
end

def all(params = {})
response = request.get("/partner/documents/", params)

response.is_a?(Hash) ? [response] : response
request.get("/partner/documents/", params)
end

def process(raw_params)
Expand Down
1 change: 0 additions & 1 deletion lib/veryfi/api/line_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def initialize(request)

def all(document_id, params = {})
response = request.get("/partner/documents/#{document_id}/line-items/", params)

response["line_items"]
end

Expand Down
2 changes: 1 addition & 1 deletion lib/veryfi/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def initialize(
username:,
api_key:,
base_url: "https://api.veryfi.com/api/",
api_version: "v7",
api_version: "v8",
timeout: 20
)
@request = Veryfi::Request.new(client_id, client_secret, username, api_key, base_url, api_version, timeout)
Expand Down
2 changes: 1 addition & 1 deletion lib/veryfi/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Veryfi
VERSION = "0.1.4"
VERSION = "1.0.0"
end
Loading

0 comments on commit fd20fcf

Please sign in to comment.