tipalti-ruby 0.5.3 → 0.6.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 +4 -4
- data/README.md +1 -0
- data/lib/tipalti-ruby/client.rb +4 -3
- data/lib/tipalti-ruby/connection.rb +3 -1
- data/lib/tipalti-ruby/version.rb +1 -1
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e700f387b8833327770a3fd1cf83108e0c77de2ddd275606b5869da0d08287a5
|
4
|
+
data.tar.gz: 5579044eb1e61b18e42834b49434b206aed985deed311fd4edbdf6c87aa0951c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d34c481efed6fb38e0be1c7cdd8814ea6e552eb83d8760d4e1bb275c9bd2d1cfbba6c5f5ee28639f30462a44714c2cba6f0105c5ce12f42e3d96b0778b8caeeb
|
7
|
+
data.tar.gz: 32cda43c687480a741f8a44f74dfec04f30a99a26e43e66e882098ed98ce6584bf674b0b49093a86d714da111c0f8d85f92f9166ca6bdc21a87e1c615aa69491
|
data/README.md
CHANGED
@@ -33,6 +33,7 @@ client = Tipalti::Client.new(
|
|
33
33
|
access_token: 'access_token', # Access token from authorization flow
|
34
34
|
refresh_token: 'refresh_token', # Refresh token from authorization flow
|
35
35
|
code_verifier: 'secret', # Code verifier from authorization flow
|
36
|
+
timeout: 30, # Optional setting for timeouts of all requests (default 60)
|
36
37
|
)
|
37
38
|
```
|
38
39
|
|
data/lib/tipalti-ruby/client.rb
CHANGED
@@ -14,13 +14,14 @@ module Tipalti
|
|
14
14
|
|
15
15
|
attr_accessor :sandbox
|
16
16
|
|
17
|
-
def initialize(client_id:, client_secret:, access_token:, refresh_token: nil, code_verifier: nil, sandbox: false) # rubocop:disable Metrics/ParameterLists
|
17
|
+
def initialize(client_id:, client_secret:, access_token:, refresh_token: nil, code_verifier: nil, sandbox: false, timeout: 60) # rubocop:disable Metrics/ParameterLists
|
18
18
|
@client_id = client_id
|
19
19
|
@client_secret = client_secret
|
20
20
|
@access_token = access_token
|
21
21
|
@refresh_token = refresh_token
|
22
22
|
@code_verifier = code_verifier
|
23
23
|
@sandbox = sandbox
|
24
|
+
@timeout = timeout
|
24
25
|
end
|
25
26
|
|
26
27
|
def base_url
|
@@ -28,11 +29,11 @@ module Tipalti
|
|
28
29
|
end
|
29
30
|
|
30
31
|
def connection
|
31
|
-
Connection.new(access_token: @access_token, url: base_url)
|
32
|
+
Connection.new(access_token: @access_token, url: base_url, timeout: @timeout)
|
32
33
|
end
|
33
34
|
|
34
35
|
def connection_token
|
35
|
-
Connection.new(url: token_url)
|
36
|
+
Connection.new(url: token_url, timeout: @timeout)
|
36
37
|
end
|
37
38
|
|
38
39
|
def token_url
|
@@ -6,8 +6,9 @@ module Tipalti
|
|
6
6
|
class Connection
|
7
7
|
attr_accessor :access_token, :url
|
8
8
|
|
9
|
-
def initialize(url:, access_token: nil)
|
9
|
+
def initialize(url:, access_token: nil, timeout: 60)
|
10
10
|
@access_token = access_token
|
11
|
+
@timeout = timeout
|
11
12
|
@url = url
|
12
13
|
end
|
13
14
|
|
@@ -56,6 +57,7 @@ module Tipalti
|
|
56
57
|
c.request :json, content_type: /\bjson$/
|
57
58
|
c.response :json, content_type: /\bjson$/
|
58
59
|
c.request :url_encoded, content_type: /x-www-form-urlencoded/
|
60
|
+
c.options.timeout = @timeout
|
59
61
|
c.adapter Faraday.default_adapter
|
60
62
|
end
|
61
63
|
end
|
data/lib/tipalti-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,19 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tipalti-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordan Ell
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-02-04 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: faraday
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '2.0'
|
17
19
|
- - ">="
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: 2.0.1
|
@@ -21,6 +23,9 @@ dependencies:
|
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
23
25
|
requirements:
|
26
|
+
- - "~>"
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '2.0'
|
24
29
|
- - ">="
|
25
30
|
- !ruby/object:Gem::Version
|
26
31
|
version: 2.0.1
|
@@ -69,10 +74,8 @@ licenses:
|
|
69
74
|
- MIT
|
70
75
|
metadata:
|
71
76
|
homepage_uri: https://github.com/riipen/tipalti-ruby
|
72
|
-
source_code_uri: https://github.com/riipen/tipalti-ruby
|
73
77
|
changelog_uri: https://github.com/riipen/tipalti-ruby/blob/master/CHANGELOG.md
|
74
78
|
rubygems_mfa_required: 'true'
|
75
|
-
post_install_message:
|
76
79
|
rdoc_options: []
|
77
80
|
require_paths:
|
78
81
|
- lib
|
@@ -87,8 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
90
|
- !ruby/object:Gem::Version
|
88
91
|
version: '0'
|
89
92
|
requirements: []
|
90
|
-
rubygems_version: 3.
|
91
|
-
signing_key:
|
93
|
+
rubygems_version: 3.6.3
|
92
94
|
specification_version: 4
|
93
95
|
summary: An API client for Tipalti in ruby.
|
94
96
|
test_files: []
|