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

fix: Allow Resource to be compare to other object #890

Merged

Conversation

malbert
Copy link
Contributor

@malbert malbert commented Feb 27, 2024

Problem

The Recurly::Resource does not allow to compare to another object that does not respond to the attributes method.

@douglasmiller douglasmiller added the V4 v2021-02-25 Client label Mar 28, 2024
@douglasmiller
Copy link
Contributor

douglasmiller commented Mar 28, 2024

Thank you for the contribution, @malbert. Could you fix the issues that this change introduces? You can run the tests locally using the test script: ./scripts/test

@@ -15,7 +15,8 @@ def requires_client?
end

def ==(other_resource)
self.attributes == other_resource.attributes
other.is_a?(Recurly::Resource) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

The method parameter is other_resource

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch!
Stupid error while renaming variables.
Thank you!

@malbert malbert requested a review from douglasmiller April 2, 2024 15:54
@douglasmiller douglasmiller merged commit 1a57364 into recurly:v3-v2021-02-25 Apr 2, 2024
10 checks passed
recurly-integrations pushed a commit that referenced this pull request Apr 2, 2024
[Full Changelog](4.48.0...4.48.1)

**Merged Pull Requests**

- fix: Allow Resource to be compare to other object [#890](#890) ([malbert](https://github.com/malbert))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V4 v2021-02-25 Client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants