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

Add missing static method for verify on BankAccount #1418

Merged
merged 4 commits into from
Jun 18, 2024

Conversation

ramya-stripe
Copy link
Contributor

@ramya-stripe ramya-stripe commented Jun 15, 2024

This PR addresses the issue brought up in #1410 by adding the missing static method for BankAccount verification

Updated the code to use request_stripe_object as that is the general norm + I wanted to re-use the code between the instance and the static versions in the codegen. This is a safe change for the instance method because request_stripe_object internally calls initialize_from after calling execute_resource_request for post requests. See

def request_stripe_object(method:, path:, params:, opts: {})
resp, opts = execute_resource_request(method, path, params, opts)
# If we're getting back this thing, update; otherwise, instantiate.
if Util.object_name_matches_class?(resp.data[:object], self.class)
initialize_from(resp.data, opts, resp)
else
Util.convert_to_stripe_object_with_params(resp.data, params, opts, resp)
end
end

@ramya-stripe ramya-stripe reopened this Jun 17, 2024
@ramya-stripe ramya-stripe marked this pull request as draft June 17, 2024 19:48
@ramya-stripe ramya-stripe marked this pull request as ready for review June 17, 2024 19:55
Copy link
Contributor

@helenye-stripe helenye-stripe left a comment

Choose a reason for hiding this comment

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

🔥

@ramya-stripe ramya-stripe merged commit 6dadabe into master Jun 18, 2024
14 checks passed
@ramya-stripe ramya-stripe deleted the ramya/bankaccount-verify branch June 18, 2024 00:03
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.

3 participants