papierkram_api_client 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +19 -1
- data/Gemfile +7 -7
- data/Gemfile.lock +42 -40
- data/README.md +56 -13
- data/UPGRADING.md +45 -0
- data/lib/papierkram_api/v1/business_intelligence/smart_queries/expense_vouchers_for_month_in_year.rb +1 -2
- data/lib/papierkram_api/v1/validators/expense_voucher.rb +2 -2
- data/lib/papierkram_api_client/version.rb +1 -1
- metadata +6 -7
- data/.tool-versions +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d1f327991a464b4804f9a7f9476408c178ffc7dea5ac985b7366819a74a15ad
|
4
|
+
data.tar.gz: 45198d7bd1e31a304022bc84213ee848763b0c5dead92430c9b2cc3abb07f3de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92ac14469bf81c40a96dcc9654965c3596822a33815d69f2d0dd7a5a9e863f13bb95950b96b9f16de6a92cbfff3f5a7147df43afcf59b77f0e0ec857b694cdf0
|
7
|
+
data.tar.gz: e85f92ae26a0d221af02a23948b70d118ecc4eace816287425a527fec0462a47ab6974cae3e5d51260bbece7547b00ae1a192c06123b5a716424e7dcbbffbd76
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,24 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
|
3
|
+
Schema for new entries:
|
4
|
+
|
5
|
+
```markdown
|
6
|
+
## [next] - YYYY-MM-DD
|
7
|
+
|
8
|
+
- [#<PR_NUMBER>](https://github.com/simonneutert/papierkram_api_client/pull/<PR_NUMBER>) Description. [@<username>](https://github.com/<username>)
|
9
|
+
```
|
10
|
+
|
11
|
+
## [0.5.0] - 2024-09-24
|
12
|
+
|
13
|
+
- [#112](https://github.com/simonneutert/papierkram_api_client/pull/112) Drops support for ruby v2.x. [@simonneutert](https://github.com/simonneutert)
|
14
|
+
|
15
|
+
## [0.4.2] - 2024-02-04
|
16
|
+
|
17
|
+
- [#114](https://github.com/simonneutert/papierkram_api_client/pull/114) Public API of Papierkram changed, adapt your implementation of `vat_rate` attribute, please. [@simonneutert](https://github.com/simonneutert)
|
18
|
+
|
19
|
+
Please see [UPGRADING.md](UPGRADING.md) for more information.
|
20
|
+
|
21
|
+
## [0.4.1] - 2024-01-26
|
4
22
|
|
5
23
|
- [#111](https://github.com/simonneutert/papierkram_api_client/pull/111) Updates dependencies via bundler. [@simonneutert](https://github.com/simonneutert)
|
6
24
|
- [#110](https://github.com/simonneutert/papierkram_api_client/pull/110) Adds debug option to shoot against localhost:3000. [@simonneutert](https://github.com/simonneutert)
|
data/Gemfile
CHANGED
@@ -5,13 +5,13 @@ source 'https://rubygems.org'
|
|
5
5
|
# Specify your gem's dependencies in papierkram_api_client.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
gem 'minitest', '~> 5.
|
8
|
+
gem 'minitest', '~> 5.25'
|
9
9
|
gem 'minitest-vcr', '~> 1.4'
|
10
10
|
gem 'pry', '~> 0.14.2'
|
11
|
-
gem 'rake', '~> 13.
|
12
|
-
gem 'rubocop', '~> 1.
|
13
|
-
gem 'rubocop-minitest', '~> 0.
|
14
|
-
gem 'rubocop-performance', '~> 1.
|
11
|
+
gem 'rake', '~> 13.2'
|
12
|
+
gem 'rubocop', '~> 1.66', require: false
|
13
|
+
gem 'rubocop-minitest', '~> 0.36.0', require: false
|
14
|
+
gem 'rubocop-performance', '~> 1.22', require: false
|
15
15
|
gem 'rubocop-rake', '~> 0.6.0', require: false
|
16
|
-
gem 'vcr', '~> 6.
|
17
|
-
gem 'webmock', '~> 3.
|
16
|
+
gem 'vcr', '~> 6.3'
|
17
|
+
gem 'webmock', '~> 3.23'
|
data/Gemfile.lock
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
papierkram_api_client (0.
|
4
|
+
papierkram_api_client (0.5.0)
|
5
5
|
faraday (~> 2.7)
|
6
6
|
faraday-multipart (= 1.0.4)
|
7
|
-
httpx (>= 0.22.5, < 1.
|
7
|
+
httpx (>= 0.22.5, < 1.4.0)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
addressable (2.8.
|
13
|
-
public_suffix (>= 2.0.2, <
|
12
|
+
addressable (2.8.7)
|
13
|
+
public_suffix (>= 2.0.2, < 7.0)
|
14
14
|
ast (2.4.2)
|
15
15
|
base64 (0.2.0)
|
16
|
+
bigdecimal (3.1.8)
|
16
17
|
coderay (1.1.3)
|
17
|
-
crack (0.
|
18
|
+
crack (1.0.0)
|
19
|
+
bigdecimal
|
18
20
|
rexml
|
19
21
|
faraday (2.8.1)
|
20
22
|
base64
|
@@ -23,60 +25,60 @@ GEM
|
|
23
25
|
faraday-multipart (1.0.4)
|
24
26
|
multipart-post (~> 2)
|
25
27
|
faraday-net_http (3.0.2)
|
26
|
-
hashdiff (1.1.
|
27
|
-
http-2
|
28
|
-
httpx (1.
|
29
|
-
http-2
|
30
|
-
json (2.7.
|
28
|
+
hashdiff (1.1.1)
|
29
|
+
http-2 (1.0.1)
|
30
|
+
httpx (1.3.1)
|
31
|
+
http-2 (>= 1.0.0)
|
32
|
+
json (2.7.2)
|
31
33
|
language_server-protocol (3.17.0.3)
|
32
34
|
method_source (1.0.0)
|
33
35
|
minispec-metadata (2.0.0)
|
34
36
|
minitest
|
35
|
-
minitest (5.
|
37
|
+
minitest (5.25.1)
|
36
38
|
minitest-vcr (1.4.0)
|
37
39
|
minispec-metadata (~> 2.0)
|
38
40
|
minitest (>= 4.7.5)
|
39
41
|
vcr (>= 2.9)
|
40
42
|
multipart-post (2.3.0)
|
41
|
-
parallel (1.
|
42
|
-
parser (3.3.0
|
43
|
+
parallel (1.26.3)
|
44
|
+
parser (3.3.5.0)
|
43
45
|
ast (~> 2.4.1)
|
44
46
|
racc
|
45
47
|
pry (0.14.2)
|
46
48
|
coderay (~> 1.1)
|
47
49
|
method_source (~> 1.0)
|
48
|
-
public_suffix (5.
|
49
|
-
racc (1.
|
50
|
+
public_suffix (5.1.1)
|
51
|
+
racc (1.8.1)
|
50
52
|
rainbow (3.1.1)
|
51
|
-
rake (13.1
|
52
|
-
regexp_parser (2.9.
|
53
|
-
rexml (3.
|
54
|
-
rubocop (1.
|
53
|
+
rake (13.2.1)
|
54
|
+
regexp_parser (2.9.2)
|
55
|
+
rexml (3.3.7)
|
56
|
+
rubocop (1.66.1)
|
55
57
|
json (~> 2.3)
|
56
58
|
language_server-protocol (>= 3.17.0)
|
57
59
|
parallel (~> 1.10)
|
58
60
|
parser (>= 3.3.0.2)
|
59
61
|
rainbow (>= 2.2.2, < 4.0)
|
60
|
-
regexp_parser (>=
|
61
|
-
|
62
|
-
rubocop-ast (>= 1.30.0, < 2.0)
|
62
|
+
regexp_parser (>= 2.4, < 3.0)
|
63
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
63
64
|
ruby-progressbar (~> 1.7)
|
64
65
|
unicode-display_width (>= 2.4.0, < 3.0)
|
65
|
-
rubocop-ast (1.
|
66
|
-
parser (>= 3.
|
67
|
-
rubocop-minitest (0.
|
68
|
-
rubocop (>= 1.
|
69
|
-
rubocop-ast (>= 1.
|
70
|
-
rubocop-performance (1.
|
66
|
+
rubocop-ast (1.32.3)
|
67
|
+
parser (>= 3.3.1.0)
|
68
|
+
rubocop-minitest (0.36.0)
|
69
|
+
rubocop (>= 1.61, < 2.0)
|
70
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
71
|
+
rubocop-performance (1.22.1)
|
71
72
|
rubocop (>= 1.48.1, < 2.0)
|
72
|
-
rubocop-ast (>= 1.
|
73
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
73
74
|
rubocop-rake (0.6.0)
|
74
75
|
rubocop (~> 1.0)
|
75
76
|
ruby-progressbar (1.13.0)
|
76
77
|
ruby2_keywords (0.0.5)
|
77
|
-
unicode-display_width (2.
|
78
|
-
vcr (6.
|
79
|
-
|
78
|
+
unicode-display_width (2.6.0)
|
79
|
+
vcr (6.3.1)
|
80
|
+
base64
|
81
|
+
webmock (3.23.1)
|
80
82
|
addressable (>= 2.8.0)
|
81
83
|
crack (>= 0.3.2)
|
82
84
|
hashdiff (>= 0.4.0, < 2.0.0)
|
@@ -87,17 +89,17 @@ PLATFORMS
|
|
87
89
|
x86_64-linux
|
88
90
|
|
89
91
|
DEPENDENCIES
|
90
|
-
minitest (~> 5.
|
92
|
+
minitest (~> 5.25)
|
91
93
|
minitest-vcr (~> 1.4)
|
92
94
|
papierkram_api_client!
|
93
95
|
pry (~> 0.14.2)
|
94
|
-
rake (~> 13.
|
95
|
-
rubocop (~> 1.
|
96
|
-
rubocop-minitest (~> 0.
|
97
|
-
rubocop-performance (~> 1.
|
96
|
+
rake (~> 13.2)
|
97
|
+
rubocop (~> 1.66)
|
98
|
+
rubocop-minitest (~> 0.36.0)
|
99
|
+
rubocop-performance (~> 1.22)
|
98
100
|
rubocop-rake (~> 0.6.0)
|
99
|
-
vcr (~> 6.
|
100
|
-
webmock (~> 3.
|
101
|
+
vcr (~> 6.3)
|
102
|
+
webmock (~> 3.23)
|
101
103
|
|
102
104
|
BUNDLED WITH
|
103
|
-
2.
|
105
|
+
2.5.19
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Ruby](https://github.com/simonneutert/papierkram_api_client/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/simonneutert/papierkram_api_client/actions/workflows/main.yml)
|
4
4
|
|
5
|
-
Der erste ~~illegale~~ inoffizielle API Client in [Ruby](https://www.ruby-lang.org/de/) für [Papierkram.de](https://www.papierkram.de) als [Gem](https://rubygems.org/gems/papierkram_api_client)
|
5
|
+
Der erste ~~illegale~~ inoffizielle API Client in [Ruby](https://www.ruby-lang.org/de/) für [Papierkram.de](https://www.papierkram.de) als [Gem](https://rubygems.org/gems/papierkram_api_client) für dein Projekt!
|
6
6
|
|
7
7
|
<div align="center">
|
8
8
|
<img src="logo.svg" alt="PAC Logo, Zunge leckt an Karl Klammer und zieht Daten aus dem Papierkram-Account wie Frosch die Fliege vom Teich" width="300">
|
@@ -158,6 +158,7 @@ Ziele:
|
|
158
158
|
- [Development / Mitentwickeln](#development--mitentwickeln)
|
159
159
|
- [Localhost 3000! 🤫](#localhost-3000-)
|
160
160
|
- [Contributing](#contributing)
|
161
|
+
- [Releasing](#releasing)
|
161
162
|
- [License](#license)
|
162
163
|
|
163
164
|
## Installation
|
@@ -215,6 +216,8 @@ client = PapierkramApi::Client.new('subdomain', "SUPER-LONG-API-KEY")
|
|
215
216
|
|
216
217
|
Oder es werden die Umgebungsvariablen `PAPIERKRAM_API_SUBDOMAIN` und `PAPIERKRAM_API_KEY` gesetzt und der Client ohne Argumente initialisiert.
|
217
218
|
|
219
|
+
Ich kann dir wärmstes https://direnv.net/ empfehlen, um die Umgebungsvariablen zu setzen. 🤓
|
220
|
+
|
218
221
|
```ruby
|
219
222
|
# usage with environment variables
|
220
223
|
client = PapierkramApi::Client.new
|
@@ -502,13 +505,13 @@ voucher = client.expense_vouchers.create(
|
|
502
505
|
{
|
503
506
|
amount: 150.8,
|
504
507
|
name: "restaurant bill",
|
505
|
-
vat_rate:
|
508
|
+
vat_rate: 0.19,
|
506
509
|
category: "Bewirtungskosten"
|
507
510
|
},
|
508
511
|
{
|
509
512
|
amount: 15,
|
510
513
|
name: "tip",
|
511
|
-
vat_rate:
|
514
|
+
vat_rate: 0.19,
|
512
515
|
category: "Bewirtungskosten"
|
513
516
|
}
|
514
517
|
]
|
@@ -528,7 +531,7 @@ voucher = client.expense_vouchers.update_by(
|
|
528
531
|
{
|
529
532
|
amount: 170.8,
|
530
533
|
name: "restaurant bill",
|
531
|
-
vat_rate:
|
534
|
+
vat_rate: 0.19,
|
532
535
|
category: "Bewirtungskosten",
|
533
536
|
billing: null,
|
534
537
|
depreciation: null
|
@@ -536,7 +539,7 @@ voucher = client.expense_vouchers.update_by(
|
|
536
539
|
{
|
537
540
|
amount: 15,
|
538
541
|
name: "tip",
|
539
|
-
vat_rate:
|
542
|
+
vat_rate: 0.19,
|
540
543
|
category: "Bewirtungskosten"
|
541
544
|
}
|
542
545
|
]
|
@@ -695,7 +698,7 @@ invoice = client.income_invoices.create(
|
|
695
698
|
description: 'Anlieferung der neuen Möbel',
|
696
699
|
quantity: 1.25,
|
697
700
|
unit: 'Stunden',
|
698
|
-
vat_rate:
|
701
|
+
vat_rate: 0.19,
|
699
702
|
price: 100
|
700
703
|
},
|
701
704
|
{
|
@@ -703,7 +706,7 @@ invoice = client.income_invoices.create(
|
|
703
706
|
description: 'Bestuhlung des Bürogebäudes',
|
704
707
|
quantity: 1.25,
|
705
708
|
unit: 'Arbeitstage',
|
706
|
-
vat_rate:
|
709
|
+
vat_rate: 0.19,
|
707
710
|
price: 800
|
708
711
|
},
|
709
712
|
{
|
@@ -711,7 +714,7 @@ invoice = client.income_invoices.create(
|
|
711
714
|
description: 'Neue Bürostühle',
|
712
715
|
quantity: 200,
|
713
716
|
unit: 'Stühle',
|
714
|
-
vat_rate:
|
717
|
+
vat_rate: 0.19,
|
715
718
|
price: 125
|
716
719
|
}
|
717
720
|
]
|
@@ -732,7 +735,7 @@ response = client.income_invoices.update_by(
|
|
732
735
|
description: 'Anlieferung der neuen Möbel',
|
733
736
|
quantity: 1.5,
|
734
737
|
unit: 'Stunden',
|
735
|
-
vat_rate:
|
738
|
+
vat_rate: 0.19,
|
736
739
|
price: 100
|
737
740
|
},
|
738
741
|
{
|
@@ -740,7 +743,7 @@ response = client.income_invoices.update_by(
|
|
740
743
|
description: 'Bestuhlung des Bürogebäudes',
|
741
744
|
quantity: 1.5,
|
742
745
|
unit: 'Arbeitstage',
|
743
|
-
vat_rate:
|
746
|
+
vat_rate: 0.19,
|
744
747
|
price: 800
|
745
748
|
},
|
746
749
|
{
|
@@ -748,7 +751,7 @@ response = client.income_invoices.update_by(
|
|
748
751
|
description: 'Neue Bürostühle',
|
749
752
|
quantity: 200,
|
750
753
|
unit: 'Stühle',
|
751
|
-
vat_rate:
|
754
|
+
vat_rate: 0.19,
|
752
755
|
price: 125
|
753
756
|
}
|
754
757
|
]
|
@@ -866,7 +869,7 @@ proposition = client.income_propositions.create(
|
|
866
869
|
time_unit: 'hour',
|
867
870
|
proposition_type: 'service',
|
868
871
|
price: '150.0',
|
869
|
-
vat_rate:
|
872
|
+
vat_rate: 0.19
|
870
873
|
)
|
871
874
|
puts proposition.headers
|
872
875
|
puts proposition.body
|
@@ -880,7 +883,7 @@ Siehe [Propositions#create](lib/papierkram_api/v1/endpoints/income/propositions.
|
|
880
883
|
client.income_propositions.update_by(
|
881
884
|
id: 1,
|
882
885
|
name: 'Software design',
|
883
|
-
vat_rate:
|
886
|
+
vat_rate: 0.19 # verpflichtend bei Änderung
|
884
887
|
)
|
885
888
|
```
|
886
889
|
|
@@ -1256,14 +1259,37 @@ puts pdf
|
|
1256
1259
|
|
1257
1260
|
## Development / Mitentwickeln
|
1258
1261
|
|
1262
|
+
🇬🇧/🇺🇸
|
1263
|
+
|
1259
1264
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
1260
1265
|
|
1261
1266
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
1262
1267
|
|
1268
|
+
You need to have at least the following environment variables set to run the tests:
|
1269
|
+
|
1270
|
+
- `MT_COMPAT=true` or `export MT_COMPAT=true` (when in .envrc)
|
1271
|
+
|
1272
|
+
Please, see the [`.envrc.sample`](.envrc.sample) file for more (https://direnv.net/).
|
1273
|
+
|
1274
|
+
🇩🇪
|
1275
|
+
|
1276
|
+
Nachdem du das Repository überprüft hast, führe `bin/setup` aus, um Abhängigkeiten zu installieren. Anschließend führe `rake test` aus, um die Tests durchzuführen. Du kannst auch `bin/console` ausführen, um eine interaktive Konsole zu starten und Experimente durchzuführen.
|
1277
|
+
|
1278
|
+
Um dieses Gem auf deinem lokalen Rechner zu installieren, führe `bundle exec rake install` aus. Um eine neue Version zu veröffentlichen, aktualisiere die Versionsnummer in `version.rb` und führe dann `bundle exec rake release` aus. Dadurch wird ein Git-Tag für die Version erstellt, Git-Commits und das erstellte Tag werden gepusht, und die `.gem`-Datei wird nach [rubygems.org](https://rubygems.org) gepusht.
|
1279
|
+
|
1280
|
+
Um die Tests auszuführen, muss die Umgebungsvariable `MT_COMPAT=true` gesetzt sein.
|
1281
|
+
|
1282
|
+
Bitte, schaue in die Datei [`.envrc.sample`](.envrc.sample) für mehr Details (https://direnv.net/).
|
1283
|
+
|
1263
1284
|
### Localhost 3000! 🤫
|
1264
1285
|
|
1286
|
+
Es gibt Menschen da draußen, die können gegen direkt gegen die Papierkram API entwickeln. 🤯
|
1287
|
+
Und wie das geht, verrate ich hier allen Lesern! 🤫
|
1288
|
+
|
1265
1289
|
`DEBUG_LOCALHOST=true bin/console`
|
1266
1290
|
|
1291
|
+
siehe: [test/test_api_v1_client.rb](test/test_api_v1_client.rb)
|
1292
|
+
|
1267
1293
|
OR to make it stick:
|
1268
1294
|
- Set `export DEBUG_LOCALHOST=true` in your `.env` or `.envrc` file.
|
1269
1295
|
- Enjoy the magic: `bin/setup && bin/console` 🎉
|
@@ -1280,6 +1306,23 @@ Bitte achte darauf, dass du die Tests ausführst und die Tests dann auch grün s
|
|
1280
1306
|
|
1281
1307
|
Wenn du unsicher bist, sprich mich an oder erstelle ein Issue. Ich helfe dir gerne weiter. 🤗
|
1282
1308
|
|
1309
|
+
## Releasing
|
1310
|
+
|
1311
|
+
1. checkout `main`
|
1312
|
+
2. close the changelog
|
1313
|
+
3. Set the correct/desired version number in `version.rb` and run `bundle install` just for sure
|
1314
|
+
4. commit changes if needed
|
1315
|
+
5. `bundle exec rake release`
|
1316
|
+
|
1317
|
+
After a successful release, the gem is pushed to [rubygems.org](https://rubygems.org/gems/papierkram_api_client).
|
1318
|
+
|
1319
|
+
Here are the steps you need to take after a successful release:
|
1320
|
+
|
1321
|
+
1. edit `lib/papierkram_api_client/version.rb` and bump the version number to the next patch version
|
1322
|
+
2. run `bundle install`
|
1323
|
+
3. open the changelog again
|
1324
|
+
4. commit and push the changes
|
1325
|
+
|
1283
1326
|
## License
|
1284
1327
|
|
1285
1328
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/UPGRADING.md
CHANGED
@@ -1,3 +1,48 @@
|
|
1
|
+
## From 0.4.2 onwards
|
2
|
+
|
3
|
+
`vat_rate` attribute of line_items, were Strings, like "19%", but the public API of Papierkram changed and expects Floats/Decimals like `0.19`. Please update your code accordingly.
|
4
|
+
|
5
|
+
**Create an invoice:**
|
6
|
+
|
7
|
+
see [Invoices#create](lib/papierkram_api/v1/endpoints/income/invoices.rb) for possible params.
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
invoice = client.income_invoices.create(
|
11
|
+
name: 'Neuausstattung des Büros',
|
12
|
+
supply_date: '01.01.2024 - 14.01.2024',
|
13
|
+
document_date: '2024-01-15',
|
14
|
+
payment_term_id: 46,
|
15
|
+
customer_id: 3,
|
16
|
+
project_id: 15,
|
17
|
+
line_items: [
|
18
|
+
{
|
19
|
+
name: 'Anlieferung',
|
20
|
+
description: 'Anlieferung der neuen Möbel',
|
21
|
+
quantity: 1.25,
|
22
|
+
unit: 'Stunden',
|
23
|
+
vat_rate: 0.19, # << here >>
|
24
|
+
price: 100
|
25
|
+
},
|
26
|
+
{
|
27
|
+
name: 'Bestuhlung',
|
28
|
+
description: 'Bestuhlung des Bürogebäudes',
|
29
|
+
quantity: 1.25,
|
30
|
+
unit: 'Arbeitstage',
|
31
|
+
vat_rate: 0.19, # << here >>
|
32
|
+
price: 800
|
33
|
+
},
|
34
|
+
{
|
35
|
+
name: 'Büroartikel',
|
36
|
+
description: 'Neue Bürostühle',
|
37
|
+
quantity: 200,
|
38
|
+
unit: 'Stühle',
|
39
|
+
vat_rate: 0.19, # << here >>
|
40
|
+
price: 125
|
41
|
+
}
|
42
|
+
]
|
43
|
+
)
|
44
|
+
```
|
45
|
+
|
1
46
|
## From 0.3 to 0.4
|
2
47
|
|
3
48
|
Some endpoints are calling `update` have changed. Instead of `update_by(id: 123, attributes: { ... })` you now use keywords e.g. `update_by(id: 123, name: 'New name')`.
|
data/lib/papierkram_api/v1/business_intelligence/smart_queries/expense_vouchers_for_month_in_year.rb
CHANGED
@@ -30,9 +30,8 @@ module PapierkramApi
|
|
30
30
|
|
31
31
|
def all_expense_vouchers_in_date_range
|
32
32
|
page = 1
|
33
|
-
vouchers = []
|
34
33
|
res = expense_vouchers(page: page)
|
35
|
-
res.body['entries'].
|
34
|
+
vouchers = res.body['entries'].map { |v| v }
|
36
35
|
while res.body['page'] != res.body['total_pages']
|
37
36
|
res = expense_vouchers(page: page)
|
38
37
|
res.body['entries'].each { |v| vouchers << v }
|
@@ -68,7 +68,7 @@ module PapierkramApi
|
|
68
68
|
name: 'restaurant bill',
|
69
69
|
amount: 150.8,
|
70
70
|
category: 'Bewirtungskosten',
|
71
|
-
vat_rate:
|
71
|
+
vat_rate: 0.19,
|
72
72
|
billing: nil,
|
73
73
|
depreciation: nil
|
74
74
|
},
|
@@ -76,7 +76,7 @@ module PapierkramApi
|
|
76
76
|
name: 'tip',
|
77
77
|
amount: 15,
|
78
78
|
category: 'Bewirtungskosten',
|
79
|
-
vat_rate:
|
79
|
+
vat_rate: 0.19,
|
80
80
|
billing: nil,
|
81
81
|
depreciation: nil
|
82
82
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: papierkram_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Neutert
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
version: 0.22.5
|
48
48
|
- - "<"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 1.
|
50
|
+
version: 1.4.0
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
version: 0.22.5
|
58
58
|
- - "<"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 1.
|
60
|
+
version: 1.4.0
|
61
61
|
description: Papierkram API Client, um deine Buchhaltung auf das nächste Level zu
|
62
62
|
bringen.
|
63
63
|
email:
|
@@ -70,7 +70,6 @@ files:
|
|
70
70
|
- ".gitignore"
|
71
71
|
- ".rubocop"
|
72
72
|
- ".rubocop.yml"
|
73
|
-
- ".tool-versions"
|
74
73
|
- CHANGELOG.md
|
75
74
|
- Gemfile
|
76
75
|
- Gemfile.lock
|
@@ -120,14 +119,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
120
119
|
requirements:
|
121
120
|
- - ">="
|
122
121
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
122
|
+
version: 3.0.0
|
124
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
124
|
requirements:
|
126
125
|
- - ">="
|
127
126
|
- !ruby/object:Gem::Version
|
128
127
|
version: '0'
|
129
128
|
requirements: []
|
130
|
-
rubygems_version: 3.
|
129
|
+
rubygems_version: 3.5.11
|
131
130
|
signing_key:
|
132
131
|
specification_version: 4
|
133
132
|
summary: Papierkram API Client
|
data/.tool-versions
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby 3.2.2
|