Skip to content

Commit

Permalink
GITBOOK-984: No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
venky-ganapathy authored and gitbook-bot committed Aug 8, 2024
1 parent 48eac0c commit 410aa37
Showing 1 changed file with 34 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ layout:

This is a library project - that contains all the sqlalchemy models and pydantic schemas - that are required to provide the required features of a Sponsor Bank.

Persistent Objects - Design
## Persistent Objects - Design

**account**
### **account**

| Attribute | Deesreption |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand All @@ -29,7 +29,7 @@ Persistent Objects - Design
| available\_balance | <p>This is the available balance (funds available for use for disbursements)<br>available_balance = book_balance - blocked_amount</p> |
| blocked\_amount | <p>This is the total amount that has been reserved (earmarked) by the program for specific purposes.<br><br>The G2P Bridge - blocks the entire envelope amount - for every disbursement_envelope.<br><br>The sponsor bank - creates an Amount Block for every block request. These amount blocks are available in the table - fund_blocks. The sum total of all records in fund_blocks equals this blocked_amount</p> |

**fund\_blocks**
### **fund\_blocks**

| Attribute | Description |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand All @@ -39,15 +39,15 @@ Persistent Objects - Design
| amount | <p>The amount that has been blocked under this block_reference_no.<br><br>The g2p-bridge subsystem requests an amount block for the total envelope amount. <br><br>This amount reflects that total envelope amount in this scenario</p> |
| amount\_released | <p>The amount released - (partial) against this amount_block<br><br>In the g2p-bridge scenario, every disbursement diminishes (releases) the amount block partially<br><br>Once all the disbursements are effected, the amount released will equal to the amount blocked. When this happens, the column - blocked_amount in the account table - will become zero.<br></p> |

initiate\_payment\_batch\_requests
### initiate\_payment\_batch\_requests

| Attribute | Description |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| batch\_id | <p>The G2P Bridge will initiate payments in batches. <br>Each API invocation (initiate_payment) will result in a creation of a unique batch_id.<br>All individual disbursements (payments) in that request will be grouped under this batch_id.</p> |
| accounting\_log\_attempts | <p>The actual payment itself (generating book keeping entries) is handled asynchronously. A celery beat picks up all PENDING batches and delegates the batch_id to a task.<br>This attribute - keeps a count of these attempts.</p> |
| accounting\_status | <p>PENDING, PROCESSED<br>A celery beat picks all PENDING records and delegates the batch_id to a celery worker.<br>The worker picks up the individual payment records for this batch_id and effects book keeping entries for the "remitting_account"</p> |

initiate\_payment\_requests
### initiate\_payment\_requests

| Attribute | Description |
| ------------------------------------- | ----------- |
Expand Down Expand Up @@ -75,3 +75,32 @@ initiate\_payment\_requests
| narrative\_5 | |
| narrative\_6 | |

### accounting\_logs

| Attribute | Description |
| ----------------------------------- | ----------- |
| reference\_no | |
| corresponding\_block\_reference\_no | |
| customer\_reference\_no | |
| debit\_credit | |
| account\_number | |
| transaction\_amount | |
| transaction\_date | |
| transaction\_currency | |
| transaction\_code | |
| narrative\_1 | |
| narrative\_2 | |
| narrative\_3 | |
| narrative\_4 | |
| narrative\_5 | |
| narrative\_6 | |

### account\_statements

| Attribute | Description |
| ------------------------ | ----------- |
| id | |
| account\_number | |
| account\_statement\_lob | |
| account\_statement\_date | |

0 comments on commit 410aa37

Please sign in to comment.