pinax / pinax-stripe-light

a payments Django app for Stripe
MIT License
684 stars 285 forks source link

Do not call deprecated methods on stripe.Customer #622

Closed streeter closed 2 years ago

streeter commented 5 years ago

What's this PR do?

The invoices method was removed on the stripe.Customer object in https://github.com/stripe/stripe-python/commit/d416e9e68c8eba804535541ce29d2d8f2d22b08c

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

codecov[bot] commented 5 years ago

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%> (ø) :arrow_up:
#py27dj111 98.9% <100%> (ø) :arrow_up:
#py27dj18 99.16% <100%> (ø) :arrow_up:
#py34dj110 98.9% <100%> (ø) :arrow_up:
#py34dj111 98.9% <100%> (ø) :arrow_up:
#py34dj18 99.16% <100%> (ø) :arrow_up:
#py34dj20 98.9% <100%> (ø) :arrow_up:
#py35dj110 98.9% <100%> (ø) :arrow_up:
#py35dj111 98.9% <100%> (ø) :arrow_up:
#py35dj18 99.16% <100%> (ø) :arrow_up:
#py35dj20 98.9% <100%> (ø) :arrow_up:
#py36dj111 98.9% <100%> (ø) :arrow_up:
#py36dj20 ?
#py36dj20psql 98.9% <100%> (ø) :arrow_up:
Impacted Files Coverage Δ
pinax/stripe/actions/invoices.py 100% <100%> (ø) :arrow_up:
pinax/stripe/actions/charges.py 95.55% <100%> (ø) :arrow_up:

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.