accounts: need "rejected" type status?
adamdecaf opened this issue · 6 comments
Customers Version: v0.5.0-dev
Now that Accounts have their own OFAC searches (on HolderName) they can be rejected for a positive match. We need to reject that account.
See the Customers flow.
https://github.com/moov-io/customers/blob/v0.5.0-dev2/cmd/server/approval_ofac.go#L139-L148
Due to how the OpenAPI generator creates "enums" for Go I don't think we can call it Rejected
. The generator will create to const REJECTED = "rejected"
values and Go won't be able to compile those.
We need to find a term for this or figure out how to share REJECTED
.
Customer Status: https://github.com/moov-io/customers/blob/master/pkg/client/model_customer_status.go
@adamdecaf this might fix your issue OpenAPITools/openapi-generator#535 (comment)
Sweet! 4.3.2 doesn't seem to exist on DockerHub, so I'm not sure if we need to request a release or something.
I tried this on a branch #193 and wish we could customize this a bit more.
CUSTOMER_INDIVIDUAL
would be a lot nicer.
// CustomerStatus State of the customer
type CustomerStatus string
// List of CustomerStatus
const (
CUSTOMERSTATUS_DECEASED CustomerStatus = "Deceased"
CUSTOMERSTATUS_REJECTED CustomerStatus = "Rejected"
CUSTOMERSTATUS_UNKNOWN CustomerStatus = "Unknown"
CUSTOMERSTATUS_RECEIVE_ONLY CustomerStatus = "ReceiveOnly"
CUSTOMERSTATUS_VERIFIED CustomerStatus = "Verified"
)
Yeah, one of the downsides of code gen 😅
@vxio can we chat on this? There should be a failure status for accounts along with a "frozen" status. I think we just need to prefix the generated values for now, but I want to look at our options.
Edit: A Customer also needs a frozen status - this will initially be for rejected OFAC hits.
See: moov-io/paygate#579