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

CustomerUpdatedWebhook: use provided customer object from the event #371

Merged

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Sep 21, 2017

It saves a network roundtrip, and might even be necessary if events are supposed to be processed in order.

TODO:

  • tests?!

customers.sync_customer(self.event.customer)
cu = None
try:
cu = self.event.message['data']['object']
Copy link
Member

Choose a reason for hiding this comment

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

double-quotes please :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Anything apart from that?
Shouldn't there be a test (change)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also: maybe we could have pylint or something similar to report this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let machines work for us.. #372

@blueyed blueyed force-pushed the CustomerUpdatedWebhook-use-data-object branch from f649448 to 04f9f9a Compare Sep 22, 2017
blueyed added a commit to blueyed/pinax-stripe that referenced this pull request Sep 22, 2017
@blueyed
Copy link
Contributor Author

blueyed commented Sep 22, 2017

Updated branch, so please squash-merge.

@blueyed blueyed force-pushed the CustomerUpdatedWebhook-use-data-object branch 2 times, most recently from 33878a9 to 18403a9 Compare Oct 2, 2017
@blueyed
Copy link
Contributor Author

blueyed commented Oct 2, 2017

@paltman
This is ready.

@blueyed blueyed force-pushed the CustomerUpdatedWebhook-use-data-object branch from 18403a9 to efa780d Compare Oct 2, 2017
@codecov
Copy link

codecov bot commented Oct 2, 2017

Codecov Report

Merging #371 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #371      +/-   ##
==========================================
+ Coverage   99.84%   99.84%   +<.01%     
==========================================
  Files          31       31              
  Lines        1297     1302       +5     
  Branches       98       98              
==========================================
+ Hits         1295     1300       +5     
  Partials        2        2
Flag Coverage Δ
#py27dj110 99.38% <100%> (ø) ⬆️
#py27dj111 99.38% <100%> (ø) ⬆️
#py27dj18 99.76% <100%> (ø) ⬆️
#py27dj19 99.76% <100%> (ø) ⬆️
#py33dj18 99.76% <100%> (ø) ⬆️
#py34dj110 99.38% <100%> (ø) ⬆️
#py34dj111 99.38% <100%> (ø) ⬆️
#py34dj18 99.76% <100%> (ø) ⬆️
#py34dj19 99.76% <100%> (ø) ⬆️
#py35dj110 99.38% <100%> (ø) ⬆️
#py35dj111 99.38% <100%> (ø) ⬆️
#py35dj18 99.76% <100%> (ø) ⬆️
#py35dj19 99.76% <100%> (ø) ⬆️
#py35djmaster 99.38% <100%> (ø) ⬆️
#py36dj111 99.38% <100%> (ø) ⬆️
#py36djmaster 99.38% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pinax/stripe/actions/customers.py 100% <ø> (ø) ⬆️
pinax/stripe/webhooks.py 100% <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 0067cb4...efa780d. Read the comment docs.

@paltman paltman merged commit 767f928 into pinax:master Oct 2, 2017
@paltman paltman added this to the Samwise milestone Oct 20, 2017
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.

None yet

2 participants