Skip to content

Commit 555ecb4

Browse files
feat(api): api update
1 parent fb1231a commit 555ecb4

File tree

3 files changed

+59
-53
lines changed

3 files changed

+59
-53
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-4df3552a635fafa2af8caa70f7daed96996b4263da92fb96e03cbf3c1b4931b4.yml
3-
openapi_spec_hash: 77a141ca0b0c00f8117cea15374a734d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cc66158bcd1307d07051dcfd43d73dad380a7d8eb637620b21ff4a59e6073b68.yml
3+
openapi_spec_hash: add50aa92e44e568b1efa8dba7bdb2d5
44
config_hash: 27e44ed36b9c5617b580ead7231a594a

src/CheckTransfers/CheckTransfer/Mailing.php

Lines changed: 5 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,47 +11,31 @@
1111
/**
1212
* If the check has been mailed by Increase, this will contain details of the shipment.
1313
*
14-
* @phpstan-type MailingShape = array{
15-
* imageID: string|null,
16-
* mailedAt: \DateTimeInterface,
17-
* trackingNumber: string|null,
18-
* }
14+
* @phpstan-type MailingShape = array{mailedAt: \DateTimeInterface}
1915
*/
2016
final class Mailing implements BaseModel
2117
{
2218
/** @use SdkModel<MailingShape> */
2319
use SdkModel;
2420

25-
/**
26-
* The ID of the file corresponding to an image of the check that was mailed, if available.
27-
*/
28-
#[Required('image_id')]
29-
public ?string $imageID;
30-
3121
/**
3222
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the check was mailed.
3323
*/
3424
#[Required('mailed_at')]
3525
public \DateTimeInterface $mailedAt;
3626

37-
/**
38-
* The tracking number of the shipment, if available for the shipping method.
39-
*/
40-
#[Required('tracking_number')]
41-
public ?string $trackingNumber;
42-
4327
/**
4428
* `new Mailing()` is missing required properties by the API.
4529
*
4630
* To enforce required parameters use
4731
* ```
48-
* Mailing::with(imageID: ..., mailedAt: ..., trackingNumber: ...)
32+
* Mailing::with(mailedAt: ...)
4933
* ```
5034
*
5135
* Otherwise ensure the following setters are called
5236
*
5337
* ```
54-
* (new Mailing)->withImageID(...)->withMailedAt(...)->withTrackingNumber(...)
38+
* (new Mailing)->withMailedAt(...)
5539
* ```
5640
*/
5741
public function __construct()
@@ -64,27 +48,11 @@ public function __construct()
6448
*
6549
* You must use named parameters to construct any parameters with a default value.
6650
*/
67-
public static function with(
68-
?string $imageID,
69-
\DateTimeInterface $mailedAt,
70-
?string $trackingNumber
71-
): self {
51+
public static function with(\DateTimeInterface $mailedAt): self
52+
{
7253
$self = new self;
7354

74-
$self['imageID'] = $imageID;
7555
$self['mailedAt'] = $mailedAt;
76-
$self['trackingNumber'] = $trackingNumber;
77-
78-
return $self;
79-
}
80-
81-
/**
82-
* The ID of the file corresponding to an image of the check that was mailed, if available.
83-
*/
84-
public function withImageID(?string $imageID): self
85-
{
86-
$self = clone $this;
87-
$self['imageID'] = $imageID;
8856

8957
return $self;
9058
}
@@ -99,15 +67,4 @@ public function withMailedAt(\DateTimeInterface $mailedAt): self
9967

10068
return $self;
10169
}
102-
103-
/**
104-
* The tracking number of the shipment, if available for the shipping method.
105-
*/
106-
public function withTrackingNumber(?string $trackingNumber): self
107-
{
108-
$self = clone $this;
109-
$self['trackingNumber'] = $trackingNumber;
110-
111-
return $self;
112-
}
11370
}

src/CheckTransfers/CheckTransfer/Submission.php

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,23 @@
1515
* @phpstan-import-type SubmittedAddressShape from \Increase\CheckTransfers\CheckTransfer\Submission\SubmittedAddress
1616
*
1717
* @phpstan-type SubmissionShape = array{
18+
* previewFileID: string|null,
1819
* submittedAddress: SubmittedAddress|SubmittedAddressShape,
1920
* submittedAt: \DateTimeInterface,
21+
* trackingNumber: string|null,
2022
* }
2123
*/
2224
final class Submission implements BaseModel
2325
{
2426
/** @use SdkModel<SubmissionShape> */
2527
use SdkModel;
2628

29+
/**
30+
* The ID of the file corresponding to an image of the check that was mailed, if available.
31+
*/
32+
#[Required('preview_file_id')]
33+
public ?string $previewFileID;
34+
2735
/**
2836
* The address we submitted to the printer. This is what is physically printed on the check.
2937
*/
@@ -36,18 +44,33 @@ final class Submission implements BaseModel
3644
#[Required('submitted_at')]
3745
public \DateTimeInterface $submittedAt;
3846

47+
/**
48+
* The tracking number for the check shipment.
49+
*/
50+
#[Required('tracking_number')]
51+
public ?string $trackingNumber;
52+
3953
/**
4054
* `new Submission()` is missing required properties by the API.
4155
*
4256
* To enforce required parameters use
4357
* ```
44-
* Submission::with(submittedAddress: ..., submittedAt: ...)
58+
* Submission::with(
59+
* previewFileID: ...,
60+
* submittedAddress: ...,
61+
* submittedAt: ...,
62+
* trackingNumber: ...,
63+
* )
4564
* ```
4665
*
4766
* Otherwise ensure the following setters are called
4867
*
4968
* ```
50-
* (new Submission)->withSubmittedAddress(...)->withSubmittedAt(...)
69+
* (new Submission)
70+
* ->withPreviewFileID(...)
71+
* ->withSubmittedAddress(...)
72+
* ->withSubmittedAt(...)
73+
* ->withTrackingNumber(...)
5174
* ```
5275
*/
5376
public function __construct()
@@ -63,13 +86,28 @@ public function __construct()
6386
* @param SubmittedAddress|SubmittedAddressShape $submittedAddress
6487
*/
6588
public static function with(
89+
?string $previewFileID,
6690
SubmittedAddress|array $submittedAddress,
67-
\DateTimeInterface $submittedAt
91+
\DateTimeInterface $submittedAt,
92+
?string $trackingNumber,
6893
): self {
6994
$self = new self;
7095

96+
$self['previewFileID'] = $previewFileID;
7197
$self['submittedAddress'] = $submittedAddress;
7298
$self['submittedAt'] = $submittedAt;
99+
$self['trackingNumber'] = $trackingNumber;
100+
101+
return $self;
102+
}
103+
104+
/**
105+
* The ID of the file corresponding to an image of the check that was mailed, if available.
106+
*/
107+
public function withPreviewFileID(?string $previewFileID): self
108+
{
109+
$self = clone $this;
110+
$self['previewFileID'] = $previewFileID;
73111

74112
return $self;
75113
}
@@ -98,4 +136,15 @@ public function withSubmittedAt(\DateTimeInterface $submittedAt): self
98136

99137
return $self;
100138
}
139+
140+
/**
141+
* The tracking number for the check shipment.
142+
*/
143+
public function withTrackingNumber(?string $trackingNumber): self
144+
{
145+
$self = clone $this;
146+
$self['trackingNumber'] = $trackingNumber;
147+
148+
return $self;
149+
}
101150
}

0 commit comments

Comments
 (0)