-
Notifications
You must be signed in to change notification settings - Fork 555
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 support for v1/issuer_fraud_records endpoint #645
Conversation
cc @matt-stripe |
@fay A couple notes to maybe save you a bit of time. You're going to need a def self.resource_url
"/v1/subscription_items"
end Next, we're going to need to make sure that the new endpoints are in the OpenAPI spec, which probably means changing their Lastly, it'll probably be beneficial to make sure you're able to get everything up and running locally so that your testing loop isn't CI. There's instructions in the README. |
I think I've got it! ptal @brandur-stripe |
Never mind it's still failing, let me fix that real quick. |
Ok now it should be right ptal @brandur-stripe |
lib/stripe/issuer_fraud_record.rb
Outdated
|
||
OBJECT_NAME = "issuer_fraud_record".freeze | ||
|
||
def self.from_charge(params, opts = {}) |
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.
@fay-stripe I don't think we need this because the built-in list
method will accept optional parameters that allow you to pass a charge. Here's an example of it in action for invoices:
charges = Stripe::Invoice.list(customer: "cus_123")
} | ||
assert issfrs.data.is_a?(Array) | ||
assert issfrs.data[0].is_a?(Stripe::IssuerFraudRecord) | ||
end |
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.
Let's also take this test out — in practice it won't really be exercising a different code path (and we already have tests around the core list
functionality).
@fay-stripe You have a few Rubocop offenses:
For the "module has too many lines", I think unfortunately the answer is to pop open ptal @fay-stripe |
ptal @brandur-stripe |
Thanks Fay! LGTM. |
Released as 3.14.0. |
No description provided.