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

API Updates #794

Merged
merged 3 commits into from
Apr 18, 2022
Merged

API Updates #794

merged 3 commits into from
Apr 18, 2022

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented Apr 18, 2022

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 the POST, and are generating it as a "custom method" instead of the nested resource method.

@@ -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,
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

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))
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

@richardm-stripe richardm-stripe merged commit e59ecce into master Apr 18, 2022
self.resource.request("post", url, params, headers)
)
return self.resource
resp = self.resource.request("post", url, params, headers)
Copy link
Contributor

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..

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

4 participants