-
Notifications
You must be signed in to change notification settings - Fork 440
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
API Updates #794
API Updates #794
Conversation
stripe/object_classes.py
Outdated
@@ -39,7 +39,6 @@ | |||
api_resources.File.OBJECT_NAME: api_resources.File, | |||
api_resources.File.OBJECT_NAME_ALT: api_resources.File, | |||
api_resources.FileLink.OBJECT_NAME: api_resources.FileLink, | |||
api_resources.FundingInstructions.OBJECT_NAME: api_resources.FundingInstructions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to keep this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
stripe/api_resources/customer.py
Outdated
def create_funding_instructions(self, idempotency_key=None, **params): | ||
url = self.instance_url() + "/funding_instructions" | ||
headers = util.populate_headers(idempotency_key) | ||
self.refresh_from(self.request("post", url, params, headers)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't refresh_from and instead return the funding instructions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
self.resource.request("post", url, params, headers) | ||
) | ||
return self.resource | ||
resp = self.resource.request("post", url, params, headers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a breaking change, we are not refreshing the original resource anymore..
Summary
Contains corrections to #792 which was merged but not released.
We are not releasing
GET /v1/customers/:id/funding_instructions
yet and are releasing only thePOST
, and are generating it as a "custom method" instead of the nested resource method.