APS - Account Service

Methods

Create Account

Method Details

Value

Method Details

Value

Visibility

Public

Method Parameters

TransactionDto, Transaction

Return Parameters

AccountDto

Functionality

This method is invoked when a new Account is to created.

  1. Create a new Account Number

  2. Create a base Account Entity indicating that this is a new Account (matchFound is set to False), associate the account with the transaction that was received to create the account.

  3. Retrieve the members from the transaction and create the member entities.

  4. Create the enrollment span based on the data received in the transaction.

  5. Create the sponsor, payer and broker details as received in the transaction.

  6. Create an AccountDto object based on the account and its related entity that was created in the database.

Update Account (Overloaded Method)

Method Details

Value

Method Details

Value

Visibility

Public

Method Parameters

String (Account Number), TransactionDto, Transaction

Return Parameter

AccountDto

Functionality

This method is invoked when an existing account is being updated and the account number of the account is available.

Retrieve the account dto for the account number from MMS (Member management service) and invoke the overloaded update account method with the account dto that was retrieved.

Update Account (Overloaded Method)

Method Details

Value

Method Details

Value

Visibility

Public

Method Parameters

AccountDto, TransactionDto, Transaction

Return Parameter

AccountDto

Functionality

This method is invoked when an existing account is being updated and the account dto of the account to be updated is available. Follow the below steps to update the existing account.

  1. Create the account entity and save it in the APS database

  2. Invoke update account method from add transaction helper to make the necessary updates to the account.

  3. Create the account dto object with the all the updates and return the object.

Determine Enrollment Span Status

Method Details

Value

Method Details

Value

Visibility

Public

Method Parameters

EnrollmentSpanStatusDto

Return Parameter

String (Enrollment Span Status)

Functionality

Invoke the enrollment span determination status method in Enrollment Span Helper to get the status of the enrollment span and return the value.

Create Account Dto

Method Details

Value

Method Details

Value

Visibility

Private

Method Parameters

Account, String (ZTCN)

Return

AccountDto

Functionality

This method simply takes the account entity can converts into Account Dto with the help of the member mapper and helper classes, of the individual entities with the account.