Skip to content
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

Add const values for TransactionCode #363

Closed
adamdecaf opened this issue Nov 8, 2018 · 0 comments
Closed

Add const values for TransactionCode #363

adamdecaf opened this issue Nov 8, 2018 · 0 comments

Comments

@adamdecaf
Copy link
Member

We have a fair amount of hardcoded values, which aren't that friendly for developers. If we provide names it should help to understand them.

Example: EntryDetail.TransactionCode:

    // TransactionCode if the receivers account is:
    // Credit (deposit) to checking account ‘22’
    // Prenote for credit to checking account ‘23’
    // Debit (withdrawal) to checking account ‘27’
    // Prenote for debit to checking account ‘28’
    // Credit to savings account ‘32’
    // Prenote for credit to savings account ‘33’
    // Debit to savings account ‘37’
    // Prenote for debit to savings account ‘38’
    TransactionCode int `json:"transactionCode"`

If instead we had something like:

type TransactionCode int
const (
    CheckingCredit = 22
    CheckingPrenoteCredit 23
    CheckingDebit = 27
    CheckingPrenoteDebit = 28
    SavingsCredit = 32
    SavingsPrenoteCredit = 33
    SavingsDebit = 37
    SavingsPrenoteDebit = 38
)

Please suggest better/other names.

@adamdecaf adamdecaf changed the title Add const values for ServiceClassCode, TransactionCode Add const values for TransactionCode Nov 8, 2018
@bkmoovio bkmoovio self-assigned this Nov 29, 2018
@bkmoovio bkmoovio closed this as completed Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants