-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature get update remove card (#40)
* tests merged and extended, one test skipped (not sure about the stripe api) * explicit implementation of the stripe api * In the middle of mocking stripe * Added Validation Error * CR fix * Fix bug * Updated logic, test, and fxed bug * Comments and permissions update and tests update
- Loading branch information
Showing
7 changed files
with
342 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# -*- coding: utf-8 -*- | ||
from rest_framework.permissions import BasePermission | ||
|
||
from aa_stripe.models import StripeCustomer | ||
|
||
|
||
class IsCardOwner(BasePermission): | ||
def has_object_permission(self, request, view, obj): | ||
return obj.customer == StripeCustomer.get_latest_active_customer_for_user(request.user) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.