joshuad31 / TandaPay-Simulation

A simulation for TandaPay
1 stars 2 forks source link

In the user account system, create a process of refunds for full month account scenarios #24

Open JamesonWelch opened 1 year ago

JamesonWelch commented 1 year ago

Overflow Refund: Full Month (queue) Account Balance Refund Process (no unpaid claims)

There are several scenarios that would invoke a refund protocol. This task is concerned with the scenario when all month accounts are full and the next premium is now due. Think of the month accounts as a kind of overflow process. A premium always gets paid to the 'month 0' (m_0) account. If there is already a balance in m_0, then that balance needs to get 'pushed' to the next month's account (m_1) when the premium is paid (sent from wallet to m_0). If m_1 has a balance, that balance gets pushed to m_2 and so on. For the last month account (we'll consider it m_3), when this balance gets pushed, this is a full month account refund scenario where the balance of the last month's account goes back to the policyholder's wallet.

Deliverable

Create a method that allows the last month's account to be sent to the policyholder's wallet in the event of a premium payment when all month accounts are full. You may need to create the month account 'push' feature first.