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

Remove bank account action #570

Merged
merged 2 commits into from
Nov 26, 2021
Merged

Remove bank account action #570

merged 2 commits into from
Nov 26, 2021

Conversation

georgy95
Copy link

What's this PR do?

This PR adds the ability to remove an external bank account from account.

Any background context you want to provide?

Right now, we are able to sync accounts (update/add) from current stripe data, but it would be great to have actions to do with deletions.

For example: User creates a custom account, which automatically creates an external bank account.

If this user changes their payment method and decides to add new account (using stripe API), we can use sync_account() to update our account/external_bank_accounts.

However, the user now wants to delete their previous (very first external bank account). We do this using stripe API:

account = stripe.Account.retrieve("acct_19c2PSCoyI6kORCB")
account.external_accounts.retrieve("ba_1CfV4JCoyI6kORCBWALOqwBd").delete()

This time, we need to manually remove this from BankAccount object, because syncing the data will not remove, but instead only add/update existing accounts.

What ticket or issue # does this fix?

Closes #569

Definition of Done (check if considered and/or addressed):

  • Are all backwards incompatible changes documented in this PR?
  • Have all new dependencies been documented in this PR?
  • [] Has the appropriate documentation been updated (if applicable)?
  • [] Have you written tests to prove this change works (if applicable)?

@codecov
Copy link

codecov bot commented Jun 22, 2018

Codecov Report

Merging #570 into master will decrease coverage by 0.46%.
The diff coverage is 18.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #570      +/-   ##
==========================================
- Coverage   99.21%   98.75%   -0.47%     
==========================================
  Files          33       33              
  Lines        1917     1928      +11     
  Branches      175      176       +1     
==========================================
+ Hits         1902     1904       +2     
- Misses          7       16       +9     
  Partials        8        8
Flag Coverage Δ
#py27dj110 98.44% <18.18%> (-0.47%) ⬇️
#py27dj111 98.44% <18.18%> (-0.47%) ⬇️
#py27dj18 98.7% <18.18%> (-0.47%) ⬇️
#py34dj110 98.44% <18.18%> (-0.47%) ⬇️
#py34dj111 98.44% <18.18%> (-0.47%) ⬇️
#py34dj18 98.7% <18.18%> (-0.47%) ⬇️
#py34dj20 98.44% <18.18%> (-0.47%) ⬇️
#py35dj110 98.44% <18.18%> (-0.47%) ⬇️
#py35dj111 98.44% <18.18%> (-0.47%) ⬇️
#py35dj18 98.7% <18.18%> (-0.47%) ⬇️
#py35dj20 98.44% <18.18%> (-0.47%) ⬇️
#py36dj111 98.44% <18.18%> (-0.47%) ⬇️
#py36dj20 98.44% <18.18%> (-0.47%) ⬇️
#py36dj20psql 98.44% <18.18%> (-0.47%) ⬇️
Impacted Files Coverage Δ
pinax/stripe/actions/externalaccounts.py 62.5% <18.18%> (-37.5%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 893572e...753c52c. Read the comment docs.

@paltman paltman changed the base branch from master to 4.x November 26, 2021 16:08
@paltman paltman merged commit 975115a into pinax:4.x Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Actions to delete accounts/bank accounts/cards
2 participants