Skip to content

Commit 2b41f2d

Browse files
authored
Merge pull request #8 from substringag/adds-endpints
Adds some new endpoints
2 parents 045509c + 005a6eb commit 2b41f2d

File tree

10 files changed

+350
-12
lines changed

10 files changed

+350
-12
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ Built with the [Meltano Tap SDK](https://sdk.meltano.com) for Singer Taps.
2323
* [x] Accounts (accounts)
2424
* [x] Account Groups (account_groups)
2525
* [x] Manual entries (accounting_journal)
26-
* [ ] Banking
26+
* [x] Banking
2727
* [ ] Items & Products
2828
* [x] Projects & Time Tracking
29-
* [ ] Files
29+
* [x] Files
30+
* [ ] Payroll
31+
* [x] Employees
32+
* [ ] Absences
3033
* [ ] Other
3134
* [ ] Company Profile
3235
* [x] Countries
@@ -36,7 +39,7 @@ Built with the [Meltano Tap SDK](https://sdk.meltano.com) for Singer Taps.
3639
* [ ] Permissions
3740
* [ ] Tasks
3841
* [x] Units
39-
* [ ] User Management
42+
* [x] User Management
4043

4144
## Installation
4245

tap_bexio/client.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,8 @@ class bexioStream(RESTStream):
1818
"""bexio stream class."""
1919

2020
url_base = "https://api.bexio.com/"
21-
<<<<<<< HEAD
2221
item_limit = 500
2322
new_paging_system = False
24-
=======
25-
item_limit = 499
26-
>>>>>>> dev
2723

2824
records_jsonpath = "$[*]" # Or override `parse_response`.
2925
next_page_token_jsonpath = "[]" # Or override `get_next_page_token`.
@@ -205,12 +201,8 @@ def get_records(self, context: Optional[dict]) -> Iterable[Dict[str, Any]]:
205201
continue
206202
yield transformed_record
207203
except MinorApiException as e:
208-
<<<<<<< HEAD
209204
logging.error(" ======> Skipped stream based on minor HTTP status code erro for REST API")
210205
logging.error(e)
211-
=======
212-
logging.error("==> Skipped stream based on minor HTTP status code error for REST API (code 400 - 403)")
213-
>>>>>>> dev
214206

215207

216208
class MinorApiException(Exception):

tap_bexio/schemas/banking_bank_account.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"additionalProperties": false,
44
"properties": {
55
"id": {
6-
"type": "uuid"
6+
"type": "integer"
77
},
88
"name": {
99
"type": "string"
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"type": "object",
3+
"additionalProperties": false,
4+
"properties": {
5+
"id": {
6+
"type": "integer"
7+
},
8+
"uuid": {
9+
"type": "uuid"
10+
},
11+
"type": {
12+
"type": "string"
13+
},
14+
15+
"bank_account": {
16+
"type": "object",
17+
"properties": {
18+
"id": {
19+
"type": "integer"
20+
},
21+
"iban": {
22+
"type": "string"
23+
}
24+
}
25+
},
26+
27+
"payment": {
28+
"type": "object",
29+
"instructed_amount": {
30+
"currency": {
31+
"type": "string"
32+
},
33+
"amount": {
34+
"type": "double"
35+
}
36+
},
37+
"recipient": {
38+
"name": {
39+
"type": "string"
40+
},
41+
"street": {
42+
"type": "string"
43+
},
44+
"zip": {
45+
"type": "integer"
46+
},
47+
"city": {
48+
"type": "string"
49+
},
50+
"country_code": {
51+
"type": "string"
52+
},
53+
"house_number": {
54+
"type": "integer"
55+
}
56+
},
57+
"iban": {
58+
"type": "string"
59+
},
60+
"execution_date": {
61+
"type": "string"
62+
},
63+
"is_salary_payment": {
64+
"type": "boolean"
65+
},
66+
"is_editing_restricted": {
67+
"type": "boolean"
68+
},
69+
"message": {
70+
"type": ["null", "string"]
71+
},
72+
"allowance_type": {
73+
"type": ["null", "string"]
74+
}
75+
},
76+
77+
"instruction_id": {
78+
"type": "string"
79+
},
80+
"status": {
81+
"type": "string"
82+
},
83+
"created_at": {
84+
"type": "string",
85+
"format": "date-time"
86+
}
87+
}
88+
}
89+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"type": "object",
3+
"additionalProperties": false,
4+
"properties": {
5+
"id": {
6+
"type": "integer"
7+
},
8+
"salutation_type": {
9+
"type": "string"
10+
},
11+
"firstname": {
12+
"type": "string"
13+
},
14+
"lastname": {
15+
"type": "string"
16+
},
17+
"email": {
18+
"type": "string"
19+
},
20+
"title_id": {
21+
"type": ["null", "integer"]
22+
}
23+
}
24+
}

tap_bexio/schemas/files.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"type": "object",
3+
"additionalProperties": false,
4+
"properties": {
5+
"id": {
6+
"type": "integer"
7+
},
8+
"uuid": {
9+
"type": "uuid"
10+
},
11+
"name": {
12+
"type": "string"
13+
},
14+
"size_in_bytes": {
15+
"type": "integer"
16+
},
17+
"extension": {
18+
"type": "string"
19+
},
20+
"mime_type": {
21+
"type": "string"
22+
},
23+
"uploader_email": {
24+
"type": "string"
25+
},
26+
"user_id": {
27+
"type": "integer"
28+
},
29+
"is_archived": {
30+
"type": "boolean"
31+
},
32+
"source_id": {
33+
"type": "integer"
34+
},
35+
"source_type": {
36+
"type": "string"
37+
},
38+
"is_referenced": {
39+
"type": "boolean"
40+
},
41+
"created_at": {
42+
"type": "string",
43+
"format": "date-time"
44+
}
45+
}
46+
}
47+
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/schemas/user.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"type": "object",
3+
"additionalProperties": false,
4+
"properties": {
5+
"id": {
6+
"type": "integer"
7+
},
8+
"salutation_type": {
9+
"type": "string"
10+
},
11+
"firstname": {
12+
"type": "string"
13+
},
14+
"lastname": {
15+
"type": "string"
16+
},
17+
"email": {
18+
"type": "string"
19+
},
20+
"is_superadmin": {
21+
"type": "boolean"
22+
},
23+
"is_accountant": {
24+
"type": "boolean"
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)