Skip to content

Commit f051b3d

Browse files
committed
Adds PayrollEmployeesStream
1 parent 371e48d commit f051b3d

File tree

5 files changed

+112
-3
lines changed

5 files changed

+112
-3
lines changed

tap_bexio/schemas/banking_payment.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414

1515
"bank_account": {
16-
"type": "array",
16+
"type": "object",
1717
"properties": {
1818
"id": {
1919
"type": "integer"
@@ -25,7 +25,7 @@
2525
},
2626

2727
"payment": {
28-
"type": "array",
28+
"type": "object",
2929
"instructed_amount": {
3030
"currency": {
3131
"type": "string"

tap_bexio/schemas/files.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"type": "object",
2+
"type": "array",
33
"additionalProperties": false,
44
"properties": {
55
"id": {
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
{
2+
"type": "object",
3+
"additionalProperties": false,
4+
"properties": {
5+
"data": {
6+
"type": "array",
7+
"properties": {
8+
"id": {
9+
"type": "uuid"
10+
},
11+
"first_name": {
12+
"type": "string"
13+
},
14+
"last_name": {
15+
"type": "string"
16+
},
17+
"date_of_birth": {
18+
"type": "string"
19+
},
20+
"ahv_number": {
21+
"type": "string"
22+
},
23+
"gender": {
24+
"type": "string"
25+
},
26+
"nationality": {
27+
"type": "string"
28+
},
29+
"stay_permit_category": {
30+
"type": "string"
31+
},
32+
"language": {
33+
"type": "string"
34+
},
35+
"marital_status": {
36+
"type": "string"
37+
},
38+
"email": {
39+
"type": "string"
40+
},
41+
"phone_number": {
42+
"type": "string"
43+
},
44+
"hours_per_week": {
45+
"type": "integer"
46+
},
47+
"employment_level": {
48+
"type": "integer"
49+
},
50+
"annual_vacation_days_total": {
51+
"type": "integer"
52+
},
53+
54+
"address": {
55+
"type": "object",
56+
"properties": {
57+
"complementary_line": {
58+
"type": "string"
59+
},
60+
"street": {
61+
"type": "string"
62+
},
63+
"postbox": {
64+
"type": "string"
65+
},
66+
"locality": {
67+
"type": "string"
68+
},
69+
"zip_code": {
70+
"type": "string"
71+
},
72+
"city": {
73+
"type": "string"
74+
},
75+
"country": {
76+
"type": "string"
77+
},
78+
"canton": {
79+
"type": "string"
80+
},
81+
"municipality_id": {
82+
"type": "string"
83+
}
84+
}
85+
},
86+
87+
"personal_number": {
88+
"type": "integer"
89+
},
90+
"iban": {
91+
"type": "integer"
92+
}
93+
}
94+
}
95+
}
96+
}
97+

tap_bexio/streams.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,3 +311,13 @@ class FilesStream(bexioStream):
311311
replication_method: "FULL_TABLE"
312312
replication_key = "id"
313313
schema_filepath = SCHEMAS_DIR / "files.json"
314+
315+
class PayrollEmployeesStream(bexioStream):
316+
"""Bank payments stream."""
317+
name = "payroll_employees"
318+
path = "4.0/payroll/employees"
319+
data_key = "payroll_employees"
320+
primary_keys = ["id"]
321+
replication_method: "FULL_TABLE"
322+
replication_key = "id"
323+
schema_filepath = SCHEMAS_DIR / "payroll_employees.json"

tap_bexio/tap.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
BankAccountsStream,
3535
BankPaymentsStream,
3636
FilesStream,
37+
PayrollEmployeesStream,
3738
)
3839

3940
STREAM_TYPES = [
@@ -65,6 +66,7 @@
6566
BankAccountsStream,
6667
BankPaymentsStream,
6768
FilesStream,
69+
PayrollEmployeesStream,
6870
]
6971

7072

0 commit comments

Comments
 (0)