Skip to content

Commit ec47cb1

Browse files
authored
Merge pull request #20 from Gusto/speakeasy-sdk-regen-1743553451
chore: 🐝 Update SDK - Generate 0.2.3
2 parents 6b34cd1 + 4a61d84 commit ec47cb1

24 files changed

+252
-74
lines changed

.speakeasy/workflow.lock

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@ speakeasyVersion: 1.525.2
22
sources:
33
Gusto-App-Int-OAS:
44
sourceNamespace: gusto-app-int-oas
5-
sourceRevisionDigest: sha256:146394ace1f2364d29972b713f4c983469873146b72b8e440e4c85a116118413
6-
sourceBlobDigest: sha256:928c472ebcc8603189dec96605686c09586dbc5e8f76169a7ca59a1c3cf777d5
5+
sourceRevisionDigest: sha256:689628279a41eeb057e1c7afdca8152784bd5f9c2b58efa4bc1665fc4a209577
6+
sourceBlobDigest: sha256:81ba6d3af1a240459cf53438bb3b5b518d869062b7dd32abfa212c70952b5886
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1742257375
9+
- speakeasy-sdk-regen-1743553451
1010
- "2024-04-01"
1111
Gusto-OAS:
1212
sourceNamespace: gusto-oas
13-
sourceRevisionDigest: sha256:058c4e660dd4b27a1cd8a068429a5239a71a1b5b365fde8544362ffcf28c2939
14-
sourceBlobDigest: sha256:4c5a52b64a2132d394b1fae941027466dcf804b8de2d8e7995eeb16a6f9a2392
13+
sourceRevisionDigest: sha256:20cf22a6e926e505aa744b6c012c764f2add3299c5a5fd4f623162b518b3c9b6
14+
sourceBlobDigest: sha256:a5d5ddef31610735f102cde75d6c827223f5382ebbd680161128fd7e2b242c36
1515
tags:
1616
- latest
17-
- speakeasy-sdk-regen-1742257375
17+
- speakeasy-sdk-regen-1743553451
1818
- "2024-04-01"
1919
targets:
2020
gusto:
2121
source: Gusto-OAS
2222
sourceNamespace: gusto-oas
23-
sourceRevisionDigest: sha256:058c4e660dd4b27a1cd8a068429a5239a71a1b5b365fde8544362ffcf28c2939
24-
sourceBlobDigest: sha256:4c5a52b64a2132d394b1fae941027466dcf804b8de2d8e7995eeb16a6f9a2392
23+
sourceRevisionDigest: sha256:20cf22a6e926e505aa744b6c012c764f2add3299c5a5fd4f623162b518b3c9b6
24+
sourceBlobDigest: sha256:a5d5ddef31610735f102cde75d6c827223f5382ebbd680161128fd7e2b242c36
2525
codeSamplesNamespace: gusto-oas-python-code-samples
26-
codeSamplesRevisionDigest: sha256:a02d9747808931b1ac9832630609b77df58001e95aae6f66f0d0b535b2e5a243
26+
codeSamplesRevisionDigest: sha256:0a063a27ea60e9873d6294ed5ec3c241d735406c892fbe9df2a4a8b0dc93fc49
2727
gusto-app-int:
2828
source: Gusto-App-Int-OAS
2929
sourceNamespace: gusto-app-int-oas
30-
sourceRevisionDigest: sha256:146394ace1f2364d29972b713f4c983469873146b72b8e440e4c85a116118413
31-
sourceBlobDigest: sha256:928c472ebcc8603189dec96605686c09586dbc5e8f76169a7ca59a1c3cf777d5
30+
sourceRevisionDigest: sha256:689628279a41eeb057e1c7afdca8152784bd5f9c2b58efa4bc1665fc4a209577
31+
sourceBlobDigest: sha256:81ba6d3af1a240459cf53438bb3b5b518d869062b7dd32abfa212c70952b5886
3232
codeSamplesNamespace: gusto-app-int-oas-python-code-samples
33-
codeSamplesRevisionDigest: sha256:f13e0c32f6a3382d3dd1046c8ba164778440942d263cb02d201f05578c89462c
33+
codeSamplesRevisionDigest: sha256:1f6740fe62454346fb6432f61c3eb830a5a5f7a02686cd212b41b925be25c440
3434
workflow:
3535
workflowVersion: 1.0.0
3636
speakeasyVersion: latest

