Skip to content

Commit c198070

Browse files
SDK regeneration
1 parent 2f68429 commit c198070

File tree

170 files changed

+1345
-1049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+1345
-1049
lines changed

.fern/metadata.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"cliVersion": "2.8.1",
3+
"generatorName": "fernapi/fern-python-sdk",
4+
"generatorVersion": "4.39.2",
5+
"generatorConfig": {
6+
"client": {
7+
"class_name": "Square",
8+
"filename": "client.py"
9+
},
10+
"pydantic_config": {
11+
"skip_validation": true
12+
},
13+
"use_typeddict_requests": true,
14+
"use_typeddict_requests_for_file_upload": true,
15+
"exclude_types_from_init_exports": true
16+
}
17+
}

poetry.lock

Lines changed: 41 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "squareup"
33

44
[tool.poetry]
55
name = "squareup"
6-
version = "43.2.0.20251016"
6+
version = "43.3.0.20251016"
77
description = ""
88
readme = "README.md"
99
authors = []
@@ -31,7 +31,7 @@ packages = [
3131
{ include = "square", from = "src"}
3232
]
3333

34-
[project.urls]
34+
[tool.poetry.urls]
3535
Repository = 'https://github.com/square/square-python-sdk'
3636

3737
[tool.poetry.dependencies]
@@ -45,6 +45,7 @@ typing_extensions = ">= 4.0.0"
4545
mypy = "==1.13.0"
4646
pytest = "^7.4.0"
4747
pytest-asyncio = "^0.23.5"
48+
pytest-xdist = "^3.6.1"
4849
python-dateutil = "^2.9.0"
4950
types-python-dateutil = "^2.9.0.20240316"
5051
ruff = "==0.11.5"

src/square/bank_accounts/client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from ..types.bank_account import BankAccount
99
from ..types.get_bank_account_by_v1id_response import GetBankAccountByV1IdResponse
1010
from ..types.get_bank_account_response import GetBankAccountResponse
11+
from ..types.list_bank_accounts_response import ListBankAccountsResponse
1112
from .raw_client import AsyncRawBankAccountsClient, RawBankAccountsClient
1213

1314

@@ -33,7 +34,7 @@ def list(
3334
limit: typing.Optional[int] = None,
3435
location_id: typing.Optional[str] = None,
3536
request_options: typing.Optional[RequestOptions] = None,
36-
) -> SyncPager[BankAccount]:
37+
) -> SyncPager[BankAccount, ListBankAccountsResponse]:
3738
"""
3839
Returns a list of [BankAccount](entity:BankAccount) objects linked to a Square account.
3940
@@ -60,7 +61,7 @@ def list(
6061
6162
Returns
6263
-------
63-
SyncPager[BankAccount]
64+
SyncPager[BankAccount, ListBankAccountsResponse]
6465
Success
6566
6667
Examples
@@ -176,7 +177,7 @@ async def list(
176177
limit: typing.Optional[int] = None,
177178
location_id: typing.Optional[str] = None,
178179
request_options: typing.Optional[RequestOptions] = None,
179-
) -> AsyncPager[BankAccount]:
180+
) -> AsyncPager[BankAccount, ListBankAccountsResponse]:
180181
"""
181182
Returns a list of [BankAccount](entity:BankAccount) objects linked to a Square account.
182183
@@ -203,7 +204,7 @@ async def list(
203204
204205
Returns
205206
-------
206-
AsyncPager[BankAccount]
207+
AsyncPager[BankAccount, ListBankAccountsResponse]
207208
Success
208209
209210
Examples

src/square/bank_accounts/raw_client.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
88
from ..core.http_response import AsyncHttpResponse, HttpResponse
99
from ..core.jsonable_encoder import jsonable_encoder
10-
from ..core.pagination import AsyncPager, BaseHttpResponse, SyncPager
10+
from ..core.pagination import AsyncPager, SyncPager
1111
from ..core.request_options import RequestOptions
1212
from ..core.unchecked_base_model import construct_type
1313
from ..types.bank_account import BankAccount
@@ -27,7 +27,7 @@ def list(
2727
limit: typing.Optional[int] = None,
2828
location_id: typing.Optional[str] = None,
2929
request_options: typing.Optional[RequestOptions] = None,
30-
) -> SyncPager[BankAccount]:
30+
) -> SyncPager[BankAccount, ListBankAccountsResponse]:
3131
"""
3232
Returns a list of [BankAccount](entity:BankAccount) objects linked to a Square account.
3333
@@ -54,7 +54,7 @@ def list(
5454
5555
Returns
5656
-------
57-
SyncPager[BankAccount]
57+
SyncPager[BankAccount, ListBankAccountsResponse]
5858
Success
5959
"""
6060
_response = self._client_wrapper.httpx_client.request(
@@ -85,9 +85,7 @@ def list(
8585
location_id=location_id,
8686
request_options=request_options,
8787
)
88-
return SyncPager(
89-
has_next=_has_next, items=_items, get_next=_get_next, response=BaseHttpResponse(response=_response)
90-
)
88+
return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
9189
_response_json = _response.json()
9290
except JSONDecodeError:
9391
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
@@ -185,7 +183,7 @@ async def list(
185183
limit: typing.Optional[int] = None,
186184
location_id: typing.Optional[str] = None,
187185
request_options: typing.Optional[RequestOptions] = None,
188-
) -> AsyncPager[BankAccount]:
186+
) -> AsyncPager[BankAccount, ListBankAccountsResponse]:
189187
"""
190188
Returns a list of [BankAccount](entity:BankAccount) objects linked to a Square account.
191189
@@ -212,7 +210,7 @@ async def list(
212210
213211
Returns
214212
-------
215-
AsyncPager[BankAccount]
213+
AsyncPager[BankAccount, ListBankAccountsResponse]
216214
Success
217215
"""
218216
_response = await self._client_wrapper.httpx_client.request(
@@ -246,9 +244,7 @@ async def _get_next():
246244
request_options=request_options,
247245
)
248246

