papierkram_api_client 0.2.0 → 0.2.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: c428355fa2303fe4086587e47b981b46eac42c498ea84cb2ada942b8b926e1d1
4
- data.tar.gz: 63f9f3524d98be430356ebc7e19bc344a0e388f9b99c71dcd4303a7427fd0635
3
+ metadata.gz: 7efda340be625d91834f22276f4e95767a7d06621bb7d4e8ab6cbb7a503c40f0
4
+ data.tar.gz: dad2650ea0bf6cc8339988ff4e5ab4265e26bad4c203398166d14296db415cdd
5
5
  SHA512:
6
- metadata.gz: c4a0d1e8ae94400e56919997bd82daa69cec0ee3b3e6c26d0525e952c6f075238effe6a589c7217c4d89658ec7e2c41c61159b06362898cf4aed7c7f50399103
7
- data.tar.gz: b9abc76a4a14af64eaaa07f98e925a164b1474c40e4a618830966c269c3bccb4f28d8334a07b1ea4672b295e6f3d1ef6808bbbae6147bef4b211b0776bda200c
6
+ metadata.gz: '039f293aa1bcf2da3ba920cae9d63ff014a674764f76302f5f318cc89763df94518d69ddc61a105fcd0b13bff487e1a8196ead1a6e32f8e405f26cfb2a54096f'
7
+ data.tar.gz: 41344eba19e9d4d76fca686ec05f8f0724fb38caeb0b08397e54ac2a0464fda1a58d3d7e7118a92c5d5eef7b4f5cf3d9dfd52fd7bbeaf0641f4844b983748eb4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.1] - 2023-04-21
4
+
5
+ ### Added
6
+
7
+ - [#20](https://github.com/simonneutert/papierkram_api_client/pull/20) Adds Banking::Transactions as endpoint with tests. [@simonneutert](https://github.com/simonneutert)
8
+
3
9
  ## [0.2.0] - 2023-04-18
4
10
 
5
11
  Das Namespacing hat sich geändert. Die Klasse `PapierkramApiClient` ist jetzt `PapierkramApi::Client`.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- papierkram_api_client (0.2.0)
4
+ papierkram_api_client (0.2.1)
5
5
  faraday (~> 2.7)
6
6
  httpx (~> 0.22.5)
7
7
 
data/README.md CHANGED
@@ -26,9 +26,7 @@ Das Gleiche, nur in grün, also für [NodeJS](https://github.com/simonneutert/pa
26
26
 
27
27
  Check das [CHANGELOG.md](CHANGELOG.md), Baby!
28
28
 
29
- Hier geht es zu den offiziellen API Docs
30
- https://DEINE-SUBDOMAIN.papierkram.de/papierkram_api/v1/api-docs/index.html
31
- (wenn du bereits ein Papierkram-Konto hast).
29
+ Hier geht es zu den [offiziellen API Docs](https://demo.papierkram.de/api/v1/api-docs/index.html).
32
30
  Schau bitte dort um alle Rückgabefelder/-werte zu checken, bis ich die Dokumentation hier komplett habe.
33
31
 
34
32
  ---
@@ -38,7 +36,7 @@ Ruby client für die Papierkram API (V1).
38
36
  Aktuell unterstützte Endpunkte / Objekte:
39
37
 
40
38
  - [x] Banking::BankConnection
41
- - [ ] Banking::BankTransaction
39
+ - [x] Banking::BankTransaction
42
40
  - [x] Contact::Company (Unternehmen)
43
41
  - [x] Contact::Company (Kontaktpersonen)
44
42
  - [x] Expense::Voucher (Ausgabe Belege)
@@ -39,8 +39,7 @@ module PapierkramApi
39
39
  end
40
40
 
41
41
  def banking_transactions
42
- raise ArgumentError, 'not implemented'
43
- # @banking_transactions ||= PapierkramApi::V1::Banking::Transactions.new(@client)
42
+ @banking_transactions ||= PapierkramApi::V1::Endpoints::Banking::Transactions.new(@client)
44
43
  end
45
44
 
46
45
  def contact_companies
@@ -5,13 +5,25 @@ module PapierkramApi
5
5
  module Endpoints
6
6
  module Banking
7
7
  # This class is responsible for all the API calls related to banking transactions.
8
- class Transactions
8
+ class Transactions < PapierkramApi::V1::Endpoints::Base
9
9
  def by(id:)
10
- # wip
10
+ get("#{@url_api_path}/banking/transactions/#{id}")
11
11
  end
12
12
 
13
- def all
14
- # wip
13
+ def all(bank_connection_id:,
14
+ page: 1,
15
+ page_size: 100,
16
+ order_by: nil,
17
+ order_direction: nil)
18
+ query = {
19
+ bank_connection_id: bank_connection_id,
20
+ page: page,
21
+ page_size: page_size
22
+ }
23
+ query[:order_by] = order_by if order_by
24
+ query[:order_direction] = order_direction if order_direction
25
+
26
+ get("#{@url_api_path}/banking/transactions", query)
15
27
  end
16
28
  end
17
29
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PapierkramApiClient
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Neutert
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-18 00:00:00.000000000 Z
11
+ date: 2023-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday