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

update_organization stripe_customer_id param + .rbenv update #346

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

Teyler7
Copy link
Contributor

@Teyler7 Teyler7 commented Jan 21, 2025

Description

Consumers should now be able to simply call WorkOS::Organization.update_organization with an org and stripe_customer_id to setup stipe entitlements with their WorkOS orgs. More info in 8da4cb5

Also sets the .ruby-version to be 3.1.4 as 3.0.2 did not work with rbenv install and is EOL. See 089fd3e for more info.

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[x] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

  • I tried looking around for a docs repo, but I am guessing that it's a private repo. Happy to update the docs and create a PR as well if I can.

Problem:
Upon opening this repo, I tried to run `rbenv install` to install the
ruby version required for this project. I was met with the following
error as Ruby 3.0.2 is EOL.

`BUILD FAILED (macOS 15.2 on arm64 using ruby-build 20250115)`

Solution:

I noticed in one of the vcr tests that the user agent was using Ruby
3.1.4. After updating the .ruby-version to 3.1.4 (Which is what I am
assuming the last engineer used), `rbenv install` worked properly and I
was able to bundle and begin contribution.
spec/lib/workos/organizations_spec.rb Outdated Show resolved Hide resolved
.ruby-version Show resolved Hide resolved
lib/workos/organizations.rb Show resolved Hide resolved
@Teyler7 Teyler7 force-pushed the stripe_customer_id branch from 8da4cb5 to c95a277 Compare January 22, 2025 17:30
@Teyler7 Teyler7 requested a review from dandorman January 22, 2025 17:31
lib/workos/organization.rb Outdated Show resolved Hide resolved
@Teyler7 Teyler7 force-pushed the stripe_customer_id branch from c95a277 to dbc781c Compare January 22, 2025 18:51
Adds stripe_customer_id as an optional param to update_organization.
This was added in a similar fashion to the node js implementation
(https://workos.com/docs/reference/organization/update) and to match
the initial entitlements documentation
(https://workos.com/docs/user-management/entitlements/use-the-entitlements-in-your-application).

Consumers should now be able to simply call
WorkOS::Organization.update_organization() with a stripe_customer_id to
setup stipe entitlements with their WorkOS orgs.
@Teyler7 Teyler7 force-pushed the stripe_customer_id branch from dbc781c to db08f9f Compare January 22, 2025 18:52
@Teyler7 Teyler7 requested a review from dandorman January 22, 2025 19:29
@dandorman dandorman merged commit 1b72250 into workos:main Jan 22, 2025
4 checks passed
@dandorman dandorman mentioned this pull request Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants