Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"use_typeddict_requests_for_file_upload": true,
"exclude_types_from_init_exports": true
},
"originGitCommit": "b05364cda2b85e35d8daa9ff2c24bbabbbd9652a",
"sdkVersion": "45.1.0.20260819"
"originGitCommit": "37b3f34f979590cc8d882c9ab2fe92748bfb0556",
"sdkVersion": "46.0.0.20260916"
}
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]

[tool.poetry]
name = "squareup"
version = "45.1.0.20260819"
version = "46.0.0.20260916"
description = ""
readme = "README.md"
authors = []
Expand Down
50 changes: 6 additions & 44 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -27424,29 +27424,10 @@ client.locations.transactions.get(
</dl>
</details>

<details><summary><code>client.locations.transactions.<a href="src/square/locations/transactions/client.py">capture</a>(...) -&gt; AsyncHttpResponse[CaptureTransactionResponse]</code></summary>
<details><summary><code>client.locations.transactions.<a href="src/square/locations/transactions/client.py">capture</a>(...) -&gt; AsyncHttpResponse[None]</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Captures a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
endpoint with a `delay_capture` value of `true`.


See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
for more information.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
Expand Down Expand Up @@ -27480,15 +27461,15 @@ client.locations.transactions.capture(
<dl>
<dd>

**location_id:** `str`
**location_id:** `str`

</dd>
</dl>

<dl>
<dd>

**transaction_id:** `str`
**transaction_id:** `str`

</dd>
</dl>
Expand All @@ -27508,29 +27489,10 @@ client.locations.transactions.capture(
</dl>
</details>

<details><summary><code>client.locations.transactions.<a href="src/square/locations/transactions/client.py">void</a>(...) -&gt; AsyncHttpResponse[VoidTransactionResponse]</code></summary>
<details><summary><code>client.locations.transactions.<a href="src/square/locations/transactions/client.py">void</a>(...) -&gt; AsyncHttpResponse[None]</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Cancels a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
endpoint with a `delay_capture` value of `true`.


See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
for more information.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
Expand Down Expand Up @@ -27564,15 +27526,15 @@ client.locations.transactions.void(
<dl>
<dd>

**location_id:** `str`
**location_id:** `str`

</dd>
</dl>

<dl>
<dd>

**transaction_id:** `str`
**transaction_id:** `str`

</dd>
</dl>
Expand Down
6 changes: 3 additions & 3 deletions src/square/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "squareup/45.1.0.20260819",
"User-Agent": "squareup/46.0.0.20260916",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
"X-Fern-SDK-Name": "squareup",
"X-Fern-SDK-Version": "45.1.0.20260819",
"X-Fern-SDK-Version": "46.0.0.20260916",
**(self.get_custom_headers() or {}),
}
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-08-19"
headers["Square-Version"] = self._version if self._version is not None else "2026-09-16"
return headers

def _get_token(self) -> typing.Optional[str]:
Expand Down
58 changes: 8 additions & 50 deletions src/square/locations/transactions/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ...core.request_options import RequestOptions
from ...types.capture_transaction_response import CaptureTransactionResponse
from ...types.get_transaction_response import GetTransactionResponse
from ...types.list_transactions_response import ListTransactionsResponse
from ...types.sort_order import SortOrder
from ...types.void_transaction_response import VoidTransactionResponse
from .raw_client import AsyncRawTransactionsClient, RawTransactionsClient


Expand Down Expand Up @@ -148,30 +146,20 @@ def get(

def capture(
self, location_id: str, transaction_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> CaptureTransactionResponse:
) -> None:
"""
Captures a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
endpoint with a `delay_capture` value of `true`.


See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
for more information.

Parameters
----------
location_id : str


transaction_id : str


request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Returns
-------
CaptureTransactionResponse
Success
None

Examples
--------
Expand All @@ -190,30 +178,20 @@ def capture(

def void(
self, location_id: str, transaction_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> VoidTransactionResponse:
) -> None:
"""
Cancels a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
endpoint with a `delay_capture` value of `true`.


See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
for more information.

Parameters
----------
location_id : str


transaction_id : str


request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Returns
-------
VoidTransactionResponse
Success
None

Examples
--------
Expand Down Expand Up @@ -383,30 +361,20 @@ async def main() -> None:

async def capture(
self, location_id: str, transaction_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> CaptureTransactionResponse:
) -> None:
"""
Captures a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
endpoint with a `delay_capture` value of `true`.


See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
for more information.

Parameters
----------
location_id : str


transaction_id : str


request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Returns
-------
CaptureTransactionResponse
Success
None

Examples
--------
Expand All @@ -433,30 +401,20 @@ async def main() -> None:

async def void(
self, location_id: str, transaction_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> VoidTransactionResponse:
) -> None:
"""
Cancels a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
endpoint with a `delay_capture` value of `true`.


See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
for more information.

Parameters
----------
location_id : str


transaction_id : str


request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Returns
-------
VoidTransactionResponse
Success
None

Examples
--------
Expand Down
Loading
Loading