Skip to content

Central-Settlement: Refactor handlers model and domain to align with the OSS standards and architecture #2057

Description

@vgenev

Goal:

As a Mojaloop Developer

I want to Ensure that all the handlers have clearly separated business logic (domain) from data access (model), use enums from central-services-shared library and expose only service API endpoints

so that central-settlement service follows OSS standards for code structure and separation of concerns

Acceptance Criteria:

  • Service Domain layer contains all logic required to process the request from a functional perspective
  • Model layer cares only for database access
  • All constants are loaded from config or central-services-shared library
  • Handlers expose only /health and /metrics api
  • Rename the transferSettlement handler to grossSettlement handler
  • Rename the settlementWindow handler to deferredSettlement handler

Complexity: Low

Uncertainty: Low


Tasks:

  • Move all business logic out of the model to domain layer
  • align both the client.id and group.id to match the name of the settlement handler
  • use ENUMS instead of 'GROS, 'SETTLED' and others if any
  • expose only /health and /metric operations on handlers APIs - /metric is not available in the whole service atm
  • Rename the transferSettlement handler to grossSettlement handler
  • Rename the settlementWindow handler to deferredSettlement handler
  • move out configurations from source to config file: Feature/#1945 cgs merge central-settlement#338 (comment)

Done

  • Acceptance Criteria pass
  • Designs are up-to date
  • Unit Tests pass
  • Integration Tests pass
  • Code Style & Coverage meets standards
  • Changes made to config (default.json) are broadcast to team and follow-up tasks added to update helm charts and other deployment config.
  • TBD

Pull Requests:

Follow-up:

  • N/A

Dependencies:

  • N/A

Accountability:

  • Owner: TBC
  • QA/Review: TBC

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

oss-coreThis is an issue - story or epic related to a feature on a Mojaloop core service or related to itstory

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions