From 4e8524372928dc2d6d8ad97ddfc9279ceba6ef12 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2026 20:54:39 +0000 Subject: [PATCH 1/2] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 4.55.4 --- .fern/metadata.json | 2 +- reference.md | 29 +++++++++- src/square/catalog/client.py | 31 ++++++++++ src/square/catalog/raw_client.py | 43 ++++++++++++++ src/square/core/client_wrapper.py | 2 +- src/square/orders/client.py | 10 ++-- src/square/orders/raw_client.py | 10 ++-- .../batch_get_catalog_objects_response.py | 6 ++ src/square/requests/catalog_modifier.py | 12 ++++ src/square/requests/catalog_query.py | 6 ++ .../catalog_query_modifiers_for_child_list.py | 17 ++++++ src/square/requests/include_options.py | 19 ++++++ src/square/requests/included_resources.py | 22 +++++++ src/square/requests/location.py | 12 ++++ .../requests/search_catalog_items_response.py | 6 ++ .../search_catalog_objects_response.py | 6 ++ .../batch_get_catalog_objects_response.py | 6 ++ src/square/types/card_brand.py | 4 ++ src/square/types/catalog_modifier.py | 12 ++++ src/square/types/catalog_query.py | 6 ++ .../catalog_query_modifiers_for_child_list.py | 28 +++++++++ src/square/types/error_code.py | 9 +++ src/square/types/include_options.py | 30 ++++++++++ src/square/types/include_type.py | 5 ++ src/square/types/included_resources.py | 58 +++++++++++++++++++ src/square/types/location.py | 12 ++++ .../types/search_catalog_items_response.py | 6 ++ .../types/search_catalog_objects_response.py | 6 ++ 28 files changed, 403 insertions(+), 12 deletions(-) create mode 100644 src/square/requests/catalog_query_modifiers_for_child_list.py create mode 100644 src/square/requests/include_options.py create mode 100644 src/square/requests/included_resources.py create mode 100644 src/square/types/catalog_query_modifiers_for_child_list.py create mode 100644 src/square/types/include_options.py create mode 100644 src/square/types/include_type.py create mode 100644 src/square/types/included_resources.py diff --git a/.fern/metadata.json b/.fern/metadata.json index 26f4f454..5e419280 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -14,6 +14,6 @@ "use_typeddict_requests_for_file_upload": true, "exclude_types_from_init_exports": true }, - "originGitCommit": "074e2540401528521d322c512800c4ebd67cd153", + "originGitCommit": "b05364cda2b85e35d8daa9ff2c24bbabbbd9652a", "sdkVersion": "45.1.0.20260819" } \ No newline at end of file diff --git a/reference.md b/reference.md index c056b1f3..20ee0f36 100644 --- a/reference.md +++ b/reference.md @@ -2714,6 +2714,14 @@ in the response payload.
+**include_options:** `typing.Optional[IncludeOptionsParams]` — Options to include related resources in the response. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -3224,6 +3232,14 @@ is higher than the maximum limit of 1,000, it will be ignored.
+**include_options:** `typing.Optional[IncludeOptionsParams]` — Options to include related resources in the response. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -3407,6 +3423,14 @@ a single call to the [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItem
+**include_options:** `typing.Optional[IncludeOptionsParams]` — Options to include related resources in the response. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -12584,8 +12608,9 @@ how to sort or filter the results. Your `SearchOrdersQuery` can: Note that details for orders processed with Square Point of Sale while in offline mode might not be transmitted to Square for up to 72 hours. Offline -orders have a `created_at` value that reflects the time the order was created, -not the time it was subsequently transmitted to Square. +orders have a `created_at` value that reflects the time the order was +transmitted to Square and created server-side, not the time the order was +created on the Point of Sale device.
diff --git a/src/square/catalog/client.py b/src/square/catalog/client.py index 66bab377..b5eca68b 100644 --- a/src/square/catalog/client.py +++ b/src/square/catalog/client.py @@ -10,6 +10,7 @@ from ..requests.catalog_object_batch import CatalogObjectBatchParams from ..requests.catalog_query import CatalogQueryParams from ..requests.custom_attribute_filter import CustomAttributeFilterParams +from ..requests.include_options import IncludeOptionsParams from ..types.archived_state import ArchivedState from ..types.batch_delete_catalog_objects_response import BatchDeleteCatalogObjectsResponse from ..types.batch_get_catalog_objects_response import BatchGetCatalogObjectsResponse @@ -108,6 +109,7 @@ def batch_get( catalog_version: typing.Optional[int] = OMIT, include_deleted_objects: typing.Optional[bool] = OMIT, include_category_path_to_root: typing.Optional[bool] = OMIT, + include_options: typing.Optional[IncludeOptionsParams] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> BatchGetCatalogObjectsResponse: """ @@ -154,6 +156,9 @@ def batch_get( and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned in the response payload. + include_options : typing.Optional[IncludeOptionsParams] + Options to include related resources in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -180,6 +185,7 @@ def batch_get( catalog_version=catalog_version, include_deleted_objects=include_deleted_objects, include_category_path_to_root=include_category_path_to_root, + include_options=include_options, request_options=request_options, ) return _response.data @@ -399,6 +405,7 @@ def search( query: typing.Optional[CatalogQueryParams] = OMIT, limit: typing.Optional[int] = OMIT, include_category_path_to_root: typing.Optional[bool] = OMIT, + include_options: typing.Optional[IncludeOptionsParams] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SearchCatalogObjectsResponse: """ @@ -475,6 +482,9 @@ def search( include_category_path_to_root : typing.Optional[bool] Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists of `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned in the response payload. If `include_category_path_to_root` is `true`, then the `include_deleted_objects` request parameter must be `false`. Both properties cannot be `true` at the same time. + include_options : typing.Optional[IncludeOptionsParams] + Options to include related resources in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -507,6 +517,7 @@ def search( query=query, limit=limit, include_category_path_to_root=include_category_path_to_root, + include_options=include_options, request_options=request_options, ) return _response.data @@ -524,6 +535,7 @@ def search_items( product_types: typing.Optional[typing.Sequence[CatalogItemProductType]] = OMIT, custom_attribute_filters: typing.Optional[typing.Sequence[CustomAttributeFilterParams]] = OMIT, archived_state: typing.Optional[ArchivedState] = OMIT, + include_options: typing.Optional[IncludeOptionsParams] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SearchCatalogItemsResponse: """ @@ -576,6 +588,9 @@ def search_items( archived_state : typing.Optional[ArchivedState] The query filter to return not archived (`ARCHIVED_STATE_NOT_ARCHIVED`), archived (`ARCHIVED_STATE_ARCHIVED`), or either type (`ARCHIVED_STATE_ALL`) of items. + include_options : typing.Optional[IncludeOptionsParams] + Options to include related resources in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -624,6 +639,7 @@ def search_items( product_types=product_types, custom_attribute_filters=custom_attribute_filters, archived_state=archived_state, + include_options=include_options, request_options=request_options, ) return _response.data @@ -841,6 +857,7 @@ async def batch_get( catalog_version: typing.Optional[int] = OMIT, include_deleted_objects: typing.Optional[bool] = OMIT, include_category_path_to_root: typing.Optional[bool] = OMIT, + include_options: typing.Optional[IncludeOptionsParams] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> BatchGetCatalogObjectsResponse: """ @@ -887,6 +904,9 @@ async def batch_get( and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned in the response payload. + include_options : typing.Optional[IncludeOptionsParams] + Options to include related resources in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -921,6 +941,7 @@ async def main() -> None: catalog_version=catalog_version, include_deleted_objects=include_deleted_objects, include_category_path_to_root=include_category_path_to_root, + include_options=include_options, request_options=request_options, ) return _response.data @@ -1165,6 +1186,7 @@ async def search( query: typing.Optional[CatalogQueryParams] = OMIT, limit: typing.Optional[int] = OMIT, include_category_path_to_root: typing.Optional[bool] = OMIT, + include_options: typing.Optional[IncludeOptionsParams] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SearchCatalogObjectsResponse: """ @@ -1241,6 +1263,9 @@ async def search( include_category_path_to_root : typing.Optional[bool] Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists of `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned in the response payload. If `include_category_path_to_root` is `true`, then the `include_deleted_objects` request parameter must be `false`. Both properties cannot be `true` at the same time. + include_options : typing.Optional[IncludeOptionsParams] + Options to include related resources in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1284,6 +1309,7 @@ async def main() -> None: query=query, limit=limit, include_category_path_to_root=include_category_path_to_root, + include_options=include_options, request_options=request_options, ) return _response.data @@ -1301,6 +1327,7 @@ async def search_items( product_types: typing.Optional[typing.Sequence[CatalogItemProductType]] = OMIT, custom_attribute_filters: typing.Optional[typing.Sequence[CustomAttributeFilterParams]] = OMIT, archived_state: typing.Optional[ArchivedState] = OMIT, + include_options: typing.Optional[IncludeOptionsParams] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SearchCatalogItemsResponse: """ @@ -1353,6 +1380,9 @@ async def search_items( archived_state : typing.Optional[ArchivedState] The query filter to return not archived (`ARCHIVED_STATE_NOT_ARCHIVED`), archived (`ARCHIVED_STATE_ARCHIVED`), or either type (`ARCHIVED_STATE_ALL`) of items. + include_options : typing.Optional[IncludeOptionsParams] + Options to include related resources in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1409,6 +1439,7 @@ async def main() -> None: product_types=product_types, custom_attribute_filters=custom_attribute_filters, archived_state=archived_state, + include_options=include_options, request_options=request_options, ) return _response.data diff --git a/src/square/catalog/raw_client.py b/src/square/catalog/raw_client.py index 6a1da146..75d0b101 100644 --- a/src/square/catalog/raw_client.py +++ b/src/square/catalog/raw_client.py @@ -13,6 +13,7 @@ from ..requests.catalog_object_batch import CatalogObjectBatchParams from ..requests.catalog_query import CatalogQueryParams from ..requests.custom_attribute_filter import CustomAttributeFilterParams +from ..requests.include_options import IncludeOptionsParams from ..types.archived_state import ArchivedState from ..types.batch_delete_catalog_objects_response import BatchDeleteCatalogObjectsResponse from ..types.batch_get_catalog_objects_response import BatchGetCatalogObjectsResponse @@ -106,6 +107,7 @@ def batch_get( catalog_version: typing.Optional[int] = OMIT, include_deleted_objects: typing.Optional[bool] = OMIT, include_category_path_to_root: typing.Optional[bool] = OMIT, + include_options: typing.Optional[IncludeOptionsParams] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[BatchGetCatalogObjectsResponse]: """ @@ -152,6 +154,9 @@ def batch_get( and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned in the response payload. + include_options : typing.Optional[IncludeOptionsParams] + Options to include related resources in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -169,6 +174,9 @@ def batch_get( "catalog_version": catalog_version, "include_deleted_objects": include_deleted_objects, "include_category_path_to_root": include_category_path_to_root, + "include_options": convert_and_respect_annotation_metadata( + object_=include_options, annotation=IncludeOptionsParams, direction="write" + ), }, headers={ "content-type": "application/json", @@ -430,6 +438,7 @@ def search( query: typing.Optional[CatalogQueryParams] = OMIT, limit: typing.Optional[int] = OMIT, include_category_path_to_root: typing.Optional[bool] = OMIT, + include_options: typing.Optional[IncludeOptionsParams] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[SearchCatalogObjectsResponse]: """ @@ -506,6 +515,9 @@ def search( include_category_path_to_root : typing.Optional[bool] Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists of `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned in the response payload. If `include_category_path_to_root` is `true`, then the `include_deleted_objects` request parameter must be `false`. Both properties cannot be `true` at the same time. + include_options : typing.Optional[IncludeOptionsParams] + Options to include related resources in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -528,6 +540,9 @@ def search( ), "limit": limit, "include_category_path_to_root": include_category_path_to_root, + "include_options": convert_and_respect_annotation_metadata( + object_=include_options, annotation=IncludeOptionsParams, direction="write" + ), }, headers={ "content-type": "application/json", @@ -563,6 +578,7 @@ def search_items( product_types: typing.Optional[typing.Sequence[CatalogItemProductType]] = OMIT, custom_attribute_filters: typing.Optional[typing.Sequence[CustomAttributeFilterParams]] = OMIT, archived_state: typing.Optional[ArchivedState] = OMIT, + include_options: typing.Optional[IncludeOptionsParams] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[SearchCatalogItemsResponse]: """ @@ -615,6 +631,9 @@ def search_items( archived_state : typing.Optional[ArchivedState] The query filter to return not archived (`ARCHIVED_STATE_NOT_ARCHIVED`), archived (`ARCHIVED_STATE_ARCHIVED`), or either type (`ARCHIVED_STATE_ALL`) of items. + include_options : typing.Optional[IncludeOptionsParams] + Options to include related resources in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -641,6 +660,9 @@ def search_items( direction="write", ), "archived_state": archived_state, + "include_options": convert_and_respect_annotation_metadata( + object_=include_options, annotation=IncludeOptionsParams, direction="write" + ), }, headers={ "content-type": "application/json", @@ -864,6 +886,7 @@ async def batch_get( catalog_version: typing.Optional[int] = OMIT, include_deleted_objects: typing.Optional[bool] = OMIT, include_category_path_to_root: typing.Optional[bool] = OMIT, + include_options: typing.Optional[IncludeOptionsParams] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[BatchGetCatalogObjectsResponse]: """ @@ -910,6 +933,9 @@ async def batch_get( and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned in the response payload. + include_options : typing.Optional[IncludeOptionsParams] + Options to include related resources in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -927,6 +953,9 @@ async def batch_get( "catalog_version": catalog_version, "include_deleted_objects": include_deleted_objects, "include_category_path_to_root": include_category_path_to_root, + "include_options": convert_and_respect_annotation_metadata( + object_=include_options, annotation=IncludeOptionsParams, direction="write" + ), }, headers={ "content-type": "application/json", @@ -1193,6 +1222,7 @@ async def search( query: typing.Optional[CatalogQueryParams] = OMIT, limit: typing.Optional[int] = OMIT, include_category_path_to_root: typing.Optional[bool] = OMIT, + include_options: typing.Optional[IncludeOptionsParams] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[SearchCatalogObjectsResponse]: """ @@ -1269,6 +1299,9 @@ async def search( include_category_path_to_root : typing.Optional[bool] Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists of `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned in the response payload. If `include_category_path_to_root` is `true`, then the `include_deleted_objects` request parameter must be `false`. Both properties cannot be `true` at the same time. + include_options : typing.Optional[IncludeOptionsParams] + Options to include related resources in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1291,6 +1324,9 @@ async def search( ), "limit": limit, "include_category_path_to_root": include_category_path_to_root, + "include_options": convert_and_respect_annotation_metadata( + object_=include_options, annotation=IncludeOptionsParams, direction="write" + ), }, headers={ "content-type": "application/json", @@ -1326,6 +1362,7 @@ async def search_items( product_types: typing.Optional[typing.Sequence[CatalogItemProductType]] = OMIT, custom_attribute_filters: typing.Optional[typing.Sequence[CustomAttributeFilterParams]] = OMIT, archived_state: typing.Optional[ArchivedState] = OMIT, + include_options: typing.Optional[IncludeOptionsParams] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[SearchCatalogItemsResponse]: """ @@ -1378,6 +1415,9 @@ async def search_items( archived_state : typing.Optional[ArchivedState] The query filter to return not archived (`ARCHIVED_STATE_NOT_ARCHIVED`), archived (`ARCHIVED_STATE_ARCHIVED`), or either type (`ARCHIVED_STATE_ALL`) of items. + include_options : typing.Optional[IncludeOptionsParams] + Options to include related resources in the response. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1404,6 +1444,9 @@ async def search_items( direction="write", ), "archived_state": archived_state, + "include_options": convert_and_respect_annotation_metadata( + object_=include_options, annotation=IncludeOptionsParams, direction="write" + ), }, headers={ "content-type": "application/json", diff --git a/src/square/core/client_wrapper.py b/src/square/core/client_wrapper.py index f7373f50..765efaaf 100644 --- a/src/square/core/client_wrapper.py +++ b/src/square/core/client_wrapper.py @@ -37,7 +37,7 @@ def get_headers(self) -> typing.Dict[str, str]: token = self._get_token() if token is not None: headers["Authorization"] = f"Bearer {token}" - headers["Square-Version"] = self._version if self._version is not None else "2026-07-15" + headers["Square-Version"] = self._version if self._version is not None else "2026-08-19" return headers def _get_token(self) -> typing.Optional[str]: diff --git a/src/square/orders/client.py b/src/square/orders/client.py index 3537c4af..51ba0b15 100644 --- a/src/square/orders/client.py +++ b/src/square/orders/client.py @@ -343,8 +343,9 @@ def search( Note that details for orders processed with Square Point of Sale while in offline mode might not be transmitted to Square for up to 72 hours. Offline - orders have a `created_at` value that reflects the time the order was created, - not the time it was subsequently transmitted to Square. + orders have a `created_at` value that reflects the time the order was + transmitted to Square and created server-side, not the time the order was + created on the Point of Sale device. Parameters ---------- @@ -983,8 +984,9 @@ async def search( Note that details for orders processed with Square Point of Sale while in offline mode might not be transmitted to Square for up to 72 hours. Offline - orders have a `created_at` value that reflects the time the order was created, - not the time it was subsequently transmitted to Square. + orders have a `created_at` value that reflects the time the order was + transmitted to Square and created server-side, not the time the order was + created on the Point of Sale device. Parameters ---------- diff --git a/src/square/orders/raw_client.py b/src/square/orders/raw_client.py index cfa9f709..3141ad27 100644 --- a/src/square/orders/raw_client.py +++ b/src/square/orders/raw_client.py @@ -314,8 +314,9 @@ def search( Note that details for orders processed with Square Point of Sale while in offline mode might not be transmitted to Square for up to 72 hours. Offline - orders have a `created_at` value that reflects the time the order was created, - not the time it was subsequently transmitted to Square. + orders have a `created_at` value that reflects the time the order was + transmitted to Square and created server-side, not the time the order was + created on the Point of Sale device. Parameters ---------- @@ -887,8 +888,9 @@ async def search( Note that details for orders processed with Square Point of Sale while in offline mode might not be transmitted to Square for up to 72 hours. Offline - orders have a `created_at` value that reflects the time the order was created, - not the time it was subsequently transmitted to Square. + orders have a `created_at` value that reflects the time the order was + transmitted to Square and created server-side, not the time the order was + created on the Point of Sale device. Parameters ---------- diff --git a/src/square/requests/batch_get_catalog_objects_response.py b/src/square/requests/batch_get_catalog_objects_response.py index 3365036e..b36a9aa0 100644 --- a/src/square/requests/batch_get_catalog_objects_response.py +++ b/src/square/requests/batch_get_catalog_objects_response.py @@ -5,6 +5,7 @@ import typing_extensions from .catalog_object import CatalogObjectParams from .error import ErrorParams +from .included_resources import IncludedResourcesParams class BatchGetCatalogObjectsResponseParams(typing_extensions.TypedDict): @@ -22,3 +23,8 @@ class BatchGetCatalogObjectsResponseParams(typing_extensions.TypedDict): """ A list of [CatalogObject](entity:CatalogObject)s referenced by the object in the `objects` field. """ + + included_resources: typing_extensions.NotRequired[IncludedResourcesParams] + """ + A list of [CatalogObject](entity:CatalogObject)s referenced by the object in the `objects` field and specifically requested. + """ diff --git a/src/square/requests/catalog_modifier.py b/src/square/requests/catalog_modifier.py index 9b3a5318..cb3e0c5d 100644 --- a/src/square/requests/catalog_modifier.py +++ b/src/square/requests/catalog_modifier.py @@ -61,3 +61,15 @@ class CatalogModifierParams(typing_extensions.TypedDict): """ When `true`, this modifier is hidden from online ordering channels. This setting can be overridden at the item level using `CatalogModifierListInfo.modifier_overrides`. """ + + child_modifier_list_ids: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]] + """ + Child `CatalogModifierList`s that this `CatalogModifier` nests for multi-step choices. + When a customer or staff member selects this modifier, the relevant follow-up modifier list appears. + For example, selecting "Hummus" reveals a secondary "Choose Hummus Flavor" set, and selecting a flavor + could reveal a third-level portion size set. + + Each entry references a child modifier list. Each modifier can nest up to 5 child modifier list, and + supports up to 3 levels of nesting depth. The order in `child_modifier_list_ids` determines display order + during checkout. + """ diff --git a/src/square/requests/catalog_query.py b/src/square/requests/catalog_query.py index feb7bd5b..e505f611 100644 --- a/src/square/requests/catalog_query.py +++ b/src/square/requests/catalog_query.py @@ -6,6 +6,7 @@ from .catalog_query_items_for_item_options import CatalogQueryItemsForItemOptionsParams from .catalog_query_items_for_modifier_list import CatalogQueryItemsForModifierListParams from .catalog_query_items_for_tax import CatalogQueryItemsForTaxParams +from .catalog_query_modifiers_for_child_list import CatalogQueryModifiersForChildListParams from .catalog_query_prefix import CatalogQueryPrefixParams from .catalog_query_range import CatalogQueryRangeParams from .catalog_query_set import CatalogQuerySetParams @@ -103,3 +104,8 @@ class CatalogQueryParams(typing_extensions.TypedDict): A query expression to return item variations (of the [CatalogItemVariation](entity:CatalogItemVariation) type) that contain all of the specified `CatalogItemOption` IDs. """ + + modifiers_for_child_list_query: typing_extensions.NotRequired[CatalogQueryModifiersForChildListParams] + """ + A query expression to return `CatalogModifier` objects that nest the specified modifier lists (via `child_modifier_list_ids`) + """ diff --git a/src/square/requests/catalog_query_modifiers_for_child_list.py b/src/square/requests/catalog_query_modifiers_for_child_list.py new file mode 100644 index 00000000..ddcd62e7 --- /dev/null +++ b/src/square/requests/catalog_query_modifiers_for_child_list.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import typing_extensions + + +class CatalogQueryModifiersForChildListParams(typing_extensions.TypedDict): + """ + Query to find `CatalogModifier` objects that reference a given `CatalogModifierList` in their `child_modifier_list_ids` field. + """ + + child_modifier_list_ids: typing.Sequence[str] + """ + The `CatalogModifierList` IDs to find parent `CatalogModifier`s for. + Returns `CatalogModifier` objects where `child_modifier_list_ids` contains any of these IDs. + """ diff --git a/src/square/requests/include_options.py b/src/square/requests/include_options.py new file mode 100644 index 00000000..f45f940e --- /dev/null +++ b/src/square/requests/include_options.py @@ -0,0 +1,19 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import typing_extensions +from ..types.include_type import IncludeType + + +class IncludeOptionsParams(typing_extensions.TypedDict): + """ + Options to include related resources of the requested `CatalogObject`s. Related resources will be included in + `IncludedResources` in the response. + """ + + include: typing_extensions.NotRequired[typing.Optional[typing.Sequence[IncludeType]]] + """ + Resources to include in the response. + See [IncludeType](#type-includetype) for possible values + """ diff --git a/src/square/requests/included_resources.py b/src/square/requests/included_resources.py new file mode 100644 index 00000000..94a77f9f --- /dev/null +++ b/src/square/requests/included_resources.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import typing_extensions +from .catalog_object import CatalogObjectParams + + +class IncludedResourcesParams(typing_extensions.TypedDict): + """ + Related resources of the response `CatalogObject`s requested using `IncludeOptions` + """ + + nested_modifiers: typing_extensions.NotRequired[typing.Optional[typing.Sequence[CatalogObjectParams]]] + """ + Nested `CatalogModifierList`s as requested via `INCLUDE_NESTED_MODIFIERS`. + """ + + ancestor_modifiers: typing_extensions.NotRequired[typing.Optional[typing.Sequence[CatalogObjectParams]]] + """ + Ancestor `CatalogModifierList`s as requested via INCLUDE_ANCESTOR_MODIFIERS + """ diff --git a/src/square/requests/location.py b/src/square/requests/location.py index 87d42239..0f36a10d 100644 --- a/src/square/requests/location.py +++ b/src/square/requests/location.py @@ -175,3 +175,15 @@ class LocationParams(typing_extensions.TypedDict): """ The tax IDs for this location. """ + + custom_receipt_text: typing_extensions.NotRequired[typing.Optional[str]] + """ + The custom text that appears on receipts issued for this location. + This text can also be configured in the Seller Dashboard (Receipts section). + """ + + return_policy: typing_extensions.NotRequired[typing.Optional[str]] + """ + The return policy that appears on receipts issued for this location. + This text can also be configured in the Seller Dashboard (Receipts section). + """ diff --git a/src/square/requests/search_catalog_items_response.py b/src/square/requests/search_catalog_items_response.py index 3134597b..1f209e9e 100644 --- a/src/square/requests/search_catalog_items_response.py +++ b/src/square/requests/search_catalog_items_response.py @@ -5,6 +5,7 @@ import typing_extensions from .catalog_object import CatalogObjectParams from .error import ErrorParams +from .included_resources import IncludedResourcesParams class SearchCatalogItemsResponseParams(typing_extensions.TypedDict): @@ -31,3 +32,8 @@ class SearchCatalogItemsResponseParams(typing_extensions.TypedDict): """ Ids of returned item variations matching the specified query expression. """ + + included_resources: typing_extensions.NotRequired[IncludedResourcesParams] + """ + Related resources included in the response as requested via include_options + """ diff --git a/src/square/requests/search_catalog_objects_response.py b/src/square/requests/search_catalog_objects_response.py index d63b322a..c694a149 100644 --- a/src/square/requests/search_catalog_objects_response.py +++ b/src/square/requests/search_catalog_objects_response.py @@ -5,6 +5,7 @@ import typing_extensions from .catalog_object import CatalogObjectParams from .error import ErrorParams +from .included_resources import IncludedResourcesParams class SearchCatalogObjectsResponseParams(typing_extensions.TypedDict): @@ -34,3 +35,8 @@ class SearchCatalogObjectsResponseParams(typing_extensions.TypedDict): When the associated product catalog was last updated. Will match the value for `end_time` or `cursor` if either field is included in the `SearchCatalog` request. """ + + included_resources: typing_extensions.NotRequired[IncludedResourcesParams] + """ + A list of [CatalogObject](entity:CatalogObject)s referenced by the object in the `objects` field and specifically requested. + """ diff --git a/src/square/types/batch_get_catalog_objects_response.py b/src/square/types/batch_get_catalog_objects_response.py index d47dad47..4d4bf76a 100644 --- a/src/square/types/batch_get_catalog_objects_response.py +++ b/src/square/types/batch_get_catalog_objects_response.py @@ -8,6 +8,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .error import Error +from .included_resources import IncludedResources class BatchGetCatalogObjectsResponse(UncheckedBaseModel): @@ -26,6 +27,11 @@ class BatchGetCatalogObjectsResponse(UncheckedBaseModel): A list of [CatalogObject](entity:CatalogObject)s referenced by the object in the `objects` field. """ + included_resources: typing.Optional[IncludedResources] = pydantic.Field(default=None) + """ + A list of [CatalogObject](entity:CatalogObject)s referenced by the object in the `objects` field and specifically requested. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/square/types/card_brand.py b/src/square/types/card_brand.py index b04c28bb..8b17da01 100644 --- a/src/square/types/card_brand.py +++ b/src/square/types/card_brand.py @@ -18,6 +18,10 @@ "EFTPOS", "FELICA", "EBT", + "QUICPAY", + "ID", + "TRANSPORTATION_IC", + "CARNET", ], typing.Any, ] diff --git a/src/square/types/catalog_modifier.py b/src/square/types/catalog_modifier.py index 03584ba2..f4e81f3f 100644 --- a/src/square/types/catalog_modifier.py +++ b/src/square/types/catalog_modifier.py @@ -64,6 +64,18 @@ class CatalogModifier(UncheckedBaseModel): When `true`, this modifier is hidden from online ordering channels. This setting can be overridden at the item level using `CatalogModifierListInfo.modifier_overrides`. """ + child_modifier_list_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Child `CatalogModifierList`s that this `CatalogModifier` nests for multi-step choices. + When a customer or staff member selects this modifier, the relevant follow-up modifier list appears. + For example, selecting "Hummus" reveals a secondary "Choose Hummus Flavor" set, and selecting a flavor + could reveal a third-level portion size set. + + Each entry references a child modifier list. Each modifier can nest up to 5 child modifier list, and + supports up to 3 levels of nesting depth. The order in `child_modifier_list_ids` determines display order + during checkout. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/square/types/catalog_query.py b/src/square/types/catalog_query.py index e7c8056e..636e66a0 100644 --- a/src/square/types/catalog_query.py +++ b/src/square/types/catalog_query.py @@ -10,6 +10,7 @@ from .catalog_query_items_for_item_options import CatalogQueryItemsForItemOptions from .catalog_query_items_for_modifier_list import CatalogQueryItemsForModifierList from .catalog_query_items_for_tax import CatalogQueryItemsForTax +from .catalog_query_modifiers_for_child_list import CatalogQueryModifiersForChildList from .catalog_query_prefix import CatalogQueryPrefix from .catalog_query_range import CatalogQueryRange from .catalog_query_set import CatalogQuerySet @@ -108,6 +109,11 @@ class CatalogQuery(UncheckedBaseModel): contain all of the specified `CatalogItemOption` IDs. """ + modifiers_for_child_list_query: typing.Optional[CatalogQueryModifiersForChildList] = pydantic.Field(default=None) + """ + A query expression to return `CatalogModifier` objects that nest the specified modifier lists (via `child_modifier_list_ids`) + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/square/types/catalog_query_modifiers_for_child_list.py b/src/square/types/catalog_query_modifiers_for_child_list.py new file mode 100644 index 00000000..b922bfaa --- /dev/null +++ b/src/square/types/catalog_query_modifiers_for_child_list.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class CatalogQueryModifiersForChildList(UncheckedBaseModel): + """ + Query to find `CatalogModifier` objects that reference a given `CatalogModifierList` in their `child_modifier_list_ids` field. + """ + + child_modifier_list_ids: typing.List[str] = pydantic.Field() + """ + The `CatalogModifierList` IDs to find parent `CatalogModifier`s for. + Returns `CatalogModifier` objects where `child_modifier_list_ids` contains any of these IDs. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/square/types/error_code.py b/src/square/types/error_code.py index 326c4878..e2b1b821 100644 --- a/src/square/types/error_code.py +++ b/src/square/types/error_code.py @@ -102,6 +102,7 @@ "CARD_TOKEN_EXPIRED", "CARD_TOKEN_USED", "AMOUNT_TOO_HIGH", + "AMOUNT_TOO_LOW", "UNSUPPORTED_INSTRUMENT_TYPE", "REFUND_AMOUNT_INVALID", "REFUND_ALREADY_PENDING", @@ -132,6 +133,13 @@ "PLAID_ERROR", "PLAID_ERROR_ITEM_LOGIN_REQUIRED", "PLAID_ERROR_RATE_LIMIT", + "PLAID_ERROR_INVALID_ACCESS_TOKEN", + "PLAID_ERROR_INVALID_ACCOUNT_ID", + "PLAID_ERROR_NO_ACCOUNTS", + "PLAID_ERROR_ITEM_NOT_FOUND", + "PLAID_ERROR_INSUFFICIENT_CREDENTIALS", + "PLAID_ERROR_ITEM_NOT_SUPPORTED", + "PLAID_ERROR_PRODUCT_NOT_READY", "PAYMENT_SOURCE_NOT_ENABLED_FOR_TARGET", "CARD_DECLINED", "VERIFY_CVV_FAILURE", @@ -143,6 +151,7 @@ "ALLOWABLE_PIN_TRIES_EXCEEDED", "RESERVATION_DECLINED", "UNKNOWN_BODY_PARAMETER", + "CART_INELIGIBLE_FOR_EBT", "NOT_FOUND", "APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND", "METHOD_NOT_ALLOWED", diff --git a/src/square/types/include_options.py b/src/square/types/include_options.py new file mode 100644 index 00000000..95e20c4a --- /dev/null +++ b/src/square/types/include_options.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .include_type import IncludeType + + +class IncludeOptions(UncheckedBaseModel): + """ + Options to include related resources of the requested `CatalogObject`s. Related resources will be included in + `IncludedResources` in the response. + """ + + include: typing.Optional[typing.List[IncludeType]] = pydantic.Field(default=None) + """ + Resources to include in the response. + See [IncludeType](#type-includetype) for possible values + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/square/types/include_type.py b/src/square/types/include_type.py new file mode 100644 index 00000000..b919e735 --- /dev/null +++ b/src/square/types/include_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +IncludeType = typing.Union[typing.Literal["INCLUDE_NESTED_MODIFIERS", "INCLUDE_ANCESTOR_MODIFIERS"], typing.Any] diff --git a/src/square/types/included_resources.py b/src/square/types/included_resources.py new file mode 100644 index 00000000..11b038aa --- /dev/null +++ b/src/square/types/included_resources.py @@ -0,0 +1,58 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs +from ..core.unchecked_base_model import UncheckedBaseModel + + +class IncludedResources(UncheckedBaseModel): + """ + Related resources of the response `CatalogObject`s requested using `IncludeOptions` + """ + + nested_modifiers: typing.Optional[typing.List["CatalogObject"]] = pydantic.Field(default=None) + """ + Nested `CatalogModifierList`s as requested via `INCLUDE_NESTED_MODIFIERS`. + """ + + ancestor_modifiers: typing.Optional[typing.List["CatalogObject"]] = pydantic.Field(default=None) + """ + Ancestor `CatalogModifierList`s as requested via INCLUDE_ANCESTOR_MODIFIERS + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + +from .catalog_item import CatalogItem # noqa: E402, I001 +from .catalog_item_option import CatalogItemOption # noqa: E402, I001 +from .catalog_modifier_list import CatalogModifierList # noqa: E402, I001 +from .catalog_object import CatalogObject # noqa: E402, I001 +from .catalog_object_item import CatalogObjectItem # noqa: E402, I001 +from .catalog_object_item_option import CatalogObjectItemOption # noqa: E402, I001 +from .catalog_object_modifier_list import CatalogObjectModifierList # noqa: E402, I001 +from .catalog_object_subscription_plan import CatalogObjectSubscriptionPlan # noqa: E402, I001 +from .catalog_subscription_plan import CatalogSubscriptionPlan # noqa: E402, I001 + +update_forward_refs( + IncludedResources, + CatalogItem=CatalogItem, + CatalogItemOption=CatalogItemOption, + CatalogModifierList=CatalogModifierList, + CatalogObject=CatalogObject, + CatalogObjectItem=CatalogObjectItem, + CatalogObjectItemOption=CatalogObjectItemOption, + CatalogObjectModifierList=CatalogObjectModifierList, + CatalogObjectSubscriptionPlan=CatalogObjectSubscriptionPlan, + CatalogSubscriptionPlan=CatalogSubscriptionPlan, +) diff --git a/src/square/types/location.py b/src/square/types/location.py index 798685f3..da68cebb 100644 --- a/src/square/types/location.py +++ b/src/square/types/location.py @@ -178,6 +178,18 @@ class Location(UncheckedBaseModel): The tax IDs for this location. """ + custom_receipt_text: typing.Optional[str] = pydantic.Field(default=None) + """ + The custom text that appears on receipts issued for this location. + This text can also be configured in the Seller Dashboard (Receipts section). + """ + + return_policy: typing.Optional[str] = pydantic.Field(default=None) + """ + The return policy that appears on receipts issued for this location. + This text can also be configured in the Seller Dashboard (Receipts section). + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/square/types/search_catalog_items_response.py b/src/square/types/search_catalog_items_response.py index 5abb5514..9fdaf5e8 100644 --- a/src/square/types/search_catalog_items_response.py +++ b/src/square/types/search_catalog_items_response.py @@ -8,6 +8,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .error import Error +from .included_resources import IncludedResources class SearchCatalogItemsResponse(UncheckedBaseModel): @@ -35,6 +36,11 @@ class SearchCatalogItemsResponse(UncheckedBaseModel): Ids of returned item variations matching the specified query expression. """ + included_resources: typing.Optional[IncludedResources] = pydantic.Field(default=None) + """ + Related resources included in the response as requested via include_options + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/square/types/search_catalog_objects_response.py b/src/square/types/search_catalog_objects_response.py index 6f5bebc6..cee34373 100644 --- a/src/square/types/search_catalog_objects_response.py +++ b/src/square/types/search_catalog_objects_response.py @@ -8,6 +8,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs from ..core.unchecked_base_model import UncheckedBaseModel from .error import Error +from .included_resources import IncludedResources class SearchCatalogObjectsResponse(UncheckedBaseModel): @@ -38,6 +39,11 @@ class SearchCatalogObjectsResponse(UncheckedBaseModel): match the value for `end_time` or `cursor` if either field is included in the `SearchCatalog` request. """ + included_resources: typing.Optional[IncludedResources] = pydantic.Field(default=None) + """ + A list of [CatalogObject](entity:CatalogObject)s referenced by the object in the `objects` field and specifically requested. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: From 0bb2d83cd82a0693ce927a6443bb3c617fda4f4d Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2026 20:54:40 +0000 Subject: [PATCH 2/2] [fern-replay] advance lockfile --- .fern/replay.lock | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.fern/replay.lock b/.fern/replay.lock index 6b0278dd..8ec9716a 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -18,5 +18,11 @@ generations: cli_version: unknown generator_versions: fernapi/fern-python-sdk: 4.55.4 -current_generation: 66f77abdb06c96cc5a9122cd240a6bb5cfd020f6 + - commit_sha: cd6e74f053ff22480919bf8c49a452ef62eab4c4 + tree_hash: eb608268f87fb41df433e5adc42be96d5262a508 + timestamp: 2026-08-18T20:54:36.227Z + cli_version: unknown + generator_versions: + fernapi/fern-python-sdk: 4.55.4 +current_generation: cd6e74f053ff22480919bf8c49a452ef62eab4c4 patches: []