diff --git a/src/orb/resources/customers/customers.py b/src/orb/resources/customers/customers.py index 3be85261..a0607306 100644 --- a/src/orb/resources/customers/customers.py +++ b/src/orb/resources/customers/customers.py @@ -308,6 +308,7 @@ def update( currency: Optional[str] | NotGiven = NOT_GIVEN, email: Optional[str] | NotGiven = NOT_GIVEN, email_delivery: Optional[bool] | NotGiven = NOT_GIVEN, + external_customer_id: Optional[str] | NotGiven = NOT_GIVEN, metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]] @@ -344,6 +345,9 @@ def update( email: A valid customer email, to be used for invoicing and notifications. + external_customer_id: The external customer ID. This can only be set if empty and the customer has no + past or current subscriptions. + metadata: User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to `null`, and the entire metadata mapping can be cleared by setting `metadata` to `null`. @@ -470,6 +474,7 @@ def update( "currency": currency, "email": email, "email_delivery": email_delivery, + "external_customer_id": external_customer_id, "metadata": metadata, "name": name, "payment_provider": payment_provider, @@ -695,6 +700,7 @@ def update_by_external_id( currency: Optional[str] | NotGiven = NOT_GIVEN, email: Optional[str] | NotGiven = NOT_GIVEN, email_delivery: Optional[bool] | NotGiven = NOT_GIVEN, + external_customer_id: Optional[str] | NotGiven = NOT_GIVEN, metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]] @@ -731,6 +737,9 @@ def update_by_external_id( email: A valid customer email, to be used for invoicing and notifications. + external_customer_id: The external customer ID. This can only be set if empty and the customer has no + past or current subscriptions. + metadata: User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to `null`, and the entire metadata mapping can be cleared by setting `metadata` to `null`. @@ -857,6 +866,7 @@ def update_by_external_id( "currency": currency, "email": email, "email_delivery": email_delivery, + "external_customer_id": external_customer_id, "metadata": metadata, "name": name, "payment_provider": payment_provider, @@ -1123,6 +1133,7 @@ async def update( currency: Optional[str] | NotGiven = NOT_GIVEN, email: Optional[str] | NotGiven = NOT_GIVEN, email_delivery: Optional[bool] | NotGiven = NOT_GIVEN, + external_customer_id: Optional[str] | NotGiven = NOT_GIVEN, metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]] @@ -1159,6 +1170,9 @@ async def update( email: A valid customer email, to be used for invoicing and notifications. + external_customer_id: The external customer ID. This can only be set if empty and the customer has no + past or current subscriptions. + metadata: User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to `null`, and the entire metadata mapping can be cleared by setting `metadata` to `null`. @@ -1285,6 +1299,7 @@ async def update( "currency": currency, "email": email, "email_delivery": email_delivery, + "external_customer_id": external_customer_id, "metadata": metadata, "name": name, "payment_provider": payment_provider, @@ -1510,6 +1525,7 @@ async def update_by_external_id( currency: Optional[str] | NotGiven = NOT_GIVEN, email: Optional[str] | NotGiven = NOT_GIVEN, email_delivery: Optional[bool] | NotGiven = NOT_GIVEN, + external_customer_id: Optional[str] | NotGiven = NOT_GIVEN, metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]] @@ -1546,6 +1562,9 @@ async def update_by_external_id( email: A valid customer email, to be used for invoicing and notifications. + external_customer_id: The external customer ID. This can only be set if empty and the customer has no + past or current subscriptions. + metadata: User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to `null`, and the entire metadata mapping can be cleared by setting `metadata` to `null`. @@ -1672,6 +1691,7 @@ async def update_by_external_id( "currency": currency, "email": email, "email_delivery": email_delivery, + "external_customer_id": external_customer_id, "metadata": metadata, "name": name, "payment_provider": payment_provider, diff --git a/src/orb/types/customer_update_by_external_id_params.py b/src/orb/types/customer_update_by_external_id_params.py index 0d8420af..fda94d74 100644 --- a/src/orb/types/customer_update_by_external_id_params.py +++ b/src/orb/types/customer_update_by_external_id_params.py @@ -45,6 +45,13 @@ class CustomerUpdateByExternalIDParams(TypedDict, total=False): email_delivery: Optional[bool] + external_customer_id: Optional[str] + """The external customer ID. + + This can only be set if empty and the customer has no past or current + subscriptions. + """ + metadata: Optional[Dict[str, Optional[str]]] """User-specified key/value pairs for the resource. diff --git a/src/orb/types/customer_update_params.py b/src/orb/types/customer_update_params.py index e1561340..a41f7f67 100644 --- a/src/orb/types/customer_update_params.py +++ b/src/orb/types/customer_update_params.py @@ -45,6 +45,13 @@ class CustomerUpdateParams(TypedDict, total=False): email_delivery: Optional[bool] + external_customer_id: Optional[str] + """The external customer ID. + + This can only be set if empty and the customer has no past or current + subscriptions. + """ + metadata: Optional[Dict[str, Optional[str]]] """User-specified key/value pairs for the resource. diff --git a/tests/api_resources/test_customers.py b/tests/api_resources/test_customers.py index 1e0fbc87..a279de8a 100644 --- a/tests/api_resources/test_customers.py +++ b/tests/api_resources/test_customers.py @@ -152,6 +152,7 @@ def test_method_update_with_all_params(self, client: Orb) -> None: currency="string", email="string", email_delivery=True, + external_customer_id="string", metadata={"foo": "string"}, name="string", payment_provider="quickbooks", @@ -396,6 +397,7 @@ def test_method_update_by_external_id_with_all_params(self, client: Orb) -> None currency="string", email="string", email_delivery=True, + external_customer_id="string", metadata={"foo": "string"}, name="string", payment_provider="quickbooks", @@ -446,6 +448,7 @@ def test_path_params_update_by_external_id(self, client: Orb) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.customers.with_raw_response.update_by_external_id( "", + external_customer_id="", ) @@ -583,6 +586,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> No currency="string", email="string", email_delivery=True, + external_customer_id="string", metadata={"foo": "string"}, name="string", payment_provider="quickbooks", @@ -827,6 +831,7 @@ async def test_method_update_by_external_id_with_all_params(self, async_client: currency="string", email="string", email_delivery=True, + external_customer_id="string", metadata={"foo": "string"}, name="string", payment_provider="quickbooks", @@ -877,4 +882,5 @@ async def test_path_params_update_by_external_id(self, async_client: AsyncOrb) - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.customers.with_raw_response.update_by_external_id( "", + external_customer_id="", )