brynq-sdk-nmbrs 2.3.1__py3-none-any.whl
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.
- brynq_sdk_nmbrs/__init__.py +226 -0
- brynq_sdk_nmbrs/absence.py +124 -0
- brynq_sdk_nmbrs/address.py +66 -0
- brynq_sdk_nmbrs/bank.py +125 -0
- brynq_sdk_nmbrs/children.py +100 -0
- brynq_sdk_nmbrs/companies.py +93 -0
- brynq_sdk_nmbrs/contract.py +132 -0
- brynq_sdk_nmbrs/costcenter.py +166 -0
- brynq_sdk_nmbrs/costunit.py +90 -0
- brynq_sdk_nmbrs/days.py +137 -0
- brynq_sdk_nmbrs/debtors.py +25 -0
- brynq_sdk_nmbrs/department.py +122 -0
- brynq_sdk_nmbrs/document.py +30 -0
- brynq_sdk_nmbrs/employees.py +196 -0
- brynq_sdk_nmbrs/employment.py +107 -0
- brynq_sdk_nmbrs/function.py +89 -0
- brynq_sdk_nmbrs/hours.py +252 -0
- brynq_sdk_nmbrs/leave.py +139 -0
- brynq_sdk_nmbrs/manager.py +294 -0
- brynq_sdk_nmbrs/salaries.py +85 -0
- brynq_sdk_nmbrs/salary_tables.py +242 -0
- brynq_sdk_nmbrs/schedules.py +84 -0
- brynq_sdk_nmbrs/schemas/__init__.py +37 -0
- brynq_sdk_nmbrs/schemas/absence.py +61 -0
- brynq_sdk_nmbrs/schemas/address.py +76 -0
- brynq_sdk_nmbrs/schemas/bank.py +83 -0
- brynq_sdk_nmbrs/schemas/contracts.py +60 -0
- brynq_sdk_nmbrs/schemas/costcenter.py +91 -0
- brynq_sdk_nmbrs/schemas/costunit.py +40 -0
- brynq_sdk_nmbrs/schemas/days.py +98 -0
- brynq_sdk_nmbrs/schemas/debtor.py +16 -0
- brynq_sdk_nmbrs/schemas/department.py +57 -0
- brynq_sdk_nmbrs/schemas/employees.py +153 -0
- brynq_sdk_nmbrs/schemas/employment.py +48 -0
- brynq_sdk_nmbrs/schemas/function.py +50 -0
- brynq_sdk_nmbrs/schemas/hours.py +121 -0
- brynq_sdk_nmbrs/schemas/leave.py +53 -0
- brynq_sdk_nmbrs/schemas/manager.py +126 -0
- brynq_sdk_nmbrs/schemas/salary.py +92 -0
- brynq_sdk_nmbrs/schemas/schedules.py +96 -0
- brynq_sdk_nmbrs/schemas/social_insurance.py +40 -0
- brynq_sdk_nmbrs/schemas/wage_tax.py +98 -0
- brynq_sdk_nmbrs/schemas/wagecomponents.py +114 -0
- brynq_sdk_nmbrs/social_insurance.py +52 -0
- brynq_sdk_nmbrs/wage_tax.py +164 -0
- brynq_sdk_nmbrs/wagecomponents.py +268 -0
- brynq_sdk_nmbrs-2.3.1.dist-info/METADATA +21 -0
- brynq_sdk_nmbrs-2.3.1.dist-info/RECORD +50 -0
- brynq_sdk_nmbrs-2.3.1.dist-info/WHEEL +5 -0
- brynq_sdk_nmbrs-2.3.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
import requests
|
|
3
|
+
import pandera as pa
|
|
4
|
+
from pandera.typing import Series, String, Float, DateTime
|
|
5
|
+
import pandas as pd
|
|
6
|
+
from typing import Optional
|
|
7
|
+
from uuid import UUID
|
|
8
|
+
from pydantic import BaseModel, Field
|
|
9
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
10
|
+
from typing import Optional
|
|
11
|
+
from pydantic import BaseModel, Field
|
|
12
|
+
|
|
13
|
+
# ---------------------------
|
|
14
|
+
# Get Schemas
|
|
15
|
+
# ---------------------------
|
|
16
|
+
# PANDERA SCHEMA
|
|
17
|
+
class VariableHoursGet(BrynQPanderaDataFrameModel):
|
|
18
|
+
hour_component_id: Series[String] = pa.Field(coerce=True, description="Hour Component ID", alias="hourComponentId")
|
|
19
|
+
hour_code: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Hour Code", alias="hourCode")
|
|
20
|
+
hour_code_description: Series[String] = pa.Field(coerce=True, nullable=True, description="Hour Code Description", alias="hourCodeDescription")
|
|
21
|
+
hours: Series[Float] = pa.Field(coerce=True, description="Hours", alias="hours")
|
|
22
|
+
cost_center_id: Series[String] = pa.Field(coerce=True, nullable=True, description="Cost Center ID", alias="costCenterId")
|
|
23
|
+
cost_unit_id: Series[String] = pa.Field(coerce=True, nullable=True, description="Cost Unit ID", alias="costUnitId")
|
|
24
|
+
comment: Series[String] = pa.Field(coerce=True, nullable=True, description="Comment", alias="comment")
|
|
25
|
+
created_at: Series[DateTime] = pa.Field(coerce=True, description="Hours Created At", alias="createdAt")
|
|
26
|
+
employee_id: Series[String] = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
27
|
+
|
|
28
|
+
class Config:
|
|
29
|
+
coerce = True
|
|
30
|
+
|
|
31
|
+
class _Annotation:
|
|
32
|
+
primary_key = "hour_component_id"
|
|
33
|
+
foreign_keys = {
|
|
34
|
+
"employee_id": {
|
|
35
|
+
"parent_schema": "EmployeeSchema",
|
|
36
|
+
"parent_column": "employee_id",
|
|
37
|
+
"cardinality": "N:1"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
class FixedHoursGet(BrynQPanderaDataFrameModel):
|
|
42
|
+
hour_component_id: Series[String] = pa.Field(coerce=True, description="Hour Component ID", alias="hourComponentId")
|
|
43
|
+
hour_code: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Hour Code", alias="hourCode")
|
|
44
|
+
hour_code_description: Series[String] = pa.Field(nullable=True, coerce=True, description="Hour Code Description", alias="hourCodeDescription")
|
|
45
|
+
hours: Series[Float] = pa.Field(coerce=True, description="Hours", alias="hours")
|
|
46
|
+
cost_center_id: Series[String] = pa.Field(nullable=True, coerce=True, description="Cost Center ID", alias="costCenterId")
|
|
47
|
+
cost_unit_id: Series[String] = pa.Field(nullable=True, coerce=True, description="Cost Unit ID", alias="costUnitId")
|
|
48
|
+
comment: Series[String] = pa.Field(nullable=True, coerce=True, description="Comment", alias="comment")
|
|
49
|
+
end_year: Series[pd.Int64Dtype] = pa.Field(nullable=True, coerce=True, description="End Year", alias="endYear")
|
|
50
|
+
end_period: Series[pd.Int64Dtype] = pa.Field(nullable=True, coerce=True, description="End Period", alias="endPeriod")
|
|
51
|
+
created_at: Series[String] = pa.Field(coerce=True, description="Hours Created At", alias="createdAt")
|
|
52
|
+
employee_id: Series[String] = pa.Field(coerce=True, nullable=True, description="Employee ID", alias="employeeId")
|
|
53
|
+
|
|
54
|
+
class Config:
|
|
55
|
+
coerce = True
|
|
56
|
+
|
|
57
|
+
class _Annotation:
|
|
58
|
+
primary_key = "hour_component_id"
|
|
59
|
+
foreign_keys = {
|
|
60
|
+
"employee_id": {
|
|
61
|
+
"parent_schema": "EmployeeSchema",
|
|
62
|
+
"parent_column": "employee_id",
|
|
63
|
+
"cardinality": "N:1"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
# ---------------------------
|
|
68
|
+
# Upload Schemas
|
|
69
|
+
# ---------------------------
|
|
70
|
+
class PeriodModel(BaseModel):
|
|
71
|
+
year: Optional[int] = Field(None, ge=1900, le=2100, example=2025, description="Year", alias="year")
|
|
72
|
+
period: Optional[int] = Field(None, ge=1, le=53, example=1, description="Period", alias="period")
|
|
73
|
+
|
|
74
|
+
class PeriodPost(BaseModel):
|
|
75
|
+
period: Optional[PeriodModel] = Field(None, description="Period", alias="period")
|
|
76
|
+
unprotected_mode: Optional[bool] = Field(None, example=False, description="Unprotected Mode", alias="unprotectedMode")
|
|
77
|
+
|
|
78
|
+
class FixedHoursCreate(BaseModel):
|
|
79
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
80
|
+
hour_code: int = Field(..., ge=1, example=2100, description="Hour Code", alias="hourCode")
|
|
81
|
+
number_of_hours: float = Field(..., ge=0, le=1000, example=40, description="Hours", alias="hours")
|
|
82
|
+
cost_center_id: Optional[str] = Field(None, example="aa506564-d1db-4fa8-83dc-d68db4cfcd82", description="Cost Center ID", alias="costCenterId")
|
|
83
|
+
cost_unit_id: Optional[str] = Field(None, example="d8ac6afb-2ac6-43bf-9880-2d382cdace43", description="Cost Unit ID", alias="costUnitId")
|
|
84
|
+
comment: Optional[str] = Field(None, example="Regular working hours with full details", description="Comment", alias="comment")
|
|
85
|
+
end_year: Optional[int] = Field(None, ge=1900, le=2100, example=2025, description="End Year", alias="endYear")
|
|
86
|
+
end_period: Optional[int] = Field(None, ge=1, le=53, example=12, description="End Period", alias="endPeriod")
|
|
87
|
+
period_details: Optional[PeriodPost] = None
|
|
88
|
+
|
|
89
|
+
class FixedHoursUpdate(BaseModel):
|
|
90
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
91
|
+
hour_component_id: str = Field(..., example="ddaae291-47fa-4c67-bb2f-de0e5da9e8a1", description="Hour Component ID", alias="hourComponentId")
|
|
92
|
+
hour_code: Optional[int] = Field(None, ge=1, example=2100, description="Hour Code", alias="hourCode")
|
|
93
|
+
number_of_hours: Optional[float] = Field(None, ge=0, le=1000, example=40, description="Hours", alias="hours")
|
|
94
|
+
cost_center_id: Optional[str] = Field(None, example="aa506564-d1db-4fa8-83dc-d68db4cfcd82", description="Cost Center ID", alias="costCenterId")
|
|
95
|
+
cost_unit_id: Optional[str] = Field(None, example="d8ac6afb-2ac6-43bf-9880-2d382cdace43", description="Cost Unit ID", alias="costUnitId")
|
|
96
|
+
comment: Optional[str] = Field(None, example="Comment about update", description="Comment", alias="comment")
|
|
97
|
+
end_year: Optional[int] = Field(None, ge=1900, le=2100, example=2025, description="End Year", alias="endYear")
|
|
98
|
+
end_period: Optional[int] = Field(None, ge=1, le=53, example=12, description="End Period", alias="endPeriod")
|
|
99
|
+
period_details: Optional[PeriodPost] = None
|
|
100
|
+
|
|
101
|
+
class VariableHoursCreate(BaseModel):
|
|
102
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
103
|
+
hour_code: int = Field(..., ge=1, example=2100, description="Hour Code", alias="hourCode")
|
|
104
|
+
number_of_hours: float = Field(..., ge=0, le=1000, example=3.5, description="Hours", alias="hours")
|
|
105
|
+
cost_center_id: Optional[str] = Field(None, example="aa506564-d1db-4fa8-83dc-d68db4cfcd82", description="Cost Center ID", alias="costCenterId")
|
|
106
|
+
cost_unit_id: Optional[str] = Field(None, example="d8ac6afb-2ac6-43bf-9880-2d382cdace43", description="Cost Unit ID", alias="costUnitId")
|
|
107
|
+
comment: Optional[str] = Field(None, example="Shift hours", description="Comment", alias="comment")
|
|
108
|
+
period_details: Optional[PeriodPost] = Field(None, example="Period details", description="Period details", alias="periodDetails")
|
|
109
|
+
|
|
110
|
+
class VariableHoursUpdate(BaseModel):
|
|
111
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
112
|
+
hour_component_id: str = Field(..., example="49a69eda-252e-4ccb-a220-38ea90511d4f", description="Hour Component ID", alias="hourComponentId")
|
|
113
|
+
hour_code: Optional[int] = Field(None, ge=1, example=2100, description="Hour Code", alias="hourCode")
|
|
114
|
+
number_of_hours: Optional[float] = Field(None, ge=0, le=1000, example=45.5, description="Hours", alias="hours")
|
|
115
|
+
cost_center_id: Optional[str] = Field(None, example="aa506564-d1db-4fa8-83dc-d68db4cfcd82", description="Cost Center ID", alias="costCenterId")
|
|
116
|
+
cost_unit_id: Optional[str] = Field(None, example="d8ac6afb-2ac6-43bf-9880-2d382cdace43", description="Cost Unit ID", alias="costUnitId")
|
|
117
|
+
comment: Optional[str] = Field(None, example="Comment about update", description="Comment", alias="comment")
|
|
118
|
+
period_details: Optional[PeriodPost] = None
|
|
119
|
+
|
|
120
|
+
class HoursDelete(BaseModel):
|
|
121
|
+
hour_component_id: str = Field(..., example="49a69eda-252e-4ccb-a220-38ea90511d4f", description="Hour Component ID", alias="hourComponentId")
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
import pandera as pa
|
|
3
|
+
from pandera.typing import Series, String, Float, DateTime
|
|
4
|
+
import pandera.extensions as extensions
|
|
5
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
6
|
+
from typing import Optional, Annotated
|
|
7
|
+
from pydantic import BaseModel, Field, StringConstraints
|
|
8
|
+
from enum import Enum
|
|
9
|
+
from datetime import datetime
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class LeaveGet(BrynQPanderaDataFrameModel):
|
|
13
|
+
employee_id: Series[String] = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
14
|
+
leave_requests_id: Series[String] = pa.Field(coerce=True, nullable=True, description="Leave Requests ID", alias="leaveRequestsId")
|
|
15
|
+
leave_group_id: Series[String] = pa.Field(coerce=True, nullable=True, description="Leave Group ID", alias="leaveGroupId")
|
|
16
|
+
status: Series[String] = pa.Field(coerce=True, nullable=True, description="Leave Status", alias="status")
|
|
17
|
+
leave_type: Series[String] = pa.Field(coerce=True, nullable=True, description="Leave Type", alias="type")
|
|
18
|
+
start_date: Series[DateTime] = pa.Field(coerce=True, nullable=True, description="Leave Start Date", alias="startDate")
|
|
19
|
+
end_date: Series[DateTime] = pa.Field(coerce=True, nullable=True, description="Leave End Date", alias="endDate")
|
|
20
|
+
hours: Series[Float] = pa.Field(coerce=True, nullable=True, description="Leave Hours", alias="hours")
|
|
21
|
+
created_at: Series[DateTime] = pa.Field(coerce=True, nullable=True, description="Leave Created At ", alias="createdAt")
|
|
22
|
+
changed_at: Series[DateTime] = pa.Field(coerce=True, nullable=True, description="Leave Changed At", alias="changedAt")
|
|
23
|
+
|
|
24
|
+
class _Annotation:
|
|
25
|
+
primary_key = "leave_requests_id"
|
|
26
|
+
foreign_keys = {
|
|
27
|
+
"employee_id": {
|
|
28
|
+
"parent_schema": "EmployeeSchema",
|
|
29
|
+
"parent_column": "employee_id",
|
|
30
|
+
"cardinality": "N:1"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class LeaveCreate(BaseModel):
|
|
36
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
37
|
+
leave_group_id: str = Field(..., example="49a69eda-252e-4ccb-a220-38ea90511d4f", description="Leave Group ID", alias="leaveGroupId")
|
|
38
|
+
start_date: datetime = Field(..., example="2025-01-01", description="Leave Start Date", alias="startDate")
|
|
39
|
+
end_date: datetime = Field(..., example="2025-01-02", description="Leave End Date", alias="endDate")
|
|
40
|
+
hours: float = Field(..., example=8.0, description="Leave Hours", alias="hours")
|
|
41
|
+
description: Optional[str] = Field(None, example="Comment about leave request", description="Comment", alias="description")
|
|
42
|
+
status: str = Field(..., example="Comment about leave request", description="Comment", alias="status")
|
|
43
|
+
leave_type: str = Field(..., example="vacation", description="Leave Type", alias="type")
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class LeaveDelete(BaseModel):
|
|
47
|
+
leave_request_id: str = Field(..., example="49a69eda-252e-4ccb-a220-38ea90511d4f", description="Leave Request ID", alias="leaveRequestId")
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class LeaveBalanceGet(BrynQPanderaDataFrameModel):
|
|
51
|
+
employee_id: Series[String] = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
52
|
+
leave_group_id: Series[String] = pa.Field(coerce=True, nullable=True, description="Leave Group ID", alias="leaveGroupId")
|
|
53
|
+
balance: Series[Float] = pa.Field(coerce=True, nullable=True, description="Leave Balance", alias="leaveBalance")
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
import pandas as pd
|
|
4
|
+
import pandera as pa
|
|
5
|
+
from pandera.typing import Series, String, Float, DateTime
|
|
6
|
+
import pandera.extensions as extensions
|
|
7
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
8
|
+
|
|
9
|
+
from typing import Optional
|
|
10
|
+
from pydantic import BaseModel, Field
|
|
11
|
+
|
|
12
|
+
# ---------------------------
|
|
13
|
+
# Get Schemas
|
|
14
|
+
# ---------------------------
|
|
15
|
+
class ManagerGet(BrynQPanderaDataFrameModel):
|
|
16
|
+
manager_id: Series[pa.String] = pa.Field(coerce=True, description="Manager unique identifier", alias="managerId")
|
|
17
|
+
number: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="The manager's number", alias="number")
|
|
18
|
+
first_name: Series[pa.String] = pa.Field(coerce=True, description="The manager's first name", alias="firstName")
|
|
19
|
+
last_name: Series[pa.String] = pa.Field(coerce=True, description="The manager's last name", alias="lastName")
|
|
20
|
+
gender: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="The manager's gender", alias="gender")
|
|
21
|
+
phone_number: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="The manager's phone number", alias="phoneNumber")
|
|
22
|
+
cellphone: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="The manager's cellphone", alias="cellphone")
|
|
23
|
+
fax: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="The manager's fax", alias="fax")
|
|
24
|
+
email: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="The manager's email", alias="email")
|
|
25
|
+
department_id: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Department ID", alias="department.departmentId")
|
|
26
|
+
department_code: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Department Code", alias="department.code")
|
|
27
|
+
department_description: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Department Description", alias="department.description")
|
|
28
|
+
department_created_at: Series[datetime] = pa.Field(coerce=True, nullable=True, description="Department Created At", alias="department.createdAt")
|
|
29
|
+
function_id: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Function ID", alias="function.functionId")
|
|
30
|
+
function_code: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Function Code", alias="function.code")
|
|
31
|
+
function_description: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Function Description", alias="function.description")
|
|
32
|
+
function_created_at: Series[datetime] = pa.Field(coerce=True, nullable=True, description="Function Created At", alias="function.createdAt")
|
|
33
|
+
|
|
34
|
+
class _Annotation:
|
|
35
|
+
primary_key = "manager_id"
|
|
36
|
+
|
|
37
|
+
class ManagerBasicGet(BrynQPanderaDataFrameModel):
|
|
38
|
+
manager_id: Series[pa.String] = pa.Field(coerce=True, description="Manager unique identifier", alias="managerId")
|
|
39
|
+
first_name: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager first name", alias="firstName")
|
|
40
|
+
last_name: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager last name", alias="lastName")
|
|
41
|
+
email: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager email", alias="email")
|
|
42
|
+
|
|
43
|
+
class _Annotation:
|
|
44
|
+
primary_key = "manager_id"
|
|
45
|
+
|
|
46
|
+
class EmployeeManagerGet(BrynQPanderaDataFrameModel):
|
|
47
|
+
employee_id: Series[pa.String] = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
48
|
+
manager_id: Series[pa.String] = pa.Field(coerce=True, description="Manager ID", alias="managerId")
|
|
49
|
+
number: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Manager number", alias="number")
|
|
50
|
+
first_name: Series[pa.String] = pa.Field(coerce=True, description="Manager first name", alias="firstName")
|
|
51
|
+
last_name: Series[pa.String] = pa.Field(coerce=True, description="Manager last name", alias="lastName")
|
|
52
|
+
gender: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager gender", alias="gender")
|
|
53
|
+
phone_number: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager phone number", alias="phoneNumber")
|
|
54
|
+
cellphone: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager cellphone", alias="cellphone")
|
|
55
|
+
fax: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager fax", alias="fax")
|
|
56
|
+
email: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager email", alias="email")
|
|
57
|
+
created_at: Series[datetime] = pa.Field(coerce=True, description="Manager created at", alias="createdAt")
|
|
58
|
+
period_period: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Period", alias="period.period")
|
|
59
|
+
period_year: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Year", alias="period.year")
|
|
60
|
+
department_id: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Department ID", alias="department.departmentId")
|
|
61
|
+
department_code: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Department Code", alias="department.code")
|
|
62
|
+
department_description: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Department Description", alias="department.description")
|
|
63
|
+
department_created_at: Series[datetime] = pa.Field(coerce=True, nullable=True, description="Department Created At", alias="department.createdAt")
|
|
64
|
+
function_id: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Function ID", alias="function.functionId")
|
|
65
|
+
function_code: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Function Code", alias="function.code")
|
|
66
|
+
function_description: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Function Description", alias="function.description")
|
|
67
|
+
function_created_at: Series[datetime] = pa.Field(coerce=True, nullable=True, description="Function Created At", alias="function.createdAt")
|
|
68
|
+
|
|
69
|
+
class _Annotation:
|
|
70
|
+
primary_key = "manager_id"
|
|
71
|
+
foreign_keys = {
|
|
72
|
+
"employee_id": {
|
|
73
|
+
"parent_schema": "EmployeeSchema",
|
|
74
|
+
"parent_column": "employee_id",
|
|
75
|
+
"cardinality": "N:1"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
class ManagerHistoricBasicGet(BrynQPanderaDataFrameModel):
|
|
80
|
+
employee_id: Series[pa.String] = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
81
|
+
manager_id: Series[pa.String] = pa.Field(coerce=True, description="Manager ID", alias="managerId")
|
|
82
|
+
first_name: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager first name", alias="firstName")
|
|
83
|
+
last_name: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager last name", alias="lastName")
|
|
84
|
+
email: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager email", alias="email")
|
|
85
|
+
created_at: Series[datetime] = pa.Field(coerce=True, description="Manager created at", alias="createdAt")
|
|
86
|
+
|
|
87
|
+
class _Annotation:
|
|
88
|
+
primary_key = "manager_id"
|
|
89
|
+
foreign_keys = {
|
|
90
|
+
"employee_id": {
|
|
91
|
+
"parent_schema": "EmployeeSchema",
|
|
92
|
+
"parent_column": "employee_id",
|
|
93
|
+
"cardinality": "N:1"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
# ---------------------------
|
|
98
|
+
# Upload Schemas
|
|
99
|
+
# ---------------------------
|
|
100
|
+
class Period(BaseModel):
|
|
101
|
+
year: int = Field(..., ge=1900, le=2100, example=2021, description="Year", alias="year")
|
|
102
|
+
period: int = Field(..., ge=1, le=53, example=4, description="Period", alias="period")
|
|
103
|
+
|
|
104
|
+
class ManagerCreate(BaseModel):
|
|
105
|
+
debtor_id: str = Field(..., description="Debtor identifier", alias="debtorId")
|
|
106
|
+
number: int = Field(..., ge=1, example=1, description="Manager number", alias="number")
|
|
107
|
+
first_name: str = Field(..., max_length=100, example="John", description="Manager first name", alias="firstName")
|
|
108
|
+
last_name: str = Field(..., max_length=100, example="Doe", description="Manager last name", alias="lastName")
|
|
109
|
+
gender: Optional[str] = Field(None, example="Male", description="Manager gender", alias="gender")
|
|
110
|
+
phone_number: Optional[str] = Field(None, max_length=50, example="0640986755", description="Manager phone number", alias="phoneNumber")
|
|
111
|
+
cellphone: Optional[str] = Field(None, max_length=50, example="0640986755", description="Manager cellphone", alias="cellphone")
|
|
112
|
+
fax: Optional[str] = Field(None, max_length=50, description="Manager fax", alias="fax")
|
|
113
|
+
email: Optional[str] = Field(None, max_length=100, example="john.doe@company.com", description="Manager email", alias="email")
|
|
114
|
+
|
|
115
|
+
class ManagerUpdate(BaseModel):
|
|
116
|
+
debtor_id: str = Field(..., description="Debtor identifier", alias="debtorId")
|
|
117
|
+
manager_id: str = Field(..., example="2f6aa11c-504a-49a1-903b-e15e79965702", description="Manager ID", alias="managerId")
|
|
118
|
+
period_details: Period = Field(..., alias="periodDetails")
|
|
119
|
+
|
|
120
|
+
class ManagerDelete(BaseModel):
|
|
121
|
+
manager_id: str = Field(..., example="2f6aa11c-504a-49a1-903b-e15e79965702", description="Manager ID", alias="managerId")
|
|
122
|
+
|
|
123
|
+
class UpdateEmployeeManager(BaseModel):
|
|
124
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
125
|
+
manager_id: str = Field(..., example="2f6aa11c-504a-49a1-903b-e15e79965702", description="Manager ID", alias="managerId")
|
|
126
|
+
period_details: Period = Field(..., alias="periodDetails")
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import math
|
|
2
|
+
import pandas as pd
|
|
3
|
+
import pandera as pa
|
|
4
|
+
from pandera import Bool
|
|
5
|
+
from pandera.typing import Series, String, Float, DateTime
|
|
6
|
+
import pandera.extensions as extensions
|
|
7
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
8
|
+
|
|
9
|
+
from typing import Optional, Annotated
|
|
10
|
+
from pydantic import BaseModel, Field, StringConstraints
|
|
11
|
+
from datetime import datetime
|
|
12
|
+
|
|
13
|
+
# ---------------------------
|
|
14
|
+
# Get Schemas
|
|
15
|
+
# ---------------------------
|
|
16
|
+
class SalaryGet(BrynQPanderaDataFrameModel):
|
|
17
|
+
employee_id: Series[String] = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
18
|
+
salary_id: Series[String] = pa.Field(coerce=True, description="Salary ID", alias="salaryId")
|
|
19
|
+
start_date: Series[DateTime] = pa.Field(coerce=True, description="Start Date", alias="startDate")
|
|
20
|
+
salary_type: Series[String] = pa.Field(
|
|
21
|
+
coerce=True,
|
|
22
|
+
isin=[
|
|
23
|
+
"grossFulltimeSalary",
|
|
24
|
+
"grossParttimeSalary",
|
|
25
|
+
"grossHourlyWage",
|
|
26
|
+
"netParttimeSalaryInclWageComp",
|
|
27
|
+
"netParttimeSalaryExclWageComp",
|
|
28
|
+
"netHourlyWageExclWageComp",
|
|
29
|
+
"netHourlyWageInclWageComp",
|
|
30
|
+
"employerCosts"
|
|
31
|
+
],
|
|
32
|
+
description="Salary Type",
|
|
33
|
+
alias="type"
|
|
34
|
+
)
|
|
35
|
+
value: Series[Float] = pa.Field(coerce=True, nullable=True, description="Value", alias="value")
|
|
36
|
+
created_at: Series[DateTime] = pa.Field(coerce=True, description="Created At", alias="createdAt")
|
|
37
|
+
|
|
38
|
+
class _Annotation:
|
|
39
|
+
primary_key = "salary_id"
|
|
40
|
+
foreign_keys = {
|
|
41
|
+
"employee_id": {
|
|
42
|
+
"parent_schema": "EmployeeSchema",
|
|
43
|
+
"parent_column": "employee_id",
|
|
44
|
+
"cardinality": "N:1"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
# ---------------------------
|
|
49
|
+
# Upload Schemas
|
|
50
|
+
# ---------------------------
|
|
51
|
+
class SalaryTableUpdate(BaseModel):
|
|
52
|
+
salary_table_id: Optional[str] = Field(None, example="e17a06f1-ae4c-4098-92a6-87976ea7dc9a", description="Salary Table ID", alias="salaryTableId")
|
|
53
|
+
scale_id: Optional[str] = Field(None, example="d5f761c0-20e7-490b-b756-644739fa6120", description="Scale ID", alias="scaleId")
|
|
54
|
+
step_id: Optional[str] = Field(None, example="c9c6feef-cd69-4773-8602-f70fa3b561e4", description="Step ID", alias="stepId")
|
|
55
|
+
|
|
56
|
+
class SalaryCreate(BaseModel):
|
|
57
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
58
|
+
start_date_salary: datetime = Field(..., example="2021-08-01T00:00:00Z", description="Start Date", alias="startDate")
|
|
59
|
+
salary_type: Optional[Annotated[
|
|
60
|
+
str,
|
|
61
|
+
StringConstraints(
|
|
62
|
+
pattern=r'^(grossFulltimeSalary|grossParttimeSalary|grossHourlyWage|netParttimeSalaryInclWageComp|netParttimeSalaryExclWageComp|netHourlyWageExclWageComp|netHourlyWageInclWageComp|employerCosts)$',
|
|
63
|
+
strip_whitespace=True
|
|
64
|
+
)
|
|
65
|
+
]] = Field(None, example="grossFulltimeSalary", description="Salary Type", alias="type")
|
|
66
|
+
salary_amount: Optional[float] = Field(None, ge=0, example=3480.95, description="Value", alias="value")
|
|
67
|
+
salary_table_id: Optional[str] = Field(None, example="e17a06f1-ae4c-4098-92a6-87976ea7dc9a", description="Salary Table ID", alias="salaryTableId")
|
|
68
|
+
scale_id: Optional[str] = Field(None, example="d5f761c0-20e7-490b-b756-644739fa6120", description="Scale ID", alias="scaleId")
|
|
69
|
+
step_id: Optional[str] = Field(None, example="c9c6feef-cd69-4773-8602-f70fa3b561e4", description="Step ID", alias="stepId")
|
|
70
|
+
salary_table_update: Optional[SalaryTableUpdate] = Field(None, description="Salary Table Update", alias="salaryTable")
|
|
71
|
+
|
|
72
|
+
class SalaryTableGet(BrynQPanderaDataFrameModel):
|
|
73
|
+
code: Series[String] = pa.Field(coerce=True, description="Salary Code", alias="Code")
|
|
74
|
+
description: Series[String] = pa.Field(coerce=True, description="Salary Description", alias="Description")
|
|
75
|
+
guid_salary_table: Series[String] = pa.Field(coerce=True, description="GUID Salary table", alias="GuidSalaryTable")
|
|
76
|
+
company_id: Series[String] = pa.Field(coerce=True, description="Company ID", alias="companyId")
|
|
77
|
+
|
|
78
|
+
class SalaryScalesGet(BrynQPanderaDataFrameModel):
|
|
79
|
+
scale: Series[String] = pa.Field(coerce=True, description="Salary Scale", alias="Scale")
|
|
80
|
+
description: Series[String] = pa.Field(coerce=True, description="Salary Scale Description", alias="SchaalDescription")
|
|
81
|
+
scale_value: Series[String] = pa.Field(coerce=True, description="Salary Scale Value", alias="ScaleValue")
|
|
82
|
+
scale_percentage_max: Series[String] = pa.Field(coerce=True, description="Salary Scale Max Percentage", alias="ScalePercentageMax")
|
|
83
|
+
scale_percentage_min: Series[String] = pa.Field(coerce=True, description="Salary Scale Min Percentage", alias="ScalePercentageMin")
|
|
84
|
+
guid_salary_table_scale: Series[String] = pa.Field(coerce=True, description="GUID Salary table scale", alias="GuidSalaryTableScale")
|
|
85
|
+
company_id: Series[String] = pa.Field(coerce=True, description="Company ID", alias="companyId")
|
|
86
|
+
|
|
87
|
+
class SalaryStepsGet(BrynQPanderaDataFrameModel):
|
|
88
|
+
step: Series[String] = pa.Field(coerce=True, description="Salary Step", alias="Step")
|
|
89
|
+
step_description: Series[String] = pa.Field(coerce=True, description="Salary Step Description", alias="StepDescription")
|
|
90
|
+
step_value: Series[String] = pa.Field(coerce=True, description="Salary Step Value", alias="StepValue")
|
|
91
|
+
guid_salary_table_step: Series[String] = pa.Field(coerce=True, description="GUID Salary Step table", alias="GuidSalaryTableStep")
|
|
92
|
+
company_id: Series[String] = pa.Field(coerce=True, description="Company ID", alias="companyId")
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from typing import Dict, Any, Optional
|
|
3
|
+
import pandas as pd
|
|
4
|
+
import pandera as pa
|
|
5
|
+
from pandera import Bool, Int
|
|
6
|
+
from pandera.typing import Series, String, Float, DateTime
|
|
7
|
+
import pandera.extensions as extensions
|
|
8
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
9
|
+
from pydantic import BaseModel, Field
|
|
10
|
+
|
|
11
|
+
# ---------------------------
|
|
12
|
+
# Get Schemas
|
|
13
|
+
# ---------------------------
|
|
14
|
+
class ScheduleGet(BrynQPanderaDataFrameModel):
|
|
15
|
+
schedule_id: Series[String] = pa.Field(coerce=True, description="Schedule ID", alias="scheduleId")
|
|
16
|
+
start_date: Series[datetime] = pa.Field(coerce=True, description="Start Date", alias="startDate")
|
|
17
|
+
parttime_percentage: Series[Float] = pa.Field(coerce=True, description="Part-Time Percentage", alias="parttimePercentage")
|
|
18
|
+
week1_hours_monday: Series[Float] = pa.Field(coerce=True, description="Week 1 Hours Monday", alias="week1.hoursMonday")
|
|
19
|
+
week1_hours_tuesday: Series[Float] = pa.Field(coerce=True, description="Week 1 Hours Tuesday", alias="week1.hoursTuesday")
|
|
20
|
+
week1_hours_wednesday: Series[Float] = pa.Field(coerce=True, description="Week 1 Hours Wednesday", alias="week1.hoursWednesday")
|
|
21
|
+
week1_hours_thursday: Series[Float] = pa.Field(coerce=True, description="Week 1 Hours Thursday", alias="week1.hoursThursday")
|
|
22
|
+
week1_hours_friday: Series[Float] = pa.Field(coerce=True, description="Week 1 Hours Friday", alias="week1.hoursFriday")
|
|
23
|
+
week1_hours_saturday: Series[Float] = pa.Field(coerce=True, description="Week 1 Hours Saturday", alias="week1.hoursSaturday")
|
|
24
|
+
week1_hours_sunday: Series[Float] = pa.Field(coerce=True, description="Week 1 Hours Sunday", alias="week1.hoursSunday")
|
|
25
|
+
week2_hours_monday: Series[Float] = pa.Field(coerce=True, description="Week 2 Hours Monday", alias="week2.hoursMonday")
|
|
26
|
+
week2_hours_tuesday: Series[Float] = pa.Field(coerce=True, description="Week 2 Hours Tuesday", alias="week2.hoursTuesday")
|
|
27
|
+
week2_hours_wednesday: Series[Float] = pa.Field(coerce=True, description="Week 2 Hours Wednesday", alias="week2.hoursWednesday")
|
|
28
|
+
week2_hours_thursday: Series[Float] = pa.Field(coerce=True, description="Week 2 Hours Thursday", alias="week2.hoursThursday")
|
|
29
|
+
week2_hours_friday: Series[Float] = pa.Field(coerce=True, description="Week 2 Hours Friday", alias="week2.hoursFriday")
|
|
30
|
+
week2_hours_saturday: Series[Float] = pa.Field(coerce=True, description="Week 2 Hours Saturday", alias="week2.hoursSaturday")
|
|
31
|
+
week2_hours_sunday: Series[Float] = pa.Field(coerce=True, description="Week 2 Hours Sunday", alias="week2.hoursSunday")
|
|
32
|
+
created_at: Series[datetime] = pa.Field(coerce=True, description="Created At", alias="createdAt")
|
|
33
|
+
employee_id: Series[String] = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
34
|
+
|
|
35
|
+
class _Annotation:
|
|
36
|
+
primary_key = "schedule_id"
|
|
37
|
+
foreign_keys = {
|
|
38
|
+
"employee_id": {
|
|
39
|
+
"parent_schema": "EmployeeSchema",
|
|
40
|
+
"parent_column": "employee_id",
|
|
41
|
+
"cardinality": "N:1"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
# ---------------------------
|
|
47
|
+
# Upload Schemas
|
|
48
|
+
# ---------------------------
|
|
49
|
+
class ScheduleHours(BaseModel):
|
|
50
|
+
"""Schedule hours for each day of the week"""
|
|
51
|
+
hours_monday: Optional[float] = Field(None, description="Monday hours", alias="hoursMonday")
|
|
52
|
+
hours_tuesday: Optional[float] = Field(None, description="Tuesday hours", alias="hoursTuesday")
|
|
53
|
+
hours_wednesday: Optional[float] = Field(None, description="Wednesday hours", alias="hoursWednesday")
|
|
54
|
+
hours_thursday: Optional[float] = Field(None, description="Thursday hours", alias="hoursThursday")
|
|
55
|
+
hours_friday: Optional[float] = Field(None, description="Friday hours", alias="hoursFriday")
|
|
56
|
+
hours_saturday: Optional[float] = Field(None, description="Saturday hours", alias="hoursSaturday")
|
|
57
|
+
hours_sunday: Optional[float] = Field(None, description="Sunday hours", alias="hoursSunday")
|
|
58
|
+
|
|
59
|
+
class ScheduleCreate(BaseModel):
|
|
60
|
+
"""
|
|
61
|
+
Pydantic model for creating a new schedule
|
|
62
|
+
"""
|
|
63
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
64
|
+
start_date_schedule: datetime = Field(..., description="Start date of the schedule", example="2021-01-01T09:29:18Z", alias="startDate")
|
|
65
|
+
hours_per_week: Optional[float] = Field(None, description="Hours per week", example=40, alias="hoursPerWeek")
|
|
66
|
+
week1: Optional[ScheduleHours] = Field(None, description="Week 1 schedule hours", alias="week1")
|
|
67
|
+
week2: Optional[ScheduleHours] = Field(None, description="Week 2 schedule hours", alias="week2")
|
|
68
|
+
|
|
69
|
+
class Config:
|
|
70
|
+
json_encoders = {
|
|
71
|
+
datetime: lambda v: v.isoformat()
|
|
72
|
+
}
|
|
73
|
+
schema_extra = {
|
|
74
|
+
"example": {
|
|
75
|
+
"start_date": "2021-01-01T09:29:18Z",
|
|
76
|
+
"hours_per_week": 40,
|
|
77
|
+
"week1": {
|
|
78
|
+
"hours_monday": 8,
|
|
79
|
+
"hours_tuesday": 8,
|
|
80
|
+
"hours_wednesday": 8,
|
|
81
|
+
"hours_thursday": 8,
|
|
82
|
+
"hours_friday": 2.5,
|
|
83
|
+
"hours_saturday": 0,
|
|
84
|
+
"hours_sunday": 0
|
|
85
|
+
},
|
|
86
|
+
"week2": {
|
|
87
|
+
"hours_monday": 8,
|
|
88
|
+
"hours_tuesday": 8,
|
|
89
|
+
"hours_wednesday": 8,
|
|
90
|
+
"hours_thursday": 8,
|
|
91
|
+
"hours_friday": 2.5,
|
|
92
|
+
"hours_saturday": 0,
|
|
93
|
+
"hours_sunday": 0
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import math
|
|
2
|
+
import pandas as pd
|
|
3
|
+
import pandera as pa
|
|
4
|
+
from pandera import Bool
|
|
5
|
+
from pandera.typing import Series, String, Float, DateTime
|
|
6
|
+
import pandera.extensions as extensions
|
|
7
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
8
|
+
from typing import Optional, Annotated
|
|
9
|
+
from pydantic import BaseModel, Field, StringConstraints
|
|
10
|
+
from datetime import datetime
|
|
11
|
+
|
|
12
|
+
class SocialInsuranceUpdate(BaseModel):
|
|
13
|
+
employee_id: int = Field(None, example="1234567890", description="Employee ID", alias="EmployeeId")
|
|
14
|
+
influence_obliged_insurance: Optional[bool] = Field(None, example="1234567890", description="Influence Obliged Insurance", alias="InfluenceObligedInsurance")
|
|
15
|
+
wage_cost_benefit: bool = Field(..., example="1234567890", description="Wage Cost Benefit", alias="WageCostBenefit")
|
|
16
|
+
code_cao: int = Field(..., example="1234567890", description="Code Cao", alias="CodeCao")
|
|
17
|
+
wao_wia: bool = Field(..., example="1234567890", description="Wao Wia", alias="Wao_Wia")
|
|
18
|
+
ww: bool = Field(..., example="1234567890", description="Ww", alias="Ww")
|
|
19
|
+
zw: bool = Field(..., example="1234567890", description="Zw", alias="Zw")
|
|
20
|
+
income_related_contribution_zvw: bool = Field(None, example="1234567890", description="Income Related Contribution Zvw", alias="IncomeRelatedContributionZvw")
|
|
21
|
+
code_zvw: Optional[int] = Field(None, example="1234567890", description="Code Zvw", alias="CodeZvw")
|
|
22
|
+
risk_group: int = Field(None, example="1234567890", description="Risk Group", alias="RiskGroup")
|
|
23
|
+
sector: int = Field(None, example="1234567890", description="Sector", alias="Sector")
|
|
24
|
+
employment_type: int = Field(None, example="1234567890", description="Employment Type", alias="EmploymentType")
|
|
25
|
+
phase_classification: int = Field(None, example="1234567890", description="Phase Classification", alias="PhaseClassification")
|
|
26
|
+
employment_sequence_tax_id: int = Field(None, example="1234567890", description="Employment Sequence Tax Id", alias="EmploymentSequenceTaxId")
|
|
27
|
+
|
|
28
|
+
def to_soap_settings(self, soap_client):
|
|
29
|
+
"""Convert to SOAP SVWSettings object"""
|
|
30
|
+
SVWSettingsType = soap_client.get_type(
|
|
31
|
+
'{https://api.nmbrs.nl/soap/v3/EmployeeService}SVWSettings'
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
# Get payload with alias renaming, excluding employee_id field
|
|
35
|
+
payload = self.model_dump(exclude_none=True, by_alias=True, exclude={'employee_id'})
|
|
36
|
+
|
|
37
|
+
return SVWSettingsType(**payload)
|
|
38
|
+
|
|
39
|
+
class Config:
|
|
40
|
+
populate_by_name = True
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import math
|
|
2
|
+
import pandas as pd
|
|
3
|
+
import pandera as pa
|
|
4
|
+
from pandera import Bool
|
|
5
|
+
from pandera.typing import Series, String, Float, DateTime
|
|
6
|
+
import pandera.extensions as extensions
|
|
7
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
8
|
+
from typing import Optional, Annotated
|
|
9
|
+
from pydantic import BaseModel, Field, StringConstraints
|
|
10
|
+
from datetime import datetime
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class WageTaxSettingsGet(BrynQPanderaDataFrameModel):
|
|
14
|
+
wagetax_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Loonaangifte ID", alias="LoonaangifteID")
|
|
15
|
+
serial_number: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Serial Number", alias="SerialNumber")
|
|
16
|
+
payment_reference: Series[String] = pa.Field(coerce=True, description="Payment Reference", alias="PaymentReference")
|
|
17
|
+
total_general: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Total General", alias="TotalGeneral")
|
|
18
|
+
period: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Period", alias="Period")
|
|
19
|
+
year: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Year", alias="Year")
|
|
20
|
+
status: Series[String] = pa.Field(coerce=True, description="Status", alias="Status")
|
|
21
|
+
sent_at: Series[DateTime] = pa.Field(coerce=True, description="Sent At", alias="SentAt")
|
|
22
|
+
period_start: Series[DateTime] = pa.Field(coerce=True, description="Tijdvak Start", alias="TijdvakStart")
|
|
23
|
+
period_end: Series[DateTime] = pa.Field(coerce=True, description="Tijdvak End", alias="TijdvakEnd")
|
|
24
|
+
correction_period_start: Series[DateTime] = pa.Field(nullable=True, coerce=True, description="Correction Tijdvak Start", alias="CorrectionTijdvakStart")
|
|
25
|
+
correction_period_end: Series[DateTime] = pa.Field(nullable=True, coerce=True, description="Correction Tijdvak End", alias="CorrectionTijdvakEnd")
|
|
26
|
+
|
|
27
|
+
# <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
|
28
|
+
# <soap:Body>
|
|
29
|
+
# <WageTax_GetListResponse xmlns="https://api.nmbrs.nl/soap/v3/EmployeeService">
|
|
30
|
+
# <WageTax_GetListResult>
|
|
31
|
+
# <WageTaxSettings>
|
|
32
|
+
# <Id>2998190</Id>
|
|
33
|
+
# <JaarloonBT>12144.00</JaarloonBT>
|
|
34
|
+
# <AfwBijzTariefLH>0</AfwBijzTariefLH>
|
|
35
|
+
# <AutoKleineBanenRegeling>true</AutoKleineBanenRegeling>
|
|
36
|
+
# <Loonheffingkorting>true</Loonheffingkorting>
|
|
37
|
+
# <Voordeelreg>true</Voordeelreg>
|
|
38
|
+
# <Loonheffing>true</Loonheffing>
|
|
39
|
+
# <CodeAfdrachtvermindering>0</CodeAfdrachtvermindering>
|
|
40
|
+
# <KleurTabel>1</KleurTabel>
|
|
41
|
+
# <SoortInkomen>15</SoortInkomen>
|
|
42
|
+
# <SpecialeTabel>0</SpecialeTabel>
|
|
43
|
+
# <TijdvakTabel>2</TijdvakTabel>
|
|
44
|
+
# <VakantieBonnen>0</VakantieBonnen>
|
|
45
|
+
# <CodeCalc30PercRule>0</CodeCalc30PercRule>
|
|
46
|
+
# </WageTaxSettings>
|
|
47
|
+
# </WageTax_GetListResult>
|
|
48
|
+
# </WageTax_GetListResponse>
|
|
49
|
+
# </soap:Body>
|
|
50
|
+
# </soap:Envelope>
|
|
51
|
+
|
|
52
|
+
class WageTaxGet(BrynQPanderaDataFrameModel):
|
|
53
|
+
wage_tax_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Wage Tax ID", alias="Id")
|
|
54
|
+
employee_id: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Employee ID", alias="EmployeeId")
|
|
55
|
+
yearly_salary: Series[pd.Float64Dtype] = pa.Field(coerce=True, description="Yearly Salary", alias="JaarloonBT")
|
|
56
|
+
deviation_special_rate_payroll_tax_deduction: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Afw Bijz Tarief LH", alias="AfwBijzTariefLH")
|
|
57
|
+
auto_small_jobs: Series[Bool] = pa.Field(coerce=True, description="Auto Kleine Banen Regeling", alias="AutoKleineBanenRegeling")
|
|
58
|
+
payroll_tax_deduction: Series[Bool] = pa.Field(coerce=True, description="Loonheffingkorting", alias="Loonheffingkorting")
|
|
59
|
+
benefit_scheme: Series[Bool] = pa.Field(coerce=True, description="Voordeelreg", alias="Voordeelreg")
|
|
60
|
+
payroll_tax: Series[Bool] = pa.Field(coerce=True, description="Loonheffing", alias="Loonheffing")
|
|
61
|
+
code_tax_reduction: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Code Afdrachtvermindering", alias="CodeAfdrachtvermindering")
|
|
62
|
+
color_table: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Kleur Tabel", alias="KleurTabel")
|
|
63
|
+
type_of_income: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Soort Inkomen", alias="SoortInkomen")
|
|
64
|
+
special_table: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Speciale Tabel", alias="SpecialeTabel")
|
|
65
|
+
period_table: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Tijdvak Tabel", alias="TijdvakTabel")
|
|
66
|
+
holiday_vouchers: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Vakantie Bonnen", alias="VakantieBonnen")
|
|
67
|
+
code_calculate_30_percent_rule: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Code Calc 30% Rule", alias="CodeCalc30PercRule")
|
|
68
|
+
|
|
69
|
+
class WageTaxUpdate(BaseModel):
|
|
70
|
+
employee_id: Optional[int] = Field(None, example="1234567890", description="Employee ID", alias="EmployeeId")
|
|
71
|
+
wage_tax_id: Optional[int] = Field(None, example="1234567890", description="Wage Tax Settings ID", alias="Id")
|
|
72
|
+
yearly_salary: Optional[float] = Field(None, example="1234567890", description="Yearly Salary", alias="JaarloonBT")
|
|
73
|
+
deviation_special_rate_payroll_tax_deduction: Optional[float] = Field(None, example="1234567890", description="Afw Bijz Tarief LH", alias="AfwBijzTariefLH")
|
|
74
|
+
auto_small_jobs: Optional[bool] = Field(None, example="1234567890", description="Auto Kleine Banen Regeling", alias="AutoKleineBanenRegeling")
|
|
75
|
+
payroll_tax_deduction: Optional[bool] = Field(None, example="1234567890", description="Loonheffingkorting", alias="Loonheffingkorting")
|
|
76
|
+
benefit_scheme: Optional[bool] = Field(None, example="1234567890", description="Voordeelreg", alias="Voordeelreg")
|
|
77
|
+
payroll_tax: Optional[bool] = Field(None, example="1234567890", description="Loonheffing", alias="Loonheffing")
|
|
78
|
+
code_tax_reduction: Optional[int] = Field(None, example="1234567890", description="Code Afdrachtvermindering", alias="CodeAfdrachtvermindering")
|
|
79
|
+
color_table: Optional[int] = Field(None, example="1234567890", description="Kleur Tabel", alias="KleurTabel")
|
|
80
|
+
type_of_income: Optional[int] = Field(None, example="1234567890", description="Soort Inkomen", alias="SoortInkomen")
|
|
81
|
+
special_table: Optional[int] = Field(None, example="1234567890", description="Speciale Tabel", alias="SpecialeTabel")
|
|
82
|
+
period_table: Optional[int] = Field(None, example="1234567890", description="Tijdvak Tabel", alias="TijdvakTabel")
|
|
83
|
+
holiday_vouchers: Optional[int] = Field(None, example="1234567890", description="Vakantie Bonnen", alias="VakantieBonnen")
|
|
84
|
+
code_calculate_30_percent_rule: Optional[int] = Field(None, example="1234567890", description="Code Calc 30% Rule", alias="CodeCalc30PercRule")
|
|
85
|
+
|
|
86
|
+
def to_soap_settings(self, soap_client):
|
|
87
|
+
"""Convert to SOAP WageTaxSettings object"""
|
|
88
|
+
WageTaxSettingsType = soap_client.get_type(
|
|
89
|
+
'{https://api.nmbrs.nl/soap/v3/EmployeeService}WageTaxSettings'
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
# Get payload with alias renaming, excluding employee_id field
|
|
93
|
+
payload = self.model_dump(exclude_none=True, by_alias=True, exclude={'employee_id'})
|
|
94
|
+
|
|
95
|
+
return WageTaxSettingsType(**payload)
|
|
96
|
+
|
|
97
|
+
class Config:
|
|
98
|
+
populate_by_name = True
|