Skip to content

Commit f10571d

Browse files
feat(api): api update
1 parent e70cf41 commit f10571d

4 files changed

Lines changed: 71 additions & 11 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 236
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6d31504be6985a7ded14abd0da36f4272e585f43332b4b844a6950c98ddcd525.yml
3-
openapi_spec_hash: f1a49121780ec8b6678b864ac9b1deca
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e2a6ff4685a5e09babcce1fb8bac1f373d707d5b5aa82aae375d923de890e56e.yml
3+
openapi_spec_hash: 244249a4dfb6c746c161a704764d7630
44
config_hash: 0997ade8b52ec04e82d5b0c3b61bb51e

src/increase/types/entity.py

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"CorporationBeneficialOwnerIndividual",
1818
"CorporationBeneficialOwnerIndividualAddress",
1919
"CorporationBeneficialOwnerIndividualIdentification",
20+
"CorporationLegalIdentifier",
2021
"GovernmentAuthority",
2122
"GovernmentAuthorityAddress",
2223
"GovernmentAuthorityAuthorizedPerson",
@@ -172,6 +173,22 @@ def __getattr__(self, attr: str) -> object: ...
172173
__pydantic_extra__: Dict[str, object]
173174

174175

176+
class CorporationLegalIdentifier(BaseModel):
177+
"""The legal identifier of the corporation."""
178+
179+
category: Literal["us_employer_identification_number", "other"]
180+
"""The category of the legal identifier.
181+
182+
- `us_employer_identification_number` - The Employer Identification Number (EIN)
183+
for the company. The EIN is a 9-digit number assigned by the IRS.
184+
- `other` - A legal identifier issued by a foreign government, like a tax
185+
identification number or registration number.
186+
"""
187+
188+
value: str
189+
"""The identifier of the legal identifier."""
190+
191+
175192
class Corporation(BaseModel):
176193
"""Details of the corporation entity.
177194
@@ -202,15 +219,27 @@ class Corporation(BaseModel):
202219
for the corporation.
203220
"""
204221

222+
legal_identifier: Optional[CorporationLegalIdentifier] = None
223+
"""The legal identifier of the corporation."""
224+
205225
name: str
206226
"""The legal name of the corporation."""
207227

208-
tax_identifier: Optional[str] = None
209-
"""The Employer Identification Number (EIN) for the corporation."""
210-
211228
website: Optional[str] = None
212229
"""The website of the corporation."""
213230

231+
if TYPE_CHECKING:
232+
# Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
233+
# value to this field, so for compatibility we avoid doing it at runtime.
234+
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
235+
236+
# Stub to indicate that arbitrary properties are accepted.
237+
# To access properties that are not valid identifiers you can use `getattr`, e.g.
238+
# `getattr(obj, '$type')`
239+
def __getattr__(self, attr: str) -> object: ...
240+
else:
241+
__pydantic_extra__: Dict[str, object]
242+
214243

215244
class GovernmentAuthorityAddress(BaseModel):
216245
"""The government authority's address."""

src/increase/types/entity_create_params.py

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"CorporationBeneficialOwnerIndividualIdentificationDriversLicense",
2020
"CorporationBeneficialOwnerIndividualIdentificationOther",
2121
"CorporationBeneficialOwnerIndividualIdentificationPassport",
22+
"CorporationLegalIdentifier",
2223
"GovernmentAuthority",
2324
"GovernmentAuthorityAddress",
2425
"GovernmentAuthorityAuthorizedPerson",
@@ -334,7 +335,28 @@ class CorporationBeneficialOwner(TypedDict, total=False, extra_items=object): #
334335
"""This person's role or title within the entity."""
335336

336337

337-
class Corporation(TypedDict, total=False):
338+
class CorporationLegalIdentifier(TypedDict, total=False):
339+
"""The legal identifier of the corporation.
340+
341+
This is usually the Employer Identification Number (EIN).
342+
"""
343+
344+
value: Required[str]
345+
"""The legal identifier."""
346+
347+
category: Literal["us_employer_identification_number", "other"]
348+
"""The category of the legal identifier.
349+
350+
If not provided, the default is `us_employer_identification_number`.
351+
352+
- `us_employer_identification_number` - The Employer Identification Number (EIN)
353+
for the company. The EIN is a 9-digit number assigned by the IRS.
354+
- `other` - A legal identifier issued by a foreign government, like a tax
355+
identification number or registration number.
356+
"""
357+
358+
359+
class Corporation(TypedDict, total=False, extra_items=object): # type: ignore[call-arg]
338360
"""Details of the corporation entity to create.
339361
340362
Required if `structure` is equal to `corporation`.
@@ -353,12 +375,15 @@ class Corporation(TypedDict, total=False):
353375
between 1 and 5 people to this list.
354376
"""
355377

378+
legal_identifier: Required[CorporationLegalIdentifier]
379+
"""The legal identifier of the corporation.
380+
381+
This is usually the Employer Identification Number (EIN).
382+
"""
383+
356384
name: Required[str]
357385
"""The legal name of the corporation."""
358386

359-
tax_identifier: Required[str]
360-
"""The Employer Identification Number (EIN) for the corporation."""
361-
362387
beneficial_ownership_exemption_reason: Literal[
363388
"regulated_financial_institution", "publicly_traded_company", "public_entity", "other"
364389
]

tests/api_resources/test_entities.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,11 @@ def test_method_create_with_all_params(self, client: Increase) -> None:
7979
"company_title": "CEO",
8080
}
8181
],
82+
"legal_identifier": {
83+
"value": "602214076",
84+
"category": "us_employer_identification_number",
85+
},
8286
"name": "National Phonograph Company",
83-
"tax_identifier": "602214076",
8487
"beneficial_ownership_exemption_reason": "regulated_financial_institution",
8588
"email": "dev@stainless.com",
8689
"incorporation_state": "NY",
@@ -585,8 +588,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease)
585588
"company_title": "CEO",
586589
}
587590
],
591+
"legal_identifier": {
592+
"value": "602214076",
593+
"category": "us_employer_identification_number",
594+
},
588595
"name": "National Phonograph Company",
589-
"tax_identifier": "602214076",
590596
"beneficial_ownership_exemption_reason": "regulated_financial_institution",
591597
"email": "dev@stainless.com",
592598
"incorporation_state": "NY",

0 commit comments

Comments
 (0)