44
55namespace Increase \CheckTransfers \CheckTransfer ;
66
7- use Increase \CheckTransfers \CheckTransfer \Submission \AddressCorrectionAction ;
87use Increase \CheckTransfers \CheckTransfer \Submission \SubmittedAddress ;
98use Increase \Core \Attributes \Required ;
109use Increase \Core \Concerns \SdkModel ;
1615 * @phpstan-import-type SubmittedAddressShape from \Increase\CheckTransfers\CheckTransfer\Submission\SubmittedAddress
1716 *
1817 * @phpstan-type SubmissionShape = array{
19- * addressCorrectionAction: AddressCorrectionAction|value-of<AddressCorrectionAction>,
2018 * submittedAddress: SubmittedAddress|SubmittedAddressShape,
2119 * submittedAt: \DateTimeInterface,
2220 * }
@@ -26,22 +24,14 @@ final class Submission implements BaseModel
2624 /** @use SdkModel<SubmissionShape> */
2725 use SdkModel;
2826
29- /**
30- * Per USPS requirements, Increase will standardize the address to USPS standards and check it against the USPS National Change of Address (NCOA) database before mailing it. This indicates what modifications, if any, were made to the address before printing and mailing the check.
31- *
32- * @var value-of<AddressCorrectionAction> $addressCorrectionAction
33- */
34- #[Required('address_correction_action ' , enum: AddressCorrectionAction::class)]
35- public string $ addressCorrectionAction ;
36-
3727 /**
3828 * The address we submitted to the printer. This is what is physically printed on the check.
3929 */
4030 #[Required('submitted_address ' )]
4131 public SubmittedAddress $ submittedAddress ;
4232
4333 /**
44- * When this check transfer was submitted to our check printer.
34+ * When this check was submitted to our check printer.
4535 */
4636 #[Required('submitted_at ' )]
4737 public \DateTimeInterface $ submittedAt ;
@@ -51,18 +41,13 @@ final class Submission implements BaseModel
5141 *
5242 * To enforce required parameters use
5343 * ```
54- * Submission::with(
55- * addressCorrectionAction: ..., submittedAddress: ..., submittedAt: ...
56- * )
44+ * Submission::with(submittedAddress: ..., submittedAt: ...)
5745 * ```
5846 *
5947 * Otherwise ensure the following setters are called
6048 *
6149 * ```
62- * (new Submission)
63- * ->withAddressCorrectionAction(...)
64- * ->withSubmittedAddress(...)
65- * ->withSubmittedAt(...)
50+ * (new Submission)->withSubmittedAddress(...)->withSubmittedAt(...)
6651 * ```
6752 */
6853 public function __construct ()
@@ -75,37 +60,20 @@ public function __construct()
7560 *
7661 * You must use named parameters to construct any parameters with a default value.
7762 *
78- * @param AddressCorrectionAction|value-of<AddressCorrectionAction> $addressCorrectionAction
7963 * @param SubmittedAddress|SubmittedAddressShape $submittedAddress
8064 */
8165 public static function with (
82- AddressCorrectionAction |string $ addressCorrectionAction ,
8366 SubmittedAddress |array $ submittedAddress ,
84- \DateTimeInterface $ submittedAt,
67+ \DateTimeInterface $ submittedAt
8568 ): self {
8669 $ self = new self ;
8770
88- $ self ['addressCorrectionAction ' ] = $ addressCorrectionAction ;
8971 $ self ['submittedAddress ' ] = $ submittedAddress ;
9072 $ self ['submittedAt ' ] = $ submittedAt ;
9173
9274 return $ self ;
9375 }
9476
95- /**
96- * Per USPS requirements, Increase will standardize the address to USPS standards and check it against the USPS National Change of Address (NCOA) database before mailing it. This indicates what modifications, if any, were made to the address before printing and mailing the check.
97- *
98- * @param AddressCorrectionAction|value-of<AddressCorrectionAction> $addressCorrectionAction
99- */
100- public function withAddressCorrectionAction (
101- AddressCorrectionAction |string $ addressCorrectionAction
102- ): self {
103- $ self = clone $ this ;
104- $ self ['addressCorrectionAction ' ] = $ addressCorrectionAction ;
105-
106- return $ self ;
107- }
108-
10977 /**
11078 * The address we submitted to the printer. This is what is physically printed on the check.
11179 *
@@ -121,7 +89,7 @@ public function withSubmittedAddress(
12189 }
12290
12391 /**
124- * When this check transfer was submitted to our check printer.
92+ * When this check was submitted to our check printer.
12593 */
12694 public function withSubmittedAt (\DateTimeInterface $ submittedAt ): self
12795 {
0 commit comments