249-
return AsyncPager(
250-
has_next=_has_next, items=_items, get_next=_get_next, response=BaseHttpResponse(response=_response)
251-
)
247+
return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
252248
_response_json = _response.json()
253249
except JSONDecodeError:
254250
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)

src/square/bookings/client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from ..types.create_booking_response import CreateBookingResponse
1717
from ..types.get_booking_response import GetBookingResponse
1818
from ..types.get_business_booking_profile_response import GetBusinessBookingProfileResponse
19+
from ..types.list_bookings_response import ListBookingsResponse
1920
from ..types.retrieve_location_booking_profile_response import RetrieveLocationBookingProfileResponse
2021
from ..types.search_availability_response import SearchAvailabilityResponse
2122
from ..types.update_booking_response import UpdateBookingResponse
@@ -64,7 +65,7 @@ def list(
6465
start_at_min: typing.Optional[str] = None,
6566
start_at_max: typing.Optional[str] = None,
6667
request_options: typing.Optional[RequestOptions] = None,
67-
) -> SyncPager[Booking]:
68+
) -> SyncPager[Booking, ListBookingsResponse]:
6869
"""
6970
Retrieve a collection of bookings.
7071
@@ -99,7 +100,7 @@ def list(
99100
100101
Returns
101102
-------
102-
SyncPager[Booking]
103+
SyncPager[Booking, ListBookingsResponse]
103104
Success
104105
105106
Examples
@@ -564,7 +565,7 @@ async def list(
564565
start_at_min: typing.Optional[str] = None,
565566
start_at_max: typing.Optional[str] = None,
566567
request_options: typing.Optional[RequestOptions] = None,
567-
) -> AsyncPager[Booking]:
568+
) -> AsyncPager[Booking, ListBookingsResponse]:
568569
"""
569570
Retrieve a collection of bookings.
570571
@@ -599,7 +600,7 @@ async def list(
599600
600601
Returns
601602
-------
602-
AsyncPager[Booking]
603+
AsyncPager[Booking, ListBookingsResponse]
603604
Success
604605
605606
Examples

src/square/bookings/custom_attribute_definitions/client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from ...types.create_booking_custom_attribute_definition_response import CreateBookingCustomAttributeDefinitionResponse
1010
from ...types.custom_attribute_definition import CustomAttributeDefinition
1111
from ...types.delete_booking_custom_attribute_definition_response import DeleteBookingCustomAttributeDefinitionResponse
12+
from ...types.list_booking_custom_attribute_definitions_response import ListBookingCustomAttributeDefinitionsResponse
1213
from ...types.retrieve_booking_custom_attribute_definition_response import (
1314
RetrieveBookingCustomAttributeDefinitionResponse,
1415
)
@@ -40,7 +41,7 @@ def list(
4041
limit: typing.Optional[int] = None,
4142
cursor: typing.Optional[str] = None,
4243
request_options: typing.Optional[RequestOptions] = None,
43-
) -> SyncPager[CustomAttributeDefinition]:
44+
) -> SyncPager[CustomAttributeDefinition, ListBookingCustomAttributeDefinitionsResponse]:
4445
"""
4546
Get all bookings custom attribute definitions.
4647
@@ -64,7 +65,7 @@ def list(
6465
6566
Returns
6667
-------
67-
SyncPager[CustomAttributeDefinition]
68+
SyncPager[CustomAttributeDefinition, ListBookingCustomAttributeDefinitionsResponse]
6869
Success
6970
7071
Examples
@@ -324,7 +325,7 @@ async def list(
324325
limit: typing.Optional[int] = None,
325326
cursor: typing.Optional[str] = None,
326327
request_options: typing.Optional[RequestOptions] = None,
327-
) -> AsyncPager[CustomAttributeDefinition]:
328+
) -> AsyncPager[CustomAttributeDefinition, ListBookingCustomAttributeDefinitionsResponse]:
328329
"""
329330
Get all bookings custom attribute definitions.
330331
@@ -348,7 +349,7 @@ async def list(
348349
349350
Returns
350351
-------
351-
AsyncPager[CustomAttributeDefinition]
352+
AsyncPager[CustomAttributeDefinition, ListBookingCustomAttributeDefinitionsResponse]
352353
Success
353354
354355
Examples

src/square/bookings/custom_attribute_definitions/raw_client.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
88
from ...core.http_response import AsyncHttpResponse, HttpResponse
99
from ...core.jsonable_encoder import jsonable_encoder
10-
from ...core.pagination import AsyncPager, BaseHttpResponse, SyncPager
10+
from ...core.pagination import AsyncPager, SyncPager
1111
from ...core.request_options import RequestOptions
1212
from ...core.serialization import convert_and_respect_annotation_metadata
1313
from ...core.unchecked_base_model import construct_type
@@ -35,7 +35,7 @@ def list(
3535
limit: typing.Optional[int] = None,
3636
cursor: typing.Optional[str] = None,
3737
request_options: typing.Optional[RequestOptions] = None,
38-
) -> SyncPager[CustomAttributeDefinition]:
38+
) -> SyncPager[CustomAttributeDefinition, ListBookingCustomAttributeDefinitionsResponse]:
3939
"""
4040
Get all bookings custom attribute definitions.
4141
@@ -59,7 +59,7 @@ def list(
5959
6060
Returns
6161
-------
62-
SyncPager[CustomAttributeDefinition]
62+
SyncPager[CustomAttributeDefinition, ListBookingCustomAttributeDefinitionsResponse]
6363
Success
6464
"""
6565
_response = self._client_wrapper.httpx_client.request(
@@ -88,9 +88,7 @@ def list(
8888
cursor=_parsed_next,
8989
request_options=request_options,
9090
)
91-
return SyncPager(
92-
has_next=_has_next, items=_items, get_next=_get_next, response=BaseHttpResponse(response=_response)
93-
)
91+
return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
9492
_response_json = _response.json()
9593
except JSONDecodeError:
9694
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
@@ -359,7 +357,7 @@ async def list(
359357
limit: typing.Optional[int] = None,
360358
cursor: typing.Optional[str] = None,
361359
request_options: typing.Optional[RequestOptions] = None,
362-
) -> AsyncPager[CustomAttributeDefinition]:
360+
) -> AsyncPager[CustomAttributeDefinition, ListBookingCustomAttributeDefinitionsResponse]:
363361
"""
364362
Get all bookings custom attribute definitions.
365363
@@ -383,7 +381,7 @@ async def list(
383381
384382
Returns
385383
-------
386-
AsyncPager[CustomAttributeDefinition]
384+
AsyncPager[CustomAttributeDefinition, ListBookingCustomAttributeDefinitionsResponse]
387385
Success
388386
"""
389387
_response = await self._client_wrapper.httpx_client.request(
@@ -415,9 +413,7 @@ async def _get_next():
415413
request_options=request_options,
416414
)
417415

418-
return AsyncPager(
419-
has_next=_has_next, items=_items, get_next=_get_next, response=BaseHttpResponse(response=_response)
420-
)
416+
return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
421417
_response_json = _response.json()
422418
except JSONDecodeError:
423419
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)

0 commit comments

Comments
 (0)