brynq-sdk-acerta 1.1.0__tar.gz → 1.1.3__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.
Files changed (42) hide show
  1. brynq_sdk_acerta-1.1.3/PKG-INFO +21 -0
  2. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/acerta.py +16 -8
  3. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/addresses.py +3 -0
  4. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/address.py +3 -0
  5. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/agreement.py +3 -0
  6. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/company_car.py +7 -0
  7. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/contact_information.py +3 -0
  8. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/cost_center.py +3 -0
  9. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/employee.py +6 -0
  10. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/family.py +6 -0
  11. brynq_sdk_acerta-1.1.3/brynq_sdk_acerta.egg-info/PKG-INFO +21 -0
  12. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/setup.py +1 -1
  13. brynq_sdk_acerta-1.1.0/PKG-INFO +0 -10
  14. brynq_sdk_acerta-1.1.0/brynq_sdk_acerta.egg-info/PKG-INFO +0 -10
  15. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/README.md +0 -0
  16. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/__init__.py +0 -0
  17. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/agreements.py +0 -0
  18. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/bank_accounts.py +0 -0
  19. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/code_lists.py +0 -0
  20. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/company_cars.py +0 -0
  21. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/contact_information.py +0 -0
  22. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/cost_centers.py +0 -0
  23. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/employees.py +0 -0
  24. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/employees_additional_information.py +0 -0
  25. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/employer.py +0 -0
  26. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/family_members.py +0 -0
  27. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/family_situation.py +0 -0
  28. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/inservice.py +0 -0
  29. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/salaries.py +0 -0
  30. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/__init__.py +0 -0
  31. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/bank_account.py +0 -0
  32. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/employer.py +0 -0
  33. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/in_service.py +0 -0
  34. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/in_service_config.py +0 -0
  35. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/planning.py +0 -0
  36. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/salaries.py +0 -0
  37. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta.egg-info/SOURCES.txt +0 -0
  38. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta.egg-info/dependency_links.txt +0 -0
  39. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta.egg-info/not-zip-safe +0 -0
  40. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta.egg-info/requires.txt +0 -0
  41. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta.egg-info/top_level.txt +0 -0
  42. {brynq_sdk_acerta-1.1.0 → brynq_sdk_acerta-1.1.3}/setup.cfg +0 -0
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.4
2
+ Name: brynq_sdk_acerta
3
+ Version: 1.1.3
4
+ Summary: Acerta wrapper from BrynQ
5
+ Author: BrynQ
6
+ Author-email: support@brynq.com
7
+ License: BrynQ License
8
+ Requires-Dist: pandas<3.0.0,>=2.2.0
9
+ Requires-Dist: pydantic<3.0.0,>=2.5.0
10
+ Requires-Dist: pandera<1.0.0,>=0.16.0
11
+ Requires-Dist: requests<3.0.0,>=2.25.1
12
+ Requires-Dist: brynq-sdk-functions>=2.0.5
13
+ Requires-Dist: brynq-sdk-brynq>=3
14
+ Dynamic: author
15
+ Dynamic: author-email
16
+ Dynamic: description
17
+ Dynamic: license
18
+ Dynamic: requires-dist
19
+ Dynamic: summary
20
+
21
+ Acerta wrapper from BrynQ
@@ -39,7 +39,7 @@ class Acerta(BrynQ):
39
39
 
40
40
  # Extract credentials and configure OAuth2 session with automatic token renewal
41
41
  credentials = self.interfaces.credentials.get(
42
- system="acerta-acceptance",
42
+ system="acerta",
43
43
  system_type=system_type,
44
44
  )
45
45
  data = credentials.get("data", {})
@@ -66,6 +66,8 @@ class Acerta(BrynQ):
66
66
  include_client_id=True,
67
67
  )
68
68
 
69
+ self._refreshing_token = False
70
+
69
71
  # Keep access_token attribute for backward compatibility
70
72
  self.access_token = token.get("access_token")
71
73
 
@@ -101,17 +103,23 @@ class Acerta(BrynQ):
101
103
 
102
104
  def _ensure_valid_token(self):
103
105
  """Ensure the OAuth token exists and is not about to expire."""
106
+ if self._refreshing_token:
107
+ return
104
108
  tok = getattr(self.session, "token", {}) or {}
105
109
  expires_at = tok.get("expires_at")
106
110
  # Refresh if missing or expiring within 30 seconds
107
111
  if not expires_at or (expires_at - time.time()) < 30:
108
- new_token = self.session.fetch_token(
109
- token_url=self._token_url,
110
- client_id=self._client_id,
111
- client_secret=self._client_secret,
112
- include_client_id=True,
113
- )
114
- self.access_token = new_token.get("access_token")
112
+ self._refreshing_token = True
113
+ try:
114
+ new_token = self.session.fetch_token(
115
+ token_url=self._token_url,
116
+ client_id=self._client_id,
117
+ client_secret=self._client_secret,
118
+ include_client_id=True,
119
+ )
120
+ self.access_token = new_token.get("access_token")
121
+ finally:
122
+ self._refreshing_token = False
115
123
 
116
124
  def _request_with_pre_expiry(self, method, url, **kwargs):
117
125
  self._ensure_valid_token()
@@ -47,6 +47,9 @@ class Addresses:
47
47
  params=params,
48
48
  timeout=self.acerta.TIMEOUT,
49
49
  )
50
+
51
+ if response.status_code == 404:
52
+ continue
50
53
  response.raise_for_status()
51
54
  content = response.json()
52
55
  df = pd.json_normalize(
@@ -69,6 +69,9 @@ CorrespondenceAddressUpdate = Address
69
69
 
70
70
  class AddressUpdate(BaseModel):
71
71
  """Schema for PATCH /employee-data-management/v3/employees/{employeeId}/addresses endpoint"""
72
+ # Function parameters
73
+ employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
74
+
72
75
  from_date: Optional[str] = Field(None, example="2022-01-01", description="Date from which this information is valid", alias="fromDate")
73
76
  official_address: Optional[Address] = Field(None, description="Official address of the employee", alias="officialAddress", json_schema_extra={"prefix": "official_address_"})
74
77
  correspondence_address: Optional[Address] = Field(None, description="Correspondence address of the employee", alias="correspondenceAddress", json_schema_extra={"prefix": "correspondence_address_"})
@@ -398,6 +398,9 @@ class AgreementCostCenterAllocationGet(BrynQPanderaDataFrameModel):
398
398
  class AgreementRemunerationBankAccountUpdate(BaseModel):
399
399
  """Schema for PUT /employee-data-management/v3/employees/agreement/{agreementId}/remuneration-bank-account endpoint"""
400
400
 
401
+ # Function parameters
402
+ agreement_id: str = Field(..., description="Agreement identifier", alias="agreementId")
403
+
401
404
  iban: str = Field(..., min_length=1, max_length=34, example="BE68539007547034", description="Bank account number", alias="iban")
402
405
  bic: Optional[str] = Field(None, min_length=8, max_length=11, example="GEBABEBB", description="Bank identification code", alias="bic")
403
406
 
@@ -66,6 +66,9 @@ class CompanyCarCreate(BaseModel):
66
66
  """
67
67
  Schema for POST /v1/employers/{employerId}/company-cars endpoint
68
68
  """
69
+ # Function parameters
70
+ employer_id: str = Field(..., description="Employer identifier", alias="employerId")
71
+
69
72
  period: CompanyCarPeriod = Field(..., description="The time span of the record for which this data is valid", alias="period", json_schema_extra={"prefix": "period_"})
70
73
  license_plate: str = Field(..., min_length=1, max_length=10, example="2-DCR-765", description="License plate of the car", alias="licensePlate")
71
74
  brand: Optional[str] = Field(None, min_length=1, max_length=35, example="Renault", description="Brand of the car", alias="brand")
@@ -97,6 +100,10 @@ class CompanyCarPeriodPatch(BaseModel):
97
100
 
98
101
  class CompanyCarUpdate(BaseModel):
99
102
  """Schema for PATCH /v1/employers/{employerId}/company-cars/{companyCarId}"""
103
+ # Function parameters
104
+ employer_id: str = Field(..., description="Employer identifier", alias="employerId")
105
+ company_car_id: str = Field(..., description="Company car identifier", alias="companyCarId")
106
+
100
107
  period: Optional[CompanyCarPeriodPatch] = Field(None, description="The time span of the record for which this data is valid", alias="period", json_schema_extra={"prefix": "period_"})
101
108
  license_plate: Optional[str] = Field(None, min_length=1, max_length=10, example="2-DCR-765", description="License plate of the car", alias="licensePlate")
102
109
  brand: Optional[str] = Field(None, min_length=1, max_length=35, example="Renault", description="Brand of the car", alias="brand")
@@ -71,6 +71,9 @@ class EmergencyContact(BaseModel):
71
71
 
72
72
  class ContactInformationUpdate(BaseModel):
73
73
  """Schema for PATCH /employee-data-management/v3/employees/{employeeId}/contact-information - uses json_schema_extra for prefixes"""
74
+ # Function parameters
75
+ employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
76
+
74
77
  personal: Optional[Contact] = Field(None, description="Personal contact information", alias="personal", json_schema_extra={"prefix": "personal_"})
75
78
  work: Optional[Contact] = Field(None, description="Work contact information", alias="work", json_schema_extra={"prefix": "work_"})
76
79
  primary_emergency_contact: Optional[EmergencyContact] = Field(None, description="Primary emergency contact", alias="primaryEmergencyContact", json_schema_extra={"prefix": "primary_emergency_"})
@@ -69,6 +69,9 @@ class CostCenterCreate(BaseModel):
69
69
  Works with Functions.flat_to_nested_with_prefix() to convert flat dictionaries
70
70
  to properly nested structures.
71
71
  """
72
+ # Function parameters
73
+ employer_id: str = Field(..., description="Employer identifier", alias="employerId")
74
+
72
75
  cost_center_id: str = Field(..., min_length=1, max_length=12, example="4454-01", description="The service receiver cost center number", alias="costCenterId")
73
76
  descriptions: List[CostCenterDescription] = Field(..., min_items=1, max_items=3, description="Cost center descriptions per language", alias="descriptions", json_schema_extra={"prefix": "descriptions_"})
74
77
  period: CostCenterPeriod = Field(..., description="The time span of the record for which this data is valid", alias="period", json_schema_extra={"prefix": "period_"})
@@ -77,6 +77,9 @@ class AdditionalInformationGet(BrynQPanderaDataFrameModel):
77
77
 
78
78
  class AdditionalInformationUpdate(BaseModel):
79
79
  """Schema for PATCH /employee-data-management/v3/employees/{employeeId}/additional-information"""
80
+ # Function parameters
81
+ employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
82
+
80
83
  from_date: Optional[str] = Field(None, example="2022-01-01", description="Date from which the information is valid", alias="fromDate")
81
84
  educational_degree: Optional[str] = Field(None, min_length=2, max_length=2, example="05", description="Educational degree code", alias="educationalDegree")
82
85
  leadership_level: Optional[str] = Field(None, min_length=2, max_length=2, example="02", description="Leadership level code", alias="leadershipLevel")
@@ -145,6 +148,9 @@ class EmployeeBirth(BaseModel):
145
148
 
146
149
  class PersonalDetailsUpdate(BaseModel):
147
150
  """Schema for PATCH /employee-data-management/v3/employees/{employeeId}/personal-details"""
151
+ # Function parameters
152
+ employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
153
+
148
154
  name: Optional[EmployeeName] = Field(None, description="Name information", alias="name", json_schema_extra={"prefix": ""})
149
155
  birth: Optional[EmployeeBirth] = Field(None, description="Birth information", alias="birth", json_schema_extra={"prefix": ""})
150
156
  date_of_death: Optional[str] = Field(None, example="2022-01-01", description="Date of death", alias="dateOfDeath")
@@ -119,6 +119,9 @@ class FiscalDetails(BaseModel):
119
119
 
120
120
  class FamilySituationUpdate(BaseModel):
121
121
  """Schema for PATCH /v3/employees/{employeeId}/family-situation - uses json_schema_extra for prefixes"""
122
+ # Function parameters
123
+ employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
124
+
122
125
  from_date: Optional[str] = Field(None, example="2022-01-01", description="Date from when this data is valid", alias="fromDate")
123
126
  civil_status: Optional[CivilStatus] = Field(None, description="Civil status of the employee", alias="civilStatus", json_schema_extra={"prefix": "civil_status_"})
124
127
  partner: Optional[Partner] = Field(None, description="Information regarding the partner", alias="partner", json_schema_extra={"prefix": "partner_"})
@@ -165,6 +168,9 @@ class FamilyMemberOther(BaseModel):
165
168
 
166
169
  class FamilyMemberCreate(BaseModel):
167
170
  """Schema for POST /v1/employees/{employeeId}/family-members endpoint - uses json_schema_extra for prefixes"""
171
+ # Function parameters
172
+ employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
173
+
168
174
  valid_from: str = Field(..., example="2025-10-16", description="Date when the change is registered", alias="validFrom")
169
175
  history_from_date: Optional[str] = Field(None, example="2025-10-16", description="Date on which the value of the returned historical data is valid", alias="historyFromDate")
170
176
  sequence: Optional[str] = Field(None, min_length=3, max_length=3, example="001", description="Unique number per family member", alias="sequence")
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.4
2
+ Name: brynq_sdk_acerta
3
+ Version: 1.1.3
4
+ Summary: Acerta wrapper from BrynQ
5
+ Author: BrynQ
6
+ Author-email: support@brynq.com
7
+ License: BrynQ License
8
+ Requires-Dist: pandas<3.0.0,>=2.2.0
9
+ Requires-Dist: pydantic<3.0.0,>=2.5.0
10
+ Requires-Dist: pandera<1.0.0,>=0.16.0
11
+ Requires-Dist: requests<3.0.0,>=2.25.1
12
+ Requires-Dist: brynq-sdk-functions>=2.0.5
13
+ Requires-Dist: brynq-sdk-brynq>=3
14
+ Dynamic: author
15
+ Dynamic: author-email
16
+ Dynamic: description
17
+ Dynamic: license
18
+ Dynamic: requires-dist
19
+ Dynamic: summary
20
+
21
+ Acerta wrapper from BrynQ
@@ -2,7 +2,7 @@ from setuptools import setup, find_namespace_packages
2
2
 
3
3
  setup(
4
4
  name='brynq_sdk_acerta',
5
- version='1.1.0',
5
+ version='1.1.3',
6
6
  description='Acerta wrapper from BrynQ',
7
7
  long_description='Acerta wrapper from BrynQ',
8
8
  author='BrynQ',
@@ -1,10 +0,0 @@
1
- Metadata-Version: 1.0
2
- Name: brynq_sdk_acerta
3
- Version: 1.1.0
4
- Summary: Acerta wrapper from BrynQ
5
- Home-page: UNKNOWN
6
- Author: BrynQ
7
- Author-email: support@brynq.com
8
- License: BrynQ License
9
- Description: Acerta wrapper from BrynQ
10
- Platform: UNKNOWN
@@ -1,10 +0,0 @@
1
- Metadata-Version: 1.0
2
- Name: brynq-sdk-acerta
3
- Version: 1.1.0
4
- Summary: Acerta wrapper from BrynQ
5
- Home-page: UNKNOWN
6
- Author: BrynQ
7
- Author-email: support@brynq.com
8
- License: BrynQ License
9
- Description: Acerta wrapper from BrynQ
10
- Platform: UNKNOWN