Skip to content

API Updates#794

Merged
richardm-stripe merged 3 commits into
masterfrom
latest-codegen
Apr 18, 2022
Merged

API Updates#794
richardm-stripe merged 3 commits into
masterfrom
latest-codegen

Conversation

@richardm-stripe
Copy link
Copy Markdown
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.

Comment thread stripe/object_classes.py
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
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

Comment thread 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))
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

4 participants