Skip to content

Commit

Permalink
Generalized the parameters of format_and_fetch_deduction_info (#103)
Browse files Browse the repository at this point in the history
* Generalized the parameters of format and fetch deduction info

* ruff fix

* review comment fixes

* review comment fixes

* review comment fixes

* ruff fix

* Refactored Data Models

* ruff fix

* Review Comment Fixes

* Review Comment Fixes

* refactored Unique Id

* renamed employees_role_data

* company id addition

* removed eum

* metadata renamed

* review comment fixes

* review comment fixes

* review comment fixes

* review comment fixes

---------

Co-authored-by: AkshayContributes <[email protected]>
  • Loading branch information
AkshayContributes and AkshayContributes authored Dec 20, 2024
1 parent 0c9a8d0 commit c524e6a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ class ExternalDeductionCodeToRipplingCode:
rippling_code: str
rippling_deduction_field: DeductionCodeField

class EmployeeRoleData:
role_id: str
employee_number: str | None

class EmployeeDeductionMetadata:
deduction_codes: list[ExternalDeductionCodeToRipplingCode]
employees_role_data: list[EmployeeRoleData] | None
company_id: str | None
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from flux_sdk.benefits_administration.capabilities.process_employees_deductions.data_models import (
DeductionDetails,
ExternalDeductionCodeToRipplingCode,
EmployeeDeductionMetadata,
)


Expand All @@ -18,12 +18,14 @@ class ProcessEmployeesDeductions(ABC):
@staticmethod
@abstractmethod
def format_and_fetch_deduction_info(
stream: StringIO, deduction_code_mapping: list[ExternalDeductionCodeToRipplingCode]
stream: StringIO,
metadata: EmployeeDeductionMetadata
) -> list[DeductionDetails]:
"""
This method receives the file which contains the deductions relevant to the companies employees and returns the
deductions details for each employee
:param StringIO:
:param list[ExternalDeductionCodeToRipplingCode]:
:param StringIO: filestream
:param EmployeeDeductionMetadata: contains metadata for the deduction like deduction code mapping
and mappings like employee_id: role_id, and the company's unique id type
:return list[DeductionDetails]:
"""

0 comments on commit c524e6a

Please sign in to comment.