RELEASES.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,14 @@ Based on:
5858
### Generated
5959
- [python v0.2.2] gusto_app_int
6060
### Releases
61-
- [PyPI v0.2.2] https://pypi.org/project/gusto_app_integration/0.2.2 - gusto_app_int
61+
- [PyPI v0.2.2] https://pypi.org/project/gusto_app_integration/0.2.2 - gusto_app_int
62+
63+
## 2025-04-03 00:23:18
64+
### Changes
65+
Based on:
66+
- OpenAPI Doc
67+
- Speakeasy CLI 1.525.2 (2.562.3) https://github.com/speakeasy-api/speakeasy
68+
### Generated
69+
- [python v0.2.3] gusto_app_int
70+
### Releases
71+
- [PyPI v0.2.3] https://pypi.org/project/gusto_app_integration/0.2.3 - gusto_app_int

gusto_app_int/.speakeasy/gen.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 307f4640-0d05-4c9e-b275-cb7fc716aa23
33
management:
4-
docChecksum: 78dbfa21931768c6fe27a77e45ba47a1
4+
docChecksum: 4c5d2f1216a28f6762e454df8bdcc054
55
docVersion: "2024-04-01"
66
speakeasyVersion: 1.525.2
77
generationVersion: 2.562.3
8-
releaseVersion: 0.2.2
9-
configChecksum: c99a9a504eb21dcd8712f151b9512847
8+
releaseVersion: 0.2.3
9+
configChecksum: 1526a81640ebb32b6b92729d14d28fc0
1010
repoURL: https://github.com/Gusto/gusto-python-client.git
1111
repoSubDirectory: gusto_app_int
1212
installationURL: https://github.com/Gusto/gusto-python-client.git#subdirectory=gusto_app_int

gusto_app_int/.speakeasy/gen.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ generation:
1515
oAuth2ClientCredentialsEnabled: true
1616
oAuth2PasswordEnabled: true
1717
python:
18-
version: 0.2.2
18+
version: 0.2.3
1919
additionalDependencies:
2020
dev: {}
2121
main: {}

gusto_app_int/docs/models/metadatawithmultipleentities.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ multiple entities
77

88
| Field | Type | Required | Description |
99
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
10-
| `entities` | List[[models.MetadataWithOneEntity](../models/metadatawithoneentity.md)] | :heavy_minus_sign: | N/A |
10+
| `entities` | List[[models.MetadataWithOneEntity](../models/metadatawithoneentity.md)] | :heavy_check_mark: | N/A |

gusto_app_int/docs/models/metadatawithoneentity.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ single entity
99
| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- |
1010
| `entity_type` | *Optional[str]* | :heavy_minus_sign: | Name of the entity that the error corresponds to. |
1111
| `entity_uuid` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the entity. |
12-
| `valid_from` | *Optional[str]* | :heavy_minus_sign: | N/A |
13-
| `valid_up_to` | *Optional[str]* | :heavy_minus_sign: | N/A |
14-
| `key` | *Optional[str]* | :heavy_minus_sign: | N/A |
15-
| `state` | *Optional[str]* | :heavy_minus_sign: | N/A |
12+
| `valid_from` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
13+
| `valid_up_to` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
14+
| `key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
15+
| `state` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
1616
| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |

gusto_app_int/docs/models/primarysignatory.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The primary signatory of the company.
99
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
1010
| `uuid` | *Optional[str]* | :heavy_minus_sign: | The UUID of the company's primary signatory. |
1111
| `first_name` | *Optional[str]* | :heavy_minus_sign: | The company's primary signatory's first name. |
12-
| `middle_initial` | *Optional[str]* | :heavy_minus_sign: | The company's primary signatory's middle initial. |
12+
| `middle_initial` | *OptionalNullable[str]* | :heavy_minus_sign: | The company's primary signatory's middle initial. |
1313
| `last_name` | *Optional[str]* | :heavy_minus_sign: | The company's primary signatory's last name. |
1414
| `phone` | *Optional[str]* | :heavy_minus_sign: | The company's primary signatory's phone number. |
1515
| `email` | *Optional[str]* | :heavy_minus_sign: | The company's primary signatory's email address. |

gusto_app_int/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "gusto_app_integration"
3-
version = "0.2.2"
3+
version = "0.2.3"
44
description = "Python Client SDK Generated by Speakeasy."
55
authors = [{ name = "Speakeasy" },]
66
readme = "README-PYPI.md"

gusto_app_int/src/gusto_app_integration/_version.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
import importlib.metadata
44

55
__title__: str = "gusto_app_integration"
6-
__version__: str = "0.2.2"
6+
__version__: str = "0.2.3"
77
__openapi_doc_version__: str = "2024-04-01"
88
__gen_version__: str = "2.562.3"
99
__user_agent__: str = (
10-
"speakeasy-sdk/python 0.2.2 2.562.3 2024-04-01 gusto_app_integration"
10+
"speakeasy-sdk/python 0.2.3 2.562.3 2024-04-01 gusto_app_integration"
1111
)
1212

1313
try:

gusto_app_int/src/gusto_app_integration/models/company.py

+40-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class PrimarySignatoryTypedDict(TypedDict):
194194
r"""The UUID of the company's primary signatory."""
195195
first_name: NotRequired[str]
196196
r"""The company's primary signatory's first name."""
197-
middle_initial: NotRequired[str]
197+
middle_initial: NotRequired[Nullable[str]]
198198
r"""The company's primary signatory's middle initial."""
199199
last_name: NotRequired[str]
200200
r"""The company's primary signatory's last name."""
@@ -215,7 +215,7 @@ class PrimarySignatory(BaseModel):
215215
first_name: Optional[str] = None
216216
r"""The company's primary signatory's first name."""
217217

218-
middle_initial: Optional[str] = None
218+
middle_initial: OptionalNullable[str] = UNSET
219219
r"""The company's primary signatory's middle initial."""
220220

221221
last_name: Optional[str] = None
@@ -230,6 +230,44 @@ class PrimarySignatory(BaseModel):
230230
home_address: Optional[HomeAddress] = None
231231
r"""The company's primary signatory's home address."""
232232

233+
@model_serializer(mode="wrap")
234+
def serialize_model(self, handler):
235+
optional_fields = [
236+
"uuid",
237+
"first_name",
238+
"middle_initial",
239+
"last_name",
240+
"phone",
241+
"email",
242+
"home_address",
243+
]
244+
nullable_fields = ["middle_initial"]
245+
null_default_fields = []
246+
247+
serialized = handler(self)
248+
249+
m = {}
250+
251+
for n, f in self.model_fields.items():
252+
k = f.alias or n
253+
val = serialized.get(k)
254+
serialized.pop(k, None)
255+
256+
optional_nullable = k in optional_fields and k in nullable_fields
257+
is_set = (
258+
self.__pydantic_fields_set__.intersection({n})
259+
or k in null_default_fields
260+
) # pylint: disable=no-member
261+
262+
if val is not None and val != UNSET_SENTINEL:
263+
m[k] = val
264+
elif val != UNSET_SENTINEL and (
265+
not k in optional_fields or (optional_nullable and is_set)
266+
):
267+
m[k] = val
268+
269+
return m
270+
233271

234272
class PrimaryPayrollAdminTypedDict(TypedDict):
235273
r"""The primary payroll admin of the company."""

gusto_app_int/src/gusto_app_integration/models/metadata_with_multiple_entities.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
MetadataWithOneEntityTypedDict,
77
)
88
from gusto_app_integration.types import BaseModel
9-
from typing import List, Optional
10-
from typing_extensions import NotRequired, TypedDict
9+
from typing import List
10+
from typing_extensions import TypedDict
1111

1212

1313
class MetadataWithMultipleEntitiesTypedDict(TypedDict):
1414
r"""multiple entities"""
1515

16-
entities: NotRequired[List[MetadataWithOneEntityTypedDict]]
16+
entities: List[MetadataWithOneEntityTypedDict]
1717

1818

1919
class MetadataWithMultipleEntities(BaseModel):
2020
r"""multiple entities"""
2121

22-
entities: Optional[List[MetadataWithOneEntity]] = None
22+
entities: List[MetadataWithOneEntity]

gusto_app_int/src/gusto_app_integration/models/metadata_with_one_entity.py

+56-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
22

33
from __future__ import annotations
4-
from gusto_app_integration.types import BaseModel
4+
from gusto_app_integration.types import (
5+
BaseModel,
6+
Nullable,
7+
OptionalNullable,
8+
UNSET,
9+
UNSET_SENTINEL,
10+
)
511
import pydantic
6-
from pydantic import ConfigDict
12+
from pydantic import ConfigDict, model_serializer
713
from typing import Any, Dict, Optional
814
from typing_extensions import NotRequired, TypedDict
915

@@ -15,10 +21,10 @@ class MetadataWithOneEntityTypedDict(TypedDict):
1521
r"""Name of the entity that the error corresponds to."""
1622
entity_uuid: NotRequired[str]
1723
r"""Unique identifier for the entity."""
18-
valid_from: NotRequired[str]
19-
valid_up_to: NotRequired[str]
20-
key: NotRequired[str]
21-
state: NotRequired[str]
24+
valid_from: NotRequired[Nullable[str]]
25+
valid_up_to: NotRequired[Nullable[str]]
26+
key: NotRequired[Nullable[str]]
27+
state: NotRequired[Nullable[str]]
2228

2329

2430
class MetadataWithOneEntity(BaseModel):
@@ -35,13 +41,13 @@ class MetadataWithOneEntity(BaseModel):
3541
entity_uuid: Optional[str] = None
3642
r"""Unique identifier for the entity."""
3743

38-
valid_from: Optional[str] = None
44+
valid_from: OptionalNullable[str] = UNSET
3945

40-
valid_up_to: Optional[str] = None
46+
valid_up_to: OptionalNullable[str] = UNSET
4147

42-
key: Optional[str] = None
48+
key: OptionalNullable[str] = UNSET
4349

44-
state: Optional[str] = None
50+
state: OptionalNullable[str] = UNSET
4551

4652
@property
4753
def additional_properties(self):
@@ -50,3 +56,43 @@ def additional_properties(self):
5056
@additional_properties.setter
5157
def additional_properties(self, value):
5258
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
59+
60+
@model_serializer(mode="wrap")
61+
def serialize_model(self, handler):
62+
optional_fields = [
63+
"entity_type",
64+
"entity_uuid",
65+
"valid_from",
66+
"valid_up_to",
67+
"key",
68+
"state",
69+
]
70+
nullable_fields = ["valid_from", "valid_up_to", "key", "state"]
71+
null_default_fields = []
72+
73+
serialized = handler(self)
74+
75+
m = {}
76+
77+
for n, f in self.model_fields.items():
78+
k = f.alias or n
79+
val = serialized.get(k)
80+
serialized.pop(k, None)
81+
82+
optional_nullable = k in optional_fields and k in nullable_fields
83+
is_set = (
84+
self.__pydantic_fields_set__.intersection({n})
85+
or k in null_default_fields
86+
) # pylint: disable=no-member
87+
88+
if val is not None and val != UNSET_SENTINEL:
89+
m[k] = val
90+
elif val != UNSET_SENTINEL and (
91+
not k in optional_fields or (optional_nullable and is_set)
92+
):
93+
m[k] = val
94+
95+
for k, v in serialized.items():
96+
m[k] = v
97+
98+
return m

gusto_embedded/.speakeasy/gen.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: f70034eb-4870-4b8d-aeb4-4c71b6c1ec45
33
management:
4-
docChecksum: 29004e8f8da002dc3badd2a54c0d18f3
4+
docChecksum: 9b5f6791f932c112cce1dbd387fca945
55
docVersion: "2024-04-01"
66
speakeasyVersion: 1.525.2
77
generationVersion: 2.562.3
8-
releaseVersion: 0.2.2
9-
configChecksum: 09952e3da8ac446bf4af2a35bc91a639
8+
releaseVersion: 0.2.3
9+
configChecksum: cc6c24b6f3b84eaa0f761e5fb4c1e429
1010
repoURL: https://github.com/Gusto/gusto-python-client.git
1111
repoSubDirectory: gusto_embedded
1212
installationURL: https://github.com/Gusto/gusto-python-client.git#subdirectory=gusto_embedded

gusto_embedded/.speakeasy/gen.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ generation:
1818
oAuth2ClientCredentialsEnabled: true
1919
oAuth2PasswordEnabled: true
2020
python:
21-
version: 0.2.2
21+
version: 0.2.3
2222
additionalDependencies:
2323
dev: {}
2424
main: {}

gusto_embedded/docs/models/metadatawithmultipleentities.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ multiple entities
77

88
| Field | Type | Required | Description |
99
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
10-
| `entities` | List[[models.MetadataWithOneEntity](../models/metadatawithoneentity.md)] | :heavy_minus_sign: | N/A |
10+
| `entities` | List[[models.MetadataWithOneEntity](../models/metadatawithoneentity.md)] | :heavy_check_mark: | N/A |

0 commit comments

Comments
 (0)