elmas 3.0.0 → 3.0.1

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: 9bf17c014442114f64d14b2cc50b88279eba0b6249c7b08f5d9e7611cce0f078
4
- data.tar.gz: 526d26398ef1c5fdfdbdd6f7430ae37d0530ef01d09cbfb78365ac44f2945120
3
+ metadata.gz: 811521bb9a899d14a61d9cae66de40edbb39a8ea0e5b1950afa4251cf33afd73
4
+ data.tar.gz: bd849be962e1a9683cd76d4d9b9d99aa12ef818238cd6cbbf7b4f44184c1b9ab
5
5
  SHA512:
6
- metadata.gz: 3854963c10a80a9ee649363f8b4530266a2befad8994557060f07385fad0fba45823380eb74c33386a03985f08327df9869b6e503ed3fe16e803e0a770583fc6
7
- data.tar.gz: bf11fdb4d48fc87e9a5eb406fc7dd0befe11280d6270df113bd87e69d5edc492703176bbf8cc39c6e5acd9fcce4fc25c7d8500e33fca14cb96196f4b0a54bd8b
6
+ metadata.gz: 18830b61830ca08730fce161817b11c3b6754bf8b957f5596ea65774b7af35b639ceff5afba10dae746d52bb9940a39d2ca01ce821a57ae9ad9658f3f862a8ba
7
+ data.tar.gz: 4c711e2d9503a04ede952a53357e7cbb20a2d8ed2091ddeab201ca663fd197fd08b56f1b09e0a6681cbcfda61ef808e38b54cef5f3705cdedd3509631ecf9d5a
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.1
3
+ - 2.5.1
4
4
  cache: bundler
5
5
  notifications:
6
6
  webhooks:
@@ -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 and 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)__
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
@@ -2,12 +2,12 @@
2
2
 
3
3
  require "bundler/gem_tasks"
4
4
 
5
- task :rubocop do
6
- sh "rubocop"
7
- end
8
-
9
5
  task :rspec do
10
6
  sh "rspec"
11
7
  end
12
8
 
13
- task default: %i[rubocop rspec]
9
+ task :rubocop do
10
+ sh "rubocop"
11
+ end
12
+
13
+ task default: %i[rspec]
@@ -37,3 +37,4 @@ Gem::Specification.new do |spec|
37
37
  spec.add_development_dependency "simplecov-rcov"
38
38
  spec.add_development_dependency "webmock"
39
39
  end
40
+ # rubocop:enable Metrics/BlockLength
@@ -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
- ].freeze
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
- bank_name BIC_code description
27
- division format IBAN type
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
@@ -4,7 +4,7 @@ module Elmas
4
4
  class Version
5
5
  MAJOR = 3
6
6
  MINOR = 0
7
- PATCH = 0
7
+ PATCH = 1
8
8
 
9
9
  class << self
10
10
  def to_s
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.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-05-24 00:00:00.000000000 Z
11
+ date: 2018-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource