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

Do not call deprecated methods on stripe.Customer #622

Merged
merged 4 commits into from
Nov 26, 2021

Conversation

streeter
Copy link
Contributor

@streeter streeter commented Dec 5, 2018

What's this PR do?

The invoices method was removed on the stripe.Customer object in stripe/stripe-python@d416e9e

This replaces that same logic to fetch the invoices and sync them and
does it within the method itself. This should be backwards compatible
with stripe-python < 2.0 as well as the 2.0 and up release.

Any background context you want to provide?

What ticket or issue # does this fix?

Closes #582
Closes #623

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)?

The invoices method was removed on the stripe.Customer object in stripe/stripe-python@d416e9e

This replaces that same logic to fetch the invoices and sync them and
does it within the method itself. This should be backwards compatible
with stripe-python < 2.0 as well as the 2.0 and up release.

Fixes pinax#582
@codecov
Copy link

codecov bot commented Dec 5, 2018

Codecov Report

Merging #622 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #622   +/-   ##
=======================================
  Coverage   99.21%   99.21%           
=======================================
  Files          33       33           
  Lines        1911     1911           
  Branches      175      175           
=======================================
  Hits         1896     1896           
  Misses          7        7           
  Partials        8        8
Flag Coverage Δ
#py27dj110 98.9% <100%> (ø) ⬆️
#py27dj111 98.9% <100%> (ø) ⬆️
#py27dj18 99.16% <100%> (ø) ⬆️
#py34dj110 98.9% <100%> (ø) ⬆️
#py34dj111 98.9% <100%> (ø) ⬆️
#py34dj18 99.16% <100%> (ø) ⬆️
#py34dj20 98.9% <100%> (ø) ⬆️
#py35dj110 98.9% <100%> (ø) ⬆️
#py35dj111 98.9% <100%> (ø) ⬆️
#py35dj18 99.16% <100%> (ø) ⬆️
#py35dj20 98.9% <100%> (ø) ⬆️
#py36dj111 98.9% <100%> (ø) ⬆️
#py36dj20 ?
#py36dj20psql 98.9% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pinax/stripe/actions/invoices.py 100% <100%> (ø) ⬆️
pinax/stripe/actions/charges.py 95.55% <100%> (ø) ⬆️

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 0005850...3ff8bb3. Read the comment docs.

Also, use the auto_paging_iter feature of the models
@streeter streeter force-pushed the fix-sync-invoices branch from d27a73f to 96da93e Compare April 24, 2019 17:17
@@ -62,3 +62,5 @@ setenv =
passenv =
commands =
django-admin makemigrations --check -v3 --dry-run --noinput pinax_stripe
deps =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once #631 is merged, this can be removed.

@streeter streeter changed the title Do not call deprecated method on stripe.Customer Do not call deprecated methods on stripe.Customer Apr 24, 2019
@paltman paltman changed the base branch from master to 4.x November 26, 2021 15:57
@paltman paltman merged commit 9c22ea3 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.

Cannot sync customers - KeyError Invoices manage.py sync_customers broken - AttributeError: invoices
2 participants