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

[connect] Allow Direct Charges #399

Merged
merged 3 commits into from Oct 25, 2017
Merged

[connect] Allow Direct Charges #399

merged 3 commits into from Oct 25, 2017

Conversation

@ticosax
Copy link
Contributor

@ticosax ticosax commented Oct 13, 2017

What's this PR do?

Stripe Connect support several scheme for creating charges.
This add support for one of them.

Any background context you want to provide?

https://stripe.com/docs/connect/direct-charges

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)?
@ticosax ticosax force-pushed the ticosax:direct-charges branch 2 times, most recently from 3604e1d to 15f78d1 Oct 13, 2017
tox.ini Outdated
@@ -1,7 +1,7 @@
[flake8]
ignore = E265,E501
max-line-length = 100
max-complexity = 10
max-complexity = 11
exclude = pinax/stripe/migrations/*,docs/*

This comment has been minimized.

@paltman

paltman Oct 13, 2017
Member

Hm....

This comment has been minimized.

This comment has been minimized.

@paltman

paltman Oct 13, 2017
Member

I was already getting concerned with the excessive branching. I wonder if there is a way to simplify rather than increase the complexity.

This comment has been minimized.

@ticosax

ticosax Oct 13, 2017
Author Contributor

I asked myself the same question... and conclude it is not worth it. There is no duplication, that's the nature of the validation of parameters that's makes it complex, therefore to read it remain simple.
Maybe I could add an exception only for this function ?
Your call.

@codecov
Copy link

@codecov codecov bot commented Oct 13, 2017

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #399      +/-   ##
=========================================
+ Coverage   99.39%   99.4%   +<.01%     
=========================================
  Files          34      34              
  Lines        1662    1668       +6     
  Branches      135     137       +2     
=========================================
+ Hits         1652    1658       +6     
  Misses          5       5              
  Partials        5       5
Flag Coverage Δ
#py27dj110 99.4% <100%> (ø) ⬆️
#py27dj111 99.4% <100%> (ø) ⬆️
#py27dj18 99.4% <100%> (ø) ⬆️
#py34dj110 99.4% <100%> (ø) ⬆️
#py34dj111 99.4% <100%> (ø) ⬆️
#py34dj18 99.4% <100%> (ø) ⬆️
#py34dj20 99.4% <100%> (ø) ⬆️
#py35dj110 99.4% <100%> (ø) ⬆️
#py35dj111 99.4% <100%> (ø) ⬆️
#py35dj18 99.4% <100%> (ø) ⬆️
#py35dj20 99.4% <100%> (ø) ⬆️
#py36dj111 99.4% <100%> (ø) ⬆️
#py36dj20 99.4% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pinax/stripe/actions/charges.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 6a1f3b8...512727e. Read the comment docs.

ticosax added 2 commits Oct 13, 2017
Stripe Connect support several scheme for creating charges.
This add support for one of them.
https://stripe.com/docs/connect/direct-charges
@ticosax ticosax force-pushed the ticosax:direct-charges branch from 15f78d1 to 10a3323 Oct 15, 2017
@ticosax
Copy link
Contributor Author

@ticosax ticosax commented Oct 15, 2017

Second commit is an attempt to bring back max-complexity to 10.
Not sure it is better, but still OK IMHO.

@paltman paltman added this to the Samwise milestone Oct 20, 2017
@paltman paltman merged commit 1b993f8 into pinax:master Oct 25, 2017
16 checks passed
16 checks passed
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: py27dj110 Your tests passed on CircleCI!
Details
ci/circleci: py27dj111 Your tests passed on CircleCI!
Details
ci/circleci: py27dj18 Your tests passed on CircleCI!
Details
ci/circleci: py34dj110 Your tests passed on CircleCI!
Details
ci/circleci: py34dj111 Your tests passed on CircleCI!
Details
ci/circleci: py34dj18 Your tests passed on CircleCI!
Details
ci/circleci: py34dj20 Your tests passed on CircleCI!
Details
ci/circleci: py35dj110 Your tests passed on CircleCI!
Details
ci/circleci: py35dj111 Your tests passed on CircleCI!
Details
ci/circleci: py35dj18 Your tests passed on CircleCI!
Details
ci/circleci: py35dj20 Your tests passed on CircleCI!
Details
ci/circleci: py36dj111 Your tests passed on CircleCI!
Details
ci/circleci: py36dj20 Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 99.39%)
Details
codecov/project 99.4% (+<.01%) compared to 6a1f3b8
Details
@kinesii
Copy link

@kinesii kinesii commented Nov 26, 2017

How do you issue a direct charge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.