|
75 | 75 | from .types.delete_assignment_response import DeleteAssignmentResponse |
76 | 76 | from .types.delete_connection_response import DeleteConnectionResponse |
77 | 77 | from .types.get_conector_config_response import GetConectorConfigResponse |
| 78 | +from .types.upsert_organization_response import UpsertOrganizationResponse |
78 | 79 | from .types.list_connector_configs_response import ListConnectorConfigsResponse |
79 | 80 | from .types.delete_connector_config_response import DeleteConnectorConfigResponse |
80 | 81 | from .types.list_connnector_configs_response import ListConnnectorConfigsResponse |
@@ -1675,6 +1676,40 @@ def upsert_customer( |
1675 | 1676 | cast_to=UpsertCustomerResponse, |
1676 | 1677 | ) |
1677 | 1678 |
|
| 1679 | + def upsert_organization( |
| 1680 | + self, |
| 1681 | + org_id: str, |
| 1682 | + *, |
| 1683 | + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 1684 | + # The extra values given here take precedence over values defined on the client or passed to this method. |
| 1685 | + extra_headers: Headers | None = None, |
| 1686 | + extra_query: Query | None = None, |
| 1687 | + extra_body: Body | None = None, |
| 1688 | + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 1689 | + ) -> UpsertOrganizationResponse: |
| 1690 | + """Upsert an organization by ID. |
| 1691 | +
|
| 1692 | + Creates if it does not exist. |
| 1693 | +
|
| 1694 | + Args: |
| 1695 | + extra_headers: Send extra headers |
| 1696 | +
|
| 1697 | + extra_query: Add additional query parameters to the request |
| 1698 | +
|
| 1699 | + extra_body: Add additional JSON properties to the request |
| 1700 | +
|
| 1701 | + timeout: Override the client-level default timeout for this request, in seconds |
| 1702 | + """ |
| 1703 | + if not org_id: |
| 1704 | + raise ValueError(f"Expected a non-empty value for `org_id` but received {org_id!r}") |
| 1705 | + return self.put( |
| 1706 | + f"/v2/organization/{org_id}", |
| 1707 | + options=make_request_options( |
| 1708 | + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
| 1709 | + ), |
| 1710 | + cast_to=UpsertOrganizationResponse, |
| 1711 | + ) |
| 1712 | + |
1678 | 1713 | @override |
1679 | 1714 | def _make_status_error( |
1680 | 1715 | self, |
@@ -3300,6 +3335,40 @@ async def upsert_customer( |
3300 | 3335 | cast_to=UpsertCustomerResponse, |
3301 | 3336 | ) |
3302 | 3337 |
|
| 3338 | + async def upsert_organization( |
| 3339 | + self, |
| 3340 | + org_id: str, |
| 3341 | + *, |
| 3342 | + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 3343 | + # The extra values given here take precedence over values defined on the client or passed to this method. |
| 3344 | + extra_headers: Headers | None = None, |
| 3345 | + extra_query: Query | None = None, |
| 3346 | + extra_body: Body | None = None, |
| 3347 | + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 3348 | + ) -> UpsertOrganizationResponse: |
| 3349 | + """Upsert an organization by ID. |
| 3350 | +
|
| 3351 | + Creates if it does not exist. |
| 3352 | +
|
| 3353 | + Args: |
| 3354 | + extra_headers: Send extra headers |
| 3355 | +
|
| 3356 | + extra_query: Add additional query parameters to the request |
| 3357 | +
|
| 3358 | + extra_body: Add additional JSON properties to the request |
| 3359 | +
|
| 3360 | + timeout: Override the client-level default timeout for this request, in seconds |
| 3361 | + """ |
| 3362 | + if not org_id: |
| 3363 | + raise ValueError(f"Expected a non-empty value for `org_id` but received {org_id!r}") |
| 3364 | + return await self.put( |
| 3365 | + f"/v2/organization/{org_id}", |
| 3366 | + options=make_request_options( |
| 3367 | + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
| 3368 | + ), |
| 3369 | + cast_to=UpsertOrganizationResponse, |
| 3370 | + ) |
| 3371 | + |
3303 | 3372 | @override |
3304 | 3373 | def _make_status_error( |
3305 | 3374 | self, |
@@ -3396,6 +3465,9 @@ def __init__(self, client: Openint) -> None: |
3396 | 3465 | self.upsert_customer = to_raw_response_wrapper( |
3397 | 3466 | client.upsert_customer, |
3398 | 3467 | ) |
| 3468 | + self.upsert_organization = to_raw_response_wrapper( |
| 3469 | + client.upsert_organization, |
| 3470 | + ) |
3399 | 3471 |
|
3400 | 3472 |
|
3401 | 3473 | class AsyncOpenintWithRawResponse: |
@@ -3460,6 +3532,9 @@ def __init__(self, client: AsyncOpenint) -> None: |
3460 | 3532 | self.upsert_customer = async_to_raw_response_wrapper( |
3461 | 3533 | client.upsert_customer, |
3462 | 3534 | ) |
| 3535 | + self.upsert_organization = async_to_raw_response_wrapper( |
| 3536 | + client.upsert_organization, |
| 3537 | + ) |
3463 | 3538 |
|
3464 | 3539 |
|
3465 | 3540 | class OpenintWithStreamedResponse: |
@@ -3524,6 +3599,9 @@ def __init__(self, client: Openint) -> None: |
3524 | 3599 | self.upsert_customer = to_streamed_response_wrapper( |
3525 | 3600 | client.upsert_customer, |
3526 | 3601 | ) |
| 3602 | + self.upsert_organization = to_streamed_response_wrapper( |
| 3603 | + client.upsert_organization, |
| 3604 | + ) |
3527 | 3605 |
|
3528 | 3606 |
|
3529 | 3607 | class AsyncOpenintWithStreamedResponse: |
@@ -3588,6 +3666,9 @@ def __init__(self, client: AsyncOpenint) -> None: |
3588 | 3666 | self.upsert_customer = async_to_streamed_response_wrapper( |
3589 | 3667 | client.upsert_customer, |
3590 | 3668 | ) |
| 3669 | + self.upsert_organization = async_to_streamed_response_wrapper( |
| 3670 | + client.upsert_organization, |
| 3671 | + ) |
3591 | 3672 |
|
3592 | 3673 |
|
3593 | 3674 | Client = Openint |
|
0 commit comments