Skip to content

Commit f197598

Browse files
Merge pull request #672 from codatio/generate/bank-feeds
bank-feeds: release v12.0.4 (in-house codegen)
2 parents 2fe979e + b4b784c commit f197598

12 files changed

Lines changed: 45 additions & 52 deletions

File tree

bank-feeds/RELEASES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,3 +939,13 @@ Based on:
939939
- [python v12.0.3] bank-feeds
940940
### Releases
941941
- [PyPI v12.0.3] https://pypi.org/project/codat-bankfeeds/12.0.3 - bank-feeds
942+
943+
## 2026-08-28 09:00:15
944+
### Changes
945+
Based on:
946+
- OpenAPI Doc 3.0.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Bank-Feeds.yaml
947+
- codat sdk-codegen db72283147925427108432b8413c2487af21f9e6 https://github.com/codat-spikes/sdk-codegen
948+
### Generated
949+
- [python v12.0.4] bank-feeds
950+
### Releases
951+
- [PyPI v12.0.4] https://pypi.org/project/codat-bankfeeds/12.0.4 - bank-feeds

bank-feeds/docs/models/errors/errormessage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
| `error` | *Optional[str]* | :heavy_minus_sign: | A brief description of the error. |
1212
| `service` | *Optional[str]* | :heavy_minus_sign: | Codat's service the returned the error. |
1313
| `status_code` | *Optional[int]* | :heavy_minus_sign: | The HTTP status code returned by the error. |
14-
| `validation` | [Optional[shared.ErrorValidation]](../../models/shared/errorvalidation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. |
14+
| `validation` | [OptionalNullable[shared.ErrorValidation]](../../models/shared/errorvalidation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. |

bank-feeds/docs/models/shared/banktransaction.md

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

bank-feeds/docs/models/shared/errormessage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
| `error` | *Optional[str]* | :heavy_minus_sign: | A brief description of the error. |
1212
| `service` | *Optional[str]* | :heavy_minus_sign: | Codat's service the returned the error. |
1313
| `status_code` | *Optional[int]* | :heavy_minus_sign: | The HTTP status code returned by the error. |
14-
| `validation` | [Optional[shared.ErrorValidation]](../../models/shared/errorvalidation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. |
14+
| `validation` | [OptionalNullable[shared.ErrorValidation]](../../models/shared/errorvalidation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. |

bank-feeds/docs/models/shared/routinginfo.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Routing information for the bank. This does not include account number.
55

66
## Fields
77

8-
| Field | Type | Required | Description |
9-
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
10-
| `bank_code` | *OptionalNullable[str]* | :heavy_minus_sign: | The numeric identifier of the routing number |
11-
| `type` | [Optional[shared.Type]](../../models/shared/type.md) | :heavy_minus_sign: | The type of routing number. |
8+
| Field | Type | Required | Description |
9+
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
10+
| `bank_code` | *OptionalNullable[str]* | :heavy_minus_sign: | The numeric identifier of the routing number |
11+
| `type` | [OptionalNullable[shared.Type]](../../models/shared/type.md) | :heavy_minus_sign: | The type of routing number. |

bank-feeds/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "codat-bankfeeds"
3-
version = "12.0.3"
3+
version = "12.0.4"
44
description = "Set up bank feeds from accounts in your application to supported accounting software."
55
authors = [{ name = "Codat", email = "support@codat.io" }]
66
readme = "README-PYPI.md"

bank-feeds/src/codat_bankfeeds/models/bank_transaction.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,29 @@
2626
from typing import Optional, Set
2727
from typing_extensions import Annotated, Self, NotRequired, TypedDict
2828

29+
from codat_bankfeeds.types import OptionalNullable, UNSET, UNSET_SENTINEL
2930
class BankTransaction(BaseModel):
3031

3132
@model_serializer(mode="wrap")
3233
def _serialize_drop_none(self, handler):
3334
serialized = handler(self)
34-
return {k: v for k, v in serialized.items() if v is not None}
35+
_nullable = {'counterparty', 'description', 'reconciled', 'reference', 'transactionType', 'transaction_type'}
36+
return {
37+
k: v for k, v in serialized.items()
38+
if v != UNSET_SENTINEL and (v is not None or k in _nullable)
39+
}
3540
"""
3641
BankTransaction
3742
""" # noqa: E501
3843
id: Optional[str] = Field(default=None, description="Identifier for the bank account transaction, unique for the company in the accounting software.")
3944
date_: Optional[str] = Field(default=None, description="In Codat's data model, dates and times are represented using the <a class=\"external\" href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example: ``` 2023-08-22T10:21:00 2023-08-22 ``` When pushing bank transaction data to Codat, the date is treated as a local date. This means: - The date/time is used exactly as provided, without any timezone conversion. - If a timezone offset is included (e.g., `2023-08-22T10:21:00-05:00`), the offset will be ignored and only the local date/time portion will be used. - We recommend providing dates without a timezone suffix for clarity (e.g., `2023-08-22T10:21:00` rather than `2023-08-22T10:21:00Z`).", alias="date")
40-
description: Optional[str] = Field(default=None, description="Description of the bank transaction.")
41-
counterparty: Optional[str] = Field(default=None, description="The giving or receiving party such as a person or organization.")
42-
reference: Optional[str] = Field(default=None, description="An optional reference to the bank transaction.")
43-
reconciled: Optional[bool] = Field(default=None, description="`True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software.")
45+
description: OptionalNullable[str] = Field(default=UNSET, description="Description of the bank transaction.")
46+
counterparty: OptionalNullable[str] = Field(default=UNSET, description="The giving or receiving party such as a person or organization.")
47+
reference: OptionalNullable[str] = Field(default=UNSET, description="An optional reference to the bank transaction.")
48+
reconciled: OptionalNullable[bool] = Field(default=UNSET, description="`True` if the bank transaction has been [reconciled](https://www.xero.com/uk/guides/what-is-bank-reconciliation/) in the accounting software.")
4449
amount: Annotated[Optional[Decimal], BeforeValidator(validate_decimal), PlainSerializer(serialize_decimal(False))] = Field(default=None, description="The amount transacted in the bank transaction.")
4550
balance: Annotated[Optional[Decimal], BeforeValidator(validate_decimal), PlainSerializer(serialize_decimal(False))] = Field(default=None, description="The remaining balance in the account with ID `accountId`. This field is optional for QuickBooks Online but is required for Xero, Sage, NetSuite, Exact, and FreeAgent.")
46-
transaction_type: Optional[BankTransactionType] = Field(default=None, description="Type of transaction for the bank statement line.", alias="transactionType")
51+
transaction_type: OptionalNullable[BankTransactionType] = Field(default=UNSET, description="Type of transaction for the bank statement line.", alias="transactionType")
4752
__properties: ClassVar[List[str]] = ["id", "date", "description", "counterparty", "reference", "reconciled", "amount", "balance", "transactionType"]
4853

4954
@field_validator('transaction_type')

bank-feeds/src/codat_bankfeeds/models/create_connection_request.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import re # noqa: F401
1919
import json
2020

21-
from pydantic import BaseModel, ConfigDict, Field, field_validator, model_serializer
21+
from pydantic import BaseModel, ConfigDict, Field, model_serializer
2222
from typing import Any, ClassVar, Dict, List, Optional
2323
from typing_extensions import Annotated, NotRequired, TypedDict
2424
from typing import Optional, Set
@@ -36,16 +36,6 @@ def _serialize_drop_none(self, handler):
3636
platform_key: Optional[str] = Field(default=None, description="A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys.", alias="platformKey")
3737
__properties: ClassVar[List[str]] = ["platformKey"]
3838

39-
@field_validator('platform_key')
40-
def platform_key_validate_regular_expression(cls, value):
41-
"""Validates the regular expression"""
42-
if value is None:
43-
return value
44-
45-
if not re.match(r"[a-z]{4}", value):
46-
raise ValueError(r"must validate the regular expression /[a-z]{4}/")
47-
return value
48-
4939
model_config = ConfigDict(
5040
populate_by_name=True,
5141
validate_assignment=True,

bank-feeds/src/codat_bankfeeds/models/error_message.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,25 @@
2424
from typing import Optional, Set
2525
from typing_extensions import Self, NotRequired, TypedDict
2626

27+
from codat_bankfeeds.types import OptionalNullable, UNSET, UNSET_SENTINEL
2728
class ErrorMessage(BaseModel):
2829

2930
@model_serializer(mode="wrap")
3031
def _serialize_drop_none(self, handler):
3132
serialized = handler(self)
32-
return {k: v for k, v in serialized.items() if v is not None}
33+
_nullable = {'validation'}
34+
return {
35+
k: v for k, v in serialized.items()
36+
if v != UNSET_SENTINEL and (v is not None or k in _nullable)
37+
}
3338
"""
3439
ErrorMessage
3540
""" # noqa: E501
3641
status_code: Optional[int] = Field(default=None, description="The HTTP status code returned by the error.", alias="statusCode")
3742
service: Optional[str] = Field(default=None, description="Codat's service the returned the error.")
3843
error: Optional[str] = Field(default=None, description="A brief description of the error.")
3944
correlation_id: Optional[str] = Field(default=None, description="Unique identifier used to propagate to all downstream services and determine the source of the error.", alias="correlationId")
40-
validation: Optional[ErrorValidation] = None
45+
validation: OptionalNullable[ErrorValidation] = UNSET
4146
can_be_retried: Optional[str] = Field(default=None, description="`True` if the error occurred transiently and can be retried.", alias="canBeRetried")
4247
detailed_error_code: Optional[int] = Field(default=None, description="Machine readable error code used to automate processes based on the code returned.", alias="detailedErrorCode")
4348
__properties: ClassVar[List[str]] = ["statusCode", "service", "error", "correlationId", "validation", "canBeRetried", "detailedErrorCode"]

bank-feeds/src/codat_bankfeeds/models/shared/companyrequestbody.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import re # noqa: F401
1919
import json
2020

21-
from pydantic import BaseModel, ConfigDict, Field, field_validator, model_serializer
21+
from pydantic import BaseModel, ConfigDict, Field, model_serializer
2222
from typing import Any, ClassVar, Dict, List, Optional
2323
from typing_extensions import Annotated, NotRequired, TypedDict
2424
from typing import Optional, Set
@@ -38,13 +38,6 @@ def _serialize_drop_none(self, handler):
3838
tags: Optional[Dict[str, str]] = Field(default=None, description="A collection of user-defined key-value pairs that store custom metadata against the company.")
3939
__properties: ClassVar[List[str]] = ["name", "description", "tags"]
4040

41-
@field_validator('name')
42-
def name_validate_regular_expression(cls, value):
43-
"""Validates the regular expression"""
44-
if not re.match(r"^[A-Za-z0-9\s\-\',&@.,?!\s]+$", value):
45-
raise ValueError(r"must validate the regular expression /^[A-Za-z0-9\s\-',&@.,?!\s]+$/")
46-
return value
47-
4841
model_config = ConfigDict(
4942
populate_by_name=True,
5043
validate_assignment=True,

0 commit comments

Comments
 (0)