invofox-api-ruby 0.1.2 → 0.1.4

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: eae8ebc082cdba1058d0753a39ff406d14dc0bec4f74434a2210db78287e2300
4
- data.tar.gz: 6294b3ab459a7548702086d2cac5b1bdb0f53e71304d5b43e4de227a2cfd2c51
3
+ metadata.gz: d52c5dc69c060c9f00045f07a9b1fb9ad556721093df1ee43d29a5a18813643e
4
+ data.tar.gz: 0e4106a5f3c29d22da4077bd401195e80ec7767a4167809646b44160dce46ac1
5
5
  SHA512:
6
- metadata.gz: dea3aaf07d57a3a617c9cd468d0e6861d3f547cb6f369a2cf2ce0425a8d401e83924c960d395b79c5d7e1a5c2306a3df15a4b79d36d834dc14262a7e708fa590
7
- data.tar.gz: 41300f3574b9bbaec5529ebcdcfe035aa71c60bbc32a5c749c2409763059049617f6ddf70e3acb6c9e4347fc5ae33d081d759ff8fbca9f1673f514a730511cf1
6
+ metadata.gz: e8c6b35acce7c295553f96425f924d70f8da1f713812ca97eaa0000d8f292a76866de1c5684451d045fc5984255aa5d2f229f8617f5496580bc99509a08aea78
7
+ data.tar.gz: 207d861e0fe33a1337cc48e2af1e42f6bacdd277e680063afc74b22762c5d5254d82a325ccfc73db85127bf24e343019fd5df2dc97e0cece8788f0ab299c0965
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- invofox-api-ruby (0.1.2)
4
+ invofox-api-ruby (0.1.4)
5
5
  rest-client (~> 2.0.2)
6
6
 
7
7
  GEM
@@ -20,7 +20,7 @@ GEM
20
20
  json (2.6.2)
21
21
  mime-types (3.5.2)
22
22
  mime-types-data (~> 3.2015)
23
- mime-types-data (3.2024.0305)
23
+ mime-types-data (3.2024.0507)
24
24
  netrc (0.11.0)
25
25
  parallel (1.22.1)
26
26
  parser (3.1.2.1)
data/README.md CHANGED
@@ -33,6 +33,8 @@ You can set a `logger` as well.
33
33
  Changelog
34
34
  ---------
35
35
 
36
+ * v.0.1.4 Ensure using JSON as content type.
37
+ * v.0.1.3 Increase timeout to 5m.
36
38
  * v.0.1.2 Added support for companies' list endpoint.
37
39
  * v.0.1.1 Added support for documents' update_type endpoint.
38
40
  * v.0.1.0 First vull version, including resource wrapping for companies (get, create and update), documents (get, bulk and update) and load batches (get), plus logger integration.
data/lib/invofox/base.rb CHANGED
@@ -18,6 +18,7 @@ module Invofox
18
18
  # Prepare headers & params
19
19
  request_headers = {
20
20
  accept: 'application/json',
21
+ content_type: 'application/json',
21
22
  "x-api-key" => Invofox.configuration.api_key
22
23
  }
23
24
 
@@ -25,10 +26,11 @@ module Invofox
25
26
  headers: request_headers,
26
27
  method: method,
27
28
  url: url,
29
+ timeout: 60 * 5 # a 5m timeout should be enough for anything
28
30
  }
29
31
 
30
32
  if method == :post || method == :put
31
- request_params[:payload] = params
33
+ request_params[:payload] = params.to_json
32
34
  else
33
35
  request_headers[:params] = params
34
36
  end
@@ -1,3 +1,3 @@
1
1
  module Invofox
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invofox-api-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Albert Bellonch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-18 00:00:00.000000000 Z
11
+ date: 2024-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client