-
Notifications
You must be signed in to change notification settings - Fork 140
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
Draft: [postal-savings-rs] Card transactions #743
base: master
Are you sure you want to change the base?
Conversation
d1018d7
to
f0a2f7f
Compare
src/plugins/postal-savings-rs/__tests__/converters/transactions/cardTransactions.test.ts
Outdated
Show resolved
Hide resolved
f0a2f7f
to
b434910
Compare
return { | ||
...account, | ||
cardNumber, | ||
rawData | ||
} |
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.
I'm not sure if I'm doing the right thing here. Is it legal to attach data to an account this way? Will it be better to create wrapper-type instead, to not pass rawData
to ZenMoney?
I'm sorry, it's my first time I'm using TypeScript, so I'm not sure about some constructions.
b434910
to
67a8dde
Compare
import { Transaction } from '../../types/zenmoney' | ||
|
||
function accountCardKey (accountId: string): string { | ||
return `account/${accountId}/card` |
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.
Here are two options for the key format:
account/{accountId}/card
accountCard/{accountId}
I've picked the first one because it allows us to bind other data to an account if it is needed
c112900
to
e2d2698
Compare
e2d2698
to
ece09b6
Compare
ece09b6
to
a9cb6aa
Compare
Depends on #742
TODO:
Nice to have:
ATMPSB
as cash withdrawal with zero fee