Skip to content

Commit

Permalink
adding strip_customer_id to python sdk to support entitlements (#401)
Browse files Browse the repository at this point in the history
* ron: adding strip_customer_id to python sdk to support entitlements

* updated the types to include the stripe_customer_id in the org Obj
  • Loading branch information
rarevalo13 authored Jan 14, 2025
1 parent cab11e9 commit 980b769
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions workos/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def update_organization(
organization (str): Organization's unique identifier.
name (str): A descriptive name for the organization. (Optional)
domain_data (Sequence[DomainDataInput]): List of domains that belong to the organization. (Optional)
stripe_customer_id (str): The ID of the Stripe customer associated with the organization. (Optional)
Returns:
Organization: Updated Organization response from WorkOS.
Expand Down Expand Up @@ -206,10 +207,12 @@ def update_organization(
organization_id: str,
name: Optional[str] = None,
domain_data: Optional[Sequence[DomainDataInput]] = None,
stripe_customer_id: Optional[str] = None,
) -> Organization:
json = {
"name": name,
"domain_data": domain_data,
"stripe_customer_id": stripe_customer_id,
}

response = self._http_client.request(
Expand Down Expand Up @@ -316,10 +319,12 @@ async def update_organization(
organization_id: str,
name: Optional[str] = None,
domain_data: Optional[Sequence[DomainDataInput]] = None,
stripe_customer_id: Optional[str] = None,
) -> Organization:
json = {
"name": name,
"domain_data": domain_data,
"stripe_customer_id": stripe_customer_id,
}

response = await self._http_client.request(
Expand Down
1 change: 1 addition & 0 deletions workos/types/organizations/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ class Organization(OrganizationCommon):
allow_profiles_outside_organization: bool
domains: Sequence[OrganizationDomain]
lookup_key: Optional[str] = None
stripe_customer_id: Optional[str] = None

0 comments on commit 980b769

Please sign in to comment.