xero-ruby 2.8.1 → 2.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +152 -99
- data/lib/xero-ruby/api/accounting_api.rb +573 -346
- data/lib/xero-ruby/api/asset_api.rb +12 -6
- data/lib/xero-ruby/api/files_api.rb +34 -17
- data/lib/xero-ruby/api/payroll_au_api.rb +58 -29
- data/lib/xero-ruby/api/payroll_nz_api.rb +136 -68
- data/lib/xero-ruby/api/payroll_uk_api.rb +140 -70
- data/lib/xero-ruby/api/project_api.rb +26 -13
- data/lib/xero-ruby/api_client.rb +99 -14
- data/lib/xero-ruby/configuration.rb +14 -1
- data/lib/xero-ruby/models/payroll_au/deduction_line.rb +0 -5
- data/lib/xero-ruby/models/payroll_uk/salary_and_wage.rb +3 -2
- data/lib/xero-ruby/models/projects/time_entry.rb +3 -2
- data/lib/xero-ruby/version.rb +2 -2
- data/spec/api_client_spec.rb +174 -7
- data/spec/api_error_spec.rb +1 -1
- data/spec/configuration_spec.rb +17 -0
- data/spec/helper_methods_spec.rb +2 -2
- metadata +22 -2
data/spec/api_error_spec.rb
CHANGED
data/spec/configuration_spec.rb
CHANGED
@@ -16,4 +16,21 @@ describe XeroRuby::Configuration do
|
|
16
16
|
expect(config.payroll_uk_url).to eq('https://api.xero.com/payroll.xro/2.0/')
|
17
17
|
end
|
18
18
|
end
|
19
|
+
|
20
|
+
describe 'config' do
|
21
|
+
it 'should apply the default configuration options' do
|
22
|
+
client = XeroRuby::ApiClient.new(credentials: {})
|
23
|
+
expect(client.config.login_url).to eq('https://login.xero.com/identity/connect/authorize')
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'should allow you to overwrite the default configuration options' do
|
27
|
+
client = XeroRuby::ApiClient.new(credentials: {}, config: {login_url: 'ngrok.login.xero.test'})
|
28
|
+
expect(client.config.login_url).to eq('ngrok.login.xero.test')
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'should allow you to set the timeout config option' do
|
32
|
+
client = XeroRuby::ApiClient.new(credentials: {}, config: {timeout: 30})
|
33
|
+
expect(client.config.timeout).to eq(30)
|
34
|
+
end
|
35
|
+
end
|
19
36
|
end
|
data/spec/helper_methods_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xero-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xero API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -50,6 +50,26 @@ dependencies:
|
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 2.1.0
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: json-jwt
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '1.5'
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 1.5.2
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.5'
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 1.5.2
|
53
73
|
- !ruby/object:Gem::Dependency
|
54
74
|
name: rspec
|
55
75
|
requirement: !ruby/object:Gem::Requirement
|