-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from ministryofjustice/pfs-144-credit-on-account
pfs-144: credit-on-account event from finance to supervision
- Loading branch information
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
domains/Supervision/events/credit-on-account/examples/example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"clientId": 1, | ||
"creditRemaining": 10000 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: credit-on-account | ||
version: 0.0.1 | ||
summary: | | ||
The client has credit on account that cannot be applied to any open invoice or debt | ||
producers: | ||
- opg.supervision.finance | ||
consumers: | ||
- opg.supervision.sirius | ||
owners: | ||
- supervision | ||
--- | ||
|
||
## Context | ||
|
||
When a payment or other credit is received for a client but is greater than the client's outstanding debt, that credit | ||
is retained on their account. This may need to result in a refund to the client. | ||
|
||
## Trigger | ||
|
||
A client's credit balance is larger than their outstanding debt position. | ||
|
||
## Effect | ||
|
||
Sirius Supervision creates a Refund Review task on the client. | ||
|
||
<NodeGraph title="Consumer / Producer Diagram" /> | ||
|
||
<EventExamples /> | ||
|
||
<Schema /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$id": "https://opg.service.justice.gov.uk/opg.supervision.sirius/credit-on-account.json", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"title": "opg.supervision.sirius/credit-on-account", | ||
"type": "object", | ||
"properties": { | ||
"clientId": { | ||
"type": "integer", | ||
"description": "The client ID whose account is in credit" | ||
}, | ||
"creditRemaining": { | ||
"type": "integer", | ||
"description": "The amount of unapplied credit on account (in pennies)" | ||
} | ||
}, | ||
"required": ["clientId", "creditRemaining"] | ||
} |