-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HMAI-101 Post transaction endpoint #598
Conversation
…t tests, updated prism mock schema, tidying
…t' into HMAI-101-prison-transactions-post
Is there a reason we aren't handling the 409 Duplicate post - The unique_client_ref has been used before error that we can get from the API? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some qs but mainly that change in how we check transaction types
src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/extensions/WebClientWrapper.kt
Show resolved
Hide resolved
@@ -24173,7 +24173,7 @@ | |||
"type": "string", | |||
"description": "Valid transaction type for the prison_id", | |||
"example": "CANT", | |||
"enum": ["CANT,REFND,PHONE,MRPR,MTDS,DTDS,CASHD,RELA,RELS"] | |||
"enum": ["CANT", "REFND", "PHONE", "MRPR", "MTDS", "DTDS", "CASHD", "RELA", "RELS"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make a PR to prison API to do this update on their side too? https://github.com/ministryofjustice/prison-api/blob/003585764f471a10048f0492725fd0040bf7442a/src/main/java/uk/gov/justice/hmpps/prison/api/model/v1/CreateTransaction.java#L27
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like swagger deals with this appropriately:
allowableValues
public abstract String allowableValues
Limits the acceptable values for this parameter.
There are three ways to describe the allowable values:
To set a list of values, provide a comma-separated list. For example: first, second, third.
...uk/gov/justice/digital/hmpps/hmppsintegrationapi/services/PostTransactionForPersonService.kt
Outdated
Show resolved
Hide resolved
...st/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/mockservers/NomisApiMockServer.kt
Outdated
Show resolved
Hide resolved
That's a good point. We should at least have a test to make sure it comes back as a 409. It's an important error. |
WebClient wrapper has new function to retry post based off upstream response code