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

Better resource_url method #663

Merged
merged 2 commits into from
Jul 19, 2018
Merged

Better resource_url method #663

merged 2 commits into from
Jul 19, 2018

Conversation

ob-stripe
Copy link
Contributor

r? @brandur-stripe @remi-stripe
cc @stripe/api-libraries

Like stripe/stripe-php#498, but for stripe-ruby :)

Copy link
Contributor

@remi-stripe remi-stripe left a comment

Choose a reason for hiding this comment

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

LGTM though I have a minor qualm.

"/v1/#{CGI.escape(class_name.downcase)}"
# Namespaces are separated in object names with periods (.) and in URLs
# with forward slashes (/), so replace the former with the latter.
"/v1/#{self::OBJECT_NAME.downcase.tr('.', '/')}"
Copy link
Contributor

Choose a reason for hiding this comment

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

A bit disappointing that we have the same code and comment twice. Is there a way to share the code? :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Haha, you mean from stripe-php?

Maybe once all these languages are running on the LLVM! ;)

@brandur-stripe
Copy link
Contributor

LGTM. Thanks for the proactive improvements!

@ob-stripe ob-stripe merged commit 87b758e into master Jul 19, 2018
@ob-stripe ob-stripe deleted the ob-better-resource-url branch July 19, 2018 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants