Skip to content

Commit 06c402e

Browse files
feat(api): api update
1 parent bdd50c9 commit 06c402e

File tree

7 files changed

+43
-35
lines changed

7 files changed

+43
-35
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 232
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-994727afca8b769c05b3531b0e560cfc71b7d2c45a49b54e09bbf73d0dbcaa1f.yml
3-
openapi_spec_hash: bb1c55d7e08fb038a7383976bba226d1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-46a90f99726aa861d06ec56fb73592b4dcb4499d5a765d1a10dfc9619446306f.yml
3+
openapi_spec_hash: 8406b96c39c72de064a810c393c00554
44
config_hash: 27e44ed36b9c5617b580ead7231a594a

src/IntrafiExclusions/IntrafiExclusion.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* @phpstan-type IntrafiExclusionShape = array{
1717
* id: string,
18-
* bankName: string,
18+
* bankName: string|null,
1919
* createdAt: \DateTimeInterface,
2020
* entityID: string,
2121
* excludedAt: \DateTimeInterface|null,
@@ -41,7 +41,7 @@ final class IntrafiExclusion implements BaseModel
4141
* The name of the excluded institution.
4242
*/
4343
#[Required('bank_name')]
44-
public string $bankName;
44+
public ?string $bankName;
4545

4646
/**
4747
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the exclusion was created.
@@ -145,7 +145,7 @@ public function __construct()
145145
*/
146146
public static function with(
147147
string $id,
148-
string $bankName,
148+
?string $bankName,
149149
\DateTimeInterface $createdAt,
150150
string $entityID,
151151
?\DateTimeInterface $excludedAt,
@@ -185,7 +185,7 @@ public function withID(string $id): self
185185
/**
186186
* The name of the excluded institution.
187187
*/
188-
public function withBankName(string $bankName): self
188+
public function withBankName(?string $bankName): self
189189
{
190190
$self = clone $this;
191191
$self['bankName'] = $bankName;

src/IntrafiExclusions/IntrafiExclusionCreateParams.php

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @see Increase\Services\IntrafiExclusionsService::create()
1616
*
1717
* @phpstan-type IntrafiExclusionCreateParamsShape = array{
18-
* bankName: string, entityID: string
18+
* entityID: string, fdicCertificateNumber: string
1919
* }
2020
*/
2121
final class IntrafiExclusionCreateParams implements BaseModel
@@ -24,30 +24,32 @@ final class IntrafiExclusionCreateParams implements BaseModel
2424
use SdkModel;
2525
use SdkParams;
2626

27-
/**
28-
* The name of the financial institution to be excluded.
29-
*/
30-
#[Required('bank_name')]
31-
public string $bankName;
32-
3327
/**
3428
* The identifier of the Entity whose deposits will be excluded.
3529
*/
3630
#[Required('entity_id')]
3731
public string $entityID;
3832

33+
/**
34+
* The FDIC certificate number of the financial institution to be excluded. An FDIC certificate number uniquely identifies a financial institution, and is different than a routing number. To find one, we recommend searching by Bank Name using the [FDIC's bankfind tool](https://banks.data.fdic.gov/bankfind-suite/bankfind).
35+
*/
36+
#[Required('fdic_certificate_number')]
37+
public string $fdicCertificateNumber;
38+
3939
/**
4040
* `new IntrafiExclusionCreateParams()` is missing required properties by the API.
4141
*
4242
* To enforce required parameters use
4343
* ```
44-
* IntrafiExclusionCreateParams::with(bankName: ..., entityID: ...)
44+
* IntrafiExclusionCreateParams::with(entityID: ..., fdicCertificateNumber: ...)
4545
* ```
4646
*
4747
* Otherwise ensure the following setters are called
4848
*
4949
* ```
50-
* (new IntrafiExclusionCreateParams)->withBankName(...)->withEntityID(...)
50+
* (new IntrafiExclusionCreateParams)
51+
* ->withEntityID(...)
52+
* ->withFdicCertificateNumber(...)
5153
* ```
5254
*/
5355
public function __construct()
@@ -60,34 +62,37 @@ public function __construct()
6062
*
6163
* You must use named parameters to construct any parameters with a default value.
6264
*/
63-
public static function with(string $bankName, string $entityID): self
64-
{
65+
public static function with(
66+
string $entityID,
67+
string $fdicCertificateNumber
68+
): self {
6569
$self = new self;
6670

67-
$self['bankName'] = $bankName;
6871
$self['entityID'] = $entityID;
72+
$self['fdicCertificateNumber'] = $fdicCertificateNumber;
6973

7074
return $self;
7175
}
7276

7377
/**
74-
* The name of the financial institution to be excluded.
78+
* The identifier of the Entity whose deposits will be excluded.
7579
*/
76-
public function withBankName(string $bankName): self
80+
public function withEntityID(string $entityID): self
7781
{
7882
$self = clone $this;
79-
$self['bankName'] = $bankName;
83+
$self['entityID'] = $entityID;
8084

8185
return $self;
8286
}
8387

8488
/**
85-
* The identifier of the Entity whose deposits will be excluded.
89+
* The FDIC certificate number of the financial institution to be excluded. An FDIC certificate number uniquely identifies a financial institution, and is different than a routing number. To find one, we recommend searching by Bank Name using the [FDIC's bankfind tool](https://banks.data.fdic.gov/bankfind-suite/bankfind).
8690
*/
87-
public function withEntityID(string $entityID): self
88-
{
91+
public function withFdicCertificateNumber(
92+
string $fdicCertificateNumber
93+
): self {
8994
$self = clone $this;
90-
$self['entityID'] = $entityID;
95+
$self['fdicCertificateNumber'] = $fdicCertificateNumber;
9196

9297
return $self;
9398
}

src/ServiceContracts/IntrafiExclusionsContract.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ interface IntrafiExclusionsContract
1717
/**
1818
* @api
1919
*
20-
* @param string $bankName the name of the financial institution to be excluded
2120
* @param string $entityID the identifier of the Entity whose deposits will be excluded
21+
* @param string $fdicCertificateNumber The FDIC certificate number of the financial institution to be excluded. An FDIC certificate number uniquely identifies a financial institution, and is different than a routing number. To find one, we recommend searching by Bank Name using the [FDIC's bankfind tool](https://banks.data.fdic.gov/bankfind-suite/bankfind).
2222
* @param RequestOpts|null $requestOptions
2323
*
2424
* @throws APIException
2525
*/
2626
public function create(
27-
string $bankName,
2827
string $entityID,
28+
string $fdicCertificateNumber,
2929
RequestOptions|array|null $requestOptions = null,
3030
): IntrafiExclusion;
3131

src/Services/IntrafiExclusionsRawService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(private Client $client) {}
3232
* Create an IntraFi Exclusion
3333
*
3434
* @param array{
35-
* bankName: string, entityID: string
35+
* entityID: string, fdicCertificateNumber: string
3636
* }|IntrafiExclusionCreateParams $params
3737
* @param RequestOpts|null $requestOptions
3838
*

src/Services/IntrafiExclusionsService.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,22 @@ public function __construct(private Client $client)
3535
*
3636
* Create an IntraFi Exclusion
3737
*
38-
* @param string $bankName the name of the financial institution to be excluded
3938
* @param string $entityID the identifier of the Entity whose deposits will be excluded
39+
* @param string $fdicCertificateNumber The FDIC certificate number of the financial institution to be excluded. An FDIC certificate number uniquely identifies a financial institution, and is different than a routing number. To find one, we recommend searching by Bank Name using the [FDIC's bankfind tool](https://banks.data.fdic.gov/bankfind-suite/bankfind).
4040
* @param RequestOpts|null $requestOptions
4141
*
4242
* @throws APIException
4343
*/
4444
public function create(
45-
string $bankName,
4645
string $entityID,
46+
string $fdicCertificateNumber,
4747
RequestOptions|array|null $requestOptions = null,
4848
): IntrafiExclusion {
4949
$params = Util::removeNulls(
50-
['bankName' => $bankName, 'entityID' => $entityID]
50+
[
51+
'entityID' => $entityID,
52+
'fdicCertificateNumber' => $fdicCertificateNumber,
53+
],
5154
);
5255

5356
// @phpstan-ignore-next-line argument.type

tests/Services/IntrafiExclusionsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ protected function setUp(): void
3131
public function testCreate(): void
3232
{
3333
$result = $this->client->intrafiExclusions->create(
34-
bankName: 'Example Bank',
35-
entityID: 'entity_n8y8tnk2p9339ti393yi'
34+
entityID: 'entity_n8y8tnk2p9339ti393yi',
35+
fdicCertificateNumber: '314159'
3636
);
3737

3838
// @phpstan-ignore-next-line method.alreadyNarrowedType
@@ -43,8 +43,8 @@ public function testCreate(): void
4343
public function testCreateWithOptionalParams(): void
4444
{
4545
$result = $this->client->intrafiExclusions->create(
46-
bankName: 'Example Bank',
47-
entityID: 'entity_n8y8tnk2p9339ti393yi'
46+
entityID: 'entity_n8y8tnk2p9339ti393yi',
47+
fdicCertificateNumber: '314159'
4848
);
4949

5050
// @phpstan-ignore-next-line method.alreadyNarrowedType

0 commit comments

Comments
 (0)