brynq-sdk-bob 2.8.5__tar.gz → 2.9.1__tar.gz
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_bob-2.8.5 → brynq_sdk_bob-2.9.1}/PKG-INFO +1 -1
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/__init__.py +11 -1
- brynq_sdk_bob-2.9.1/brynq_sdk_bob/schemas/employment.py +32 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob.egg-info/PKG-INFO +1 -1
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/setup.py +1 -1
- brynq_sdk_bob-2.8.5/brynq_sdk_bob/schemas/employment.py +0 -31
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/bank.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/company.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/custom_tables.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/documents.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/employment.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/named_lists.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/payments.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/payroll_history.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/people.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/reports.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/salaries.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/schemas/__init__.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/schemas/bank.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/schemas/custom_tables.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/schemas/named_lists.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/schemas/payments.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/schemas/payroll_history.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/schemas/people.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/schemas/salary.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/schemas/timeoff.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/schemas/work.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/timeoff.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob/work.py +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob.egg-info/SOURCES.txt +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob.egg-info/dependency_links.txt +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob.egg-info/not-zip-safe +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob.egg-info/requires.txt +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/brynq_sdk_bob.egg-info/top_level.txt +0 -0
- {brynq_sdk_bob-2.8.5 → brynq_sdk_bob-2.9.1}/setup.cfg +0 -0
|
@@ -21,8 +21,9 @@ class Bob(BrynQ):
|
|
|
21
21
|
def __init__(self, system_type: Optional[Literal['source', 'target']] = None, test_environment: bool = True, debug: bool = False, target_system: str = None):
|
|
22
22
|
super().__init__()
|
|
23
23
|
self.timeout = 3600
|
|
24
|
+
self.test_environment = test_environment
|
|
24
25
|
self.headers = self._get_request_headers(system_type)
|
|
25
|
-
if test_environment:
|
|
26
|
+
if self.test_environment:
|
|
26
27
|
self.base_url = "https://api.sandbox.hibob.com/v1/"
|
|
27
28
|
else:
|
|
28
29
|
self.base_url = "https://api.hibob.com/v1/"
|
|
@@ -46,6 +47,15 @@ class Bob(BrynQ):
|
|
|
46
47
|
|
|
47
48
|
def _get_request_headers(self, system_type):
|
|
48
49
|
credentials = self.interfaces.credentials.get(system='bob', system_type=system_type)
|
|
50
|
+
# multiple creds possible, not fetched by environment test status, get first occurence
|
|
51
|
+
if isinstance(credentials, list):
|
|
52
|
+
credentials = next(
|
|
53
|
+
(
|
|
54
|
+
element for element in credentials
|
|
55
|
+
if element.get('data', {}).get('Test Environment') == self.test_environment
|
|
56
|
+
),
|
|
57
|
+
credentials[0]
|
|
58
|
+
)
|
|
49
59
|
auth_token = base64.b64encode(f"{credentials.get('data').get('User ID')}:{credentials.get('data').get('API Token')}".encode()).decode('utf-8')
|
|
50
60
|
headers = {
|
|
51
61
|
"accept": "application/json",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
import pandera as pa
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from pandera import Bool
|
|
5
|
+
from pandera.typing import Series, String, Float, DateTime
|
|
6
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
7
|
+
|
|
8
|
+
class EmploymentSchema(BrynQPanderaDataFrameModel):
|
|
9
|
+
id: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Employment ID", alias="id")
|
|
10
|
+
employee_id: Series[String] = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
11
|
+
active_effective_date: Series[DateTime] = pa.Field(coerce=True, description="Active Effective Date", alias="activeEffectiveDate")
|
|
12
|
+
contract: Optional[Series[String]] = pa.Field(coerce=True, nullable=True, description="Contract", alias="contract") # has a list of possible values
|
|
13
|
+
creation_date: Optional[Series[DateTime]] = pa.Field(coerce=True, nullable=True, description="Creation Date", alias="creationDate")
|
|
14
|
+
effective_date: Series[DateTime] = pa.Field(coerce=True, description="Effective Date", alias="effectiveDate")
|
|
15
|
+
end_effective_date: Optional[Series[DateTime]] = pa.Field(coerce=True, nullable=True, description="End Effective Date", alias="endEffectiveDate")
|
|
16
|
+
fte: Series[Float] = pa.Field(coerce=True, description="FTE", alias="fte")
|
|
17
|
+
is_current: Series[Bool] = pa.Field(coerce=True, description="Is Current", alias="isCurrent")
|
|
18
|
+
modification_date: Optional[Series[DateTime]] = pa.Field(coerce=True, nullable=True, description="Modification Date", alias="modificationDate")
|
|
19
|
+
salary_pay_type: Optional[Series[String]] = pa.Field(coerce=True, nullable=True, description="Salary Pay Type", alias="salaryPayType")
|
|
20
|
+
weekly_hours: Optional[Series[Float]] = pa.Field(coerce=True, nullable=True, description="Weekly Hours", alias="weeklyHours")
|
|
21
|
+
# weekly_hours_sort_factor: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False)
|
|
22
|
+
actual_working_pattern_working_pattern_type: Optional[Series[pa.String]] = pa.Field(nullable=True, description="Actual Working Pattern Working Pattern Type", alias="actualWorkingPattern.workingPatternType")
|
|
23
|
+
actual_working_pattern_days_sunday: Optional[Series[Float]] = pa.Field(nullable=True, description="Actual Working Pattern Days Sunday", alias="actualWorkingPattern.days.sunday")
|
|
24
|
+
actual_working_pattern_days_tuesday: Optional[Series[Float]] = pa.Field(nullable=True, description="Actual Working Pattern Days Tuesday", alias="actualWorkingPattern.days.tuesday")
|
|
25
|
+
actual_working_pattern_days_wednesday: Optional[Series[Float]] = pa.Field(nullable=True, description="Actual Working Pattern Days Wednesday", alias="actualWorkingPattern.days.wednesday")
|
|
26
|
+
actual_working_pattern_days_monday: Optional[Series[Float]] = pa.Field(nullable=True, description="Actual Working Pattern Days Monday", alias="actualWorkingPattern.days.monday")
|
|
27
|
+
actual_working_pattern_days_friday: Optional[Series[Float]] = pa.Field(nullable=True, description="Actual Working Pattern Days Friday", alias="actualWorkingPattern.days.friday")
|
|
28
|
+
actual_working_pattern_days_thursday: Optional[Series[Float]] = pa.Field(nullable=True, description="Actual Working Pattern Days Thursday", alias="actualWorkingPattern.days.thursday")
|
|
29
|
+
actual_working_pattern_days_saturday: Optional[Series[Float]] = pa.Field(nullable=True, description="Actual Working Pattern Days Saturday", alias="actualWorkingPattern.days.saturday")
|
|
30
|
+
|
|
31
|
+
class Config:
|
|
32
|
+
coerce = True
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import pandas as pd
|
|
2
|
-
import pandera as pa
|
|
3
|
-
from pandera import Bool
|
|
4
|
-
from pandera.typing import Series, String, Float, DateTime
|
|
5
|
-
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
6
|
-
|
|
7
|
-
class EmploymentSchema(BrynQPanderaDataFrameModel):
|
|
8
|
-
id: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Employment ID", alias="id")
|
|
9
|
-
employee_id: Series[String] = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
10
|
-
active_effective_date: Series[DateTime] = pa.Field(coerce=True, description="Active Effective Date", alias="activeEffectiveDate")
|
|
11
|
-
contract: Series[String] = pa.Field(coerce=True, nullable=True, description="Contract", alias="contract") # has a list of possible values
|
|
12
|
-
creation_date: Series[DateTime] = pa.Field(coerce=True, nullable=True, description="Creation Date", alias="creationDate")
|
|
13
|
-
effective_date: Series[DateTime] = pa.Field(coerce=True, description="Effective Date", alias="effectiveDate")
|
|
14
|
-
end_effective_date: Series[DateTime] = pa.Field(coerce=True, nullable=True, description="End Effective Date", alias="endEffectiveDate")
|
|
15
|
-
fte: Series[Float] = pa.Field(coerce=True, description="FTE", alias="fte")
|
|
16
|
-
is_current: Series[Bool] = pa.Field(coerce=True, description="Is Current", alias="isCurrent")
|
|
17
|
-
modification_date: Series[DateTime] = pa.Field(coerce=True, nullable=True, description="Modification Date", alias="modificationDate")
|
|
18
|
-
salary_pay_type: Series[String] = pa.Field(coerce=True, nullable=True, description="Salary Pay Type", alias="salaryPayType")
|
|
19
|
-
weekly_hours: Series[Float] = pa.Field(coerce=True, nullable=True, description="Weekly Hours", alias="weeklyHours")
|
|
20
|
-
# weekly_hours_sort_factor: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=False)
|
|
21
|
-
actual_working_pattern_working_pattern_type: Series[pa.String] = pa.Field(nullable=True, description="Actual Working Pattern Working Pattern Type", alias="actualWorkingPattern.workingPatternType")
|
|
22
|
-
actual_working_pattern_days_sunday: Series[Float] = pa.Field(nullable=True, description="Actual Working Pattern Days Sunday", alias="actualWorkingPattern.days.sunday")
|
|
23
|
-
actual_working_pattern_days_tuesday: Series[Float] = pa.Field(nullable=True, description="Actual Working Pattern Days Tuesday", alias="actualWorkingPattern.days.tuesday")
|
|
24
|
-
actual_working_pattern_days_wednesday: Series[Float] = pa.Field(nullable=True, description="Actual Working Pattern Days Wednesday", alias="actualWorkingPattern.days.wednesday")
|
|
25
|
-
actual_working_pattern_days_monday: Series[Float] = pa.Field(nullable=True, description="Actual Working Pattern Days Monday", alias="actualWorkingPattern.days.monday")
|
|
26
|
-
actual_working_pattern_days_friday: Series[Float] = pa.Field(nullable=True, description="Actual Working Pattern Days Friday", alias="actualWorkingPattern.days.friday")
|
|
27
|
-
actual_working_pattern_days_thursday: Series[Float] = pa.Field(nullable=True, description="Actual Working Pattern Days Thursday", alias="actualWorkingPattern.days.thursday")
|
|
28
|
-
actual_working_pattern_days_saturday: Series[Float] = pa.Field(nullable=True, description="Actual Working Pattern Days Saturday", alias="actualWorkingPattern.days.saturday")
|
|
29
|
-
|
|
30
|
-
class Config:
|
|
31
|
-
coerce = True
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|