You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 31, 2021. It is now read-only.
Transactions should be able to be modified with a PUT request to /bank_accounts/{bankAccountId}/transactions/{transactionId}.
If a transaction is from a manual link, then the following fields can be modified along with all the fields from the plaid version.
Amount
OriginalCategories (maybe just make these two fields match or just omit one?)
Date
AuthorizedDate
OriginalName (Same logic with categories, do we want to maintain two fields for this for manual transactions?)
IsPending
If a transaction was not created with a manual link, and was imported via Plaid then only the following fields can be modified:
ExpenseId
Categories
Name
MerchantName
A transaction cannot change its bank account.
Behaviors for expenses:
When an expense is added to a transaction: Update the transaction's expenseId field, deduct the transaction's amount from the expense's current amount (do not go negative).
This has an inherent flaw: If a transaction is for $10, and then is spent from an expense with a current amount of $5, the expense's current amount becomes 0. In this moment the safe-to-spend is correct. But if the user were to remove the transaction from that expense; we would have no way of knowing that we should only return $5 of the $10 spent on the transaction to that expense. We would need to keep track of how much money was on the expense before a transaction was allocated to it in order to compensate for this.
When a transaction is removed from an expense: Set the transaction's expenseId field to nil, return the amount of money spent from the expense to the expense's current amount. (see note above).
When a transaction changes from expense A to B; combine the operations above as described.
The text was updated successfully, but these errors were encountered:
Transactions should be able to be modified with a PUT request to
/bank_accounts/{bankAccountId}/transactions/{transactionId}
.If a transaction is from a manual link, then the following fields can be modified along with all the fields from the plaid version.
If a transaction was not created with a manual link, and was imported via Plaid then only the following fields can be modified:
A transaction cannot change its bank account.
Behaviors for expenses:
The text was updated successfully, but these errors were encountered: