elmas 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Changelog.md +5 -0
- data/README.md +17 -1
- data/Rakefile +5 -5
- data/elmas.gemspec +1 -0
- data/lib/elmas/config.rb +2 -2
- data/lib/elmas/resources/bank_account.rb +3 -3
- data/lib/elmas/resources/base_entry_line.rb +1 -1
- data/lib/elmas/resources/sales_invoice.rb +1 -1
- data/lib/elmas/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 811521bb9a899d14a61d9cae66de40edbb39a8ea0e5b1950afa4251cf33afd73
|
4
|
+
data.tar.gz: bd849be962e1a9683cd76d4d9b9d99aa12ef818238cd6cbbf7b4f44184c1b9ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18830b61830ca08730fce161817b11c3b6754bf8b957f5596ea65774b7af35b639ceff5afba10dae746d52bb9940a39d2ca01ce821a57ae9ad9658f3f862a8ba
|
7
|
+
data.tar.gz: 4c711e2d9503a04ede952a53357e7cbb20a2d8ed2091ddeab201ca663fd197fd08b56f1b09e0a6681cbcfda61ef808e38b54cef5f3705cdedd3509631ecf9d5a
|
data/.travis.yml
CHANGED
data/Changelog.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 3.0.1
|
2
|
+
- Change of bank_name to bank_account_holder_name
|
3
|
+
- Readd journal because although not required, it should still be possible to set
|
4
|
+
- Add date to BaseEntryLine, which is parent for GeneralJournalEntryLine
|
5
|
+
|
1
6
|
## 3.0.0
|
2
7
|
- Deprecating auto authorize due to changes to login flow by Exact. https://support.exactonline.com/community/s/knowledge-base#All-All-HNO-Concept-general-security-gen-auth-totpc
|
3
8
|
- Upgrade Ruby Version.
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ Elmas means diamond, but in this case it's an API wrapper for [Exact Online](htt
|
|
9
9
|
|
10
10
|
# DISCLAIMER
|
11
11
|
|
12
|
-
__As of 25th of May, 2FA will be mandatory for all Exact Online accounts. Therefor the auto authorize method with which you could simulate
|
12
|
+
__As of 25th of May, 2FA will be mandatory for all Exact Online accounts. Therefor the auto authorize method with which you could simulate an App 2 App connection will not work anymore. Hoppinger is working on a new solution. The methods will stay available but probably won't work and will show a deprecation warning. [Read more about it here](https://support.exactonline.com/community/s/knowledge-base#All-All-HNO-Concept-general-security-gen-auth-totpc)__
|
13
13
|
|
14
14
|
### Contributers
|
15
15
|
|
@@ -59,6 +59,22 @@ Elmas.configure do |config|
|
|
59
59
|
end
|
60
60
|
```
|
61
61
|
|
62
|
+
You then have to retrieve an access token for the user you want to login with. You can setup a user facing OAUTH2 flow or set the `access_token` and/or refresh token on the go.
|
63
|
+
|
64
|
+
```ruby
|
65
|
+
Elmas.configure do |config|
|
66
|
+
config.access_token = "42"
|
67
|
+
config.refresh_token = "42"
|
68
|
+
end
|
69
|
+
```
|
70
|
+
|
71
|
+
Once you've set your access tokens you should be able to do requests. You'll need a division number, you can retrieve that with the following line of code:
|
72
|
+
|
73
|
+
```
|
74
|
+
get("/Current/Me", no_division: true).results.first.current_division
|
75
|
+
```
|
76
|
+
|
77
|
+
|
62
78
|
### Logger
|
63
79
|
|
64
80
|
The default logger is STDOUT. A custom logger can be be configured.
|
data/Rakefile
CHANGED
data/elmas.gemspec
CHANGED
data/lib/elmas/config.rb
CHANGED
@@ -8,7 +8,7 @@ module Elmas
|
|
8
8
|
module Config
|
9
9
|
include ThreadsafeAttributes
|
10
10
|
# An array of valid keys in the options hash
|
11
|
-
VALID_OPTIONS_KEYS = %i
|
11
|
+
VALID_OPTIONS_KEYS = %i(
|
12
12
|
access_token
|
13
13
|
adapter
|
14
14
|
client_id
|
@@ -22,7 +22,7 @@ module Elmas
|
|
22
22
|
base_url
|
23
23
|
refresh_token
|
24
24
|
logger
|
25
|
-
|
25
|
+
).freeze
|
26
26
|
|
27
27
|
# By default, don't set a user access token
|
28
28
|
DEFAULT_ACCESS_TOKEN = ""
|
@@ -23,9 +23,9 @@ module Elmas
|
|
23
23
|
%i[
|
24
24
|
id account account_name bank
|
25
25
|
bank_account bank_description
|
26
|
-
|
27
|
-
division format IBAN
|
28
|
-
type_description main
|
26
|
+
bank_account_holder_name BIC_code
|
27
|
+
description division format IBAN
|
28
|
+
type type_description main
|
29
29
|
]
|
30
30
|
end
|
31
31
|
end
|
@@ -13,7 +13,7 @@ module Elmas
|
|
13
13
|
serial_number asset cost_center cost_unit description notes
|
14
14
|
project quantity serial_number subscription tracking_number
|
15
15
|
VAT_amount_FC VAT_base_amount_DC VAT_base_amount_FC VAT_code
|
16
|
-
VAT_percentage account
|
16
|
+
VAT_percentage account date
|
17
17
|
]
|
18
18
|
end
|
19
19
|
end
|
@@ -17,7 +17,7 @@ module Elmas
|
|
17
17
|
|
18
18
|
def other_attributes
|
19
19
|
SHARED_SALES_ATTRIBUTES.inject(
|
20
|
-
%i[sales_invoice_lines due_date salesperson starter_sales_invoice_status type],
|
20
|
+
%i[sales_invoice_lines due_date salesperson starter_sales_invoice_status type journal],
|
21
21
|
:<<
|
22
22
|
)
|
23
23
|
end
|
data/lib/elmas/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elmas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marthyn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeresource
|