From 6aa96806acae29f8f3bb558c89bcdcb6fe268efa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 16:34:04 +0000 Subject: [PATCH 1/3] feat(api): api update --- .stats.yml | 8 +- src/CheckDeposits/CheckDeposit.php | 22 +- src/Client.php | 13 +- src/InboundMailItems/InboundMailItem.php | 46 +++- .../InboundMailItem/RejectionReason.php | 4 + .../InboundMailItemListParams.php | 36 ++- src/LockboxAddresses/LockboxAddress.php | 227 ++++++++++++++++++ .../LockboxAddress}/Address.php | 35 +-- .../LockboxAddress/Status.php | 19 ++ src/LockboxAddresses/LockboxAddress/Type.php | 13 + .../LockboxAddressCreateParams.php | 60 +++++ .../LockboxAddressListParams.php} | 36 +-- .../LockboxAddressListParams}/CreatedAt.php | 2 +- .../LockboxAddressUpdateParams.php | 89 +++++++ .../LockboxAddressUpdateParams/Status.php | 17 ++ .../LockboxRecipient.php} | 155 ++++++------ .../LockboxRecipient/Status.php | 17 ++ .../LockboxRecipient/Type.php | 13 + .../LockboxRecipientCreateParams.php} | 58 +++-- .../LockboxRecipientListParams.php | 165 +++++++++++++ .../LockboxRecipientListParams/CreatedAt.php | 117 +++++++++ .../LockboxRecipientUpdateParams.php} | 67 +++--- .../LockboxRecipientUpdateParams/Status.php | 17 ++ .../Lockbox/CheckDepositBehavior.php | 17 -- src/Lockboxes/Lockbox/Type.php | 13 - .../CheckDepositBehavior.php | 17 -- .../InboundMailItemsContract.php | 6 +- ...tract.php => LockboxAddressesContract.php} | 42 ++-- ...ct.php => LockboxAddressesRawContract.php} | 38 +-- .../LockboxRecipientsContract.php | 95 ++++++++ .../LockboxRecipientsRawContract.php | 82 +++++++ .../Simulations/InboundMailItemsContract.php | 6 +- src/Services/InboundMailItemsRawService.php | 9 +- src/Services/InboundMailItemsService.php | 9 +- src/Services/LockboxAddressesRawService.php | 163 +++++++++++++ src/Services/LockboxAddressesService.php | 142 +++++++++++ ...ce.php => LockboxRecipientsRawService.php} | 87 +++---- ...rvice.php => LockboxRecipientsService.php} | 68 +++--- .../InboundMailItemsRawService.php | 5 +- .../Simulations/InboundMailItemsService.php | 9 +- .../InboundMailItemCreateParams.php | 58 +++-- tests/Services/LockboxAddressesTest.php | 75 ++++++ ...oxesTest.php => LockboxRecipientsTest.php} | 34 +-- .../Simulations/InboundMailItemsTest.php | 6 +- 44 files changed, 1785 insertions(+), 432 deletions(-) create mode 100644 src/LockboxAddresses/LockboxAddress.php rename src/{Lockboxes/Lockbox => LockboxAddresses/LockboxAddress}/Address.php (71%) create mode 100644 src/LockboxAddresses/LockboxAddress/Status.php create mode 100644 src/LockboxAddresses/LockboxAddress/Type.php create mode 100644 src/LockboxAddresses/LockboxAddressCreateParams.php rename src/{Lockboxes/LockboxListParams.php => LockboxAddresses/LockboxAddressListParams.php} (77%) rename src/{Lockboxes/LockboxListParams => LockboxAddresses/LockboxAddressListParams}/CreatedAt.php (98%) create mode 100644 src/LockboxAddresses/LockboxAddressUpdateParams.php create mode 100644 src/LockboxAddresses/LockboxAddressUpdateParams/Status.php rename src/{Lockboxes/Lockbox.php => LockboxRecipients/LockboxRecipient.php} (59%) create mode 100644 src/LockboxRecipients/LockboxRecipient/Status.php create mode 100644 src/LockboxRecipients/LockboxRecipient/Type.php rename src/{Lockboxes/LockboxCreateParams.php => LockboxRecipients/LockboxRecipientCreateParams.php} (52%) create mode 100644 src/LockboxRecipients/LockboxRecipientListParams.php create mode 100644 src/LockboxRecipients/LockboxRecipientListParams/CreatedAt.php rename src/{Lockboxes/LockboxUpdateParams.php => LockboxRecipients/LockboxRecipientUpdateParams.php} (50%) create mode 100644 src/LockboxRecipients/LockboxRecipientUpdateParams/Status.php delete mode 100644 src/Lockboxes/Lockbox/CheckDepositBehavior.php delete mode 100644 src/Lockboxes/Lockbox/Type.php delete mode 100644 src/Lockboxes/LockboxUpdateParams/CheckDepositBehavior.php rename src/ServiceContracts/{LockboxesContract.php => LockboxAddressesContract.php} (59%) rename src/ServiceContracts/{LockboxesRawContract.php => LockboxAddressesRawContract.php} (54%) create mode 100644 src/ServiceContracts/LockboxRecipientsContract.php create mode 100644 src/ServiceContracts/LockboxRecipientsRawContract.php create mode 100644 src/Services/LockboxAddressesRawService.php create mode 100644 src/Services/LockboxAddressesService.php rename src/Services/{LockboxesRawService.php => LockboxRecipientsRawService.php} (55%) rename src/Services/{LockboxesService.php => LockboxRecipientsService.php} (61%) create mode 100644 tests/Services/LockboxAddressesTest.php rename tests/Services/{LockboxesTest.php => LockboxRecipientsTest.php} (59%) diff --git a/.stats.yml b/.stats.yml index 2c0b2692..0f4697e3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0482ee5f9cf2cd09691221500b562dab1092df43e774e92b714ccebebf618b1b.yml -openapi_spec_hash: 3f1b98e772d86cca81fa3186198a6937 -config_hash: b24ba63471a818520cec39b4695e1825 +configured_endpoints: 236 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-47752267c48d299a01c906499bb7d584228ea8801b7d83e34ae4100d5dec3434.yml +openapi_spec_hash: 132e71b6e6bb1c5f06153f87d50e335b +config_hash: 026e2baa580c7f5f2447c24332081ba8 diff --git a/src/CheckDeposits/CheckDeposit.php b/src/CheckDeposits/CheckDeposit.php index ce4e9456..b74c9114 100644 --- a/src/CheckDeposits/CheckDeposit.php +++ b/src/CheckDeposits/CheckDeposit.php @@ -42,7 +42,7 @@ * idempotencyKey: string|null, * inboundFundsHold: null|InboundFundsHold|InboundFundsHoldShape, * inboundMailItemID: string|null, - * lockboxID: string|null, + * lockboxRecipientID: string|null, * status: Status|value-of, * transactionID: string|null, * type: Type|value-of, @@ -146,10 +146,10 @@ final class CheckDeposit implements BaseModel public ?string $inboundMailItemID; /** - * If the Check Deposit was the result of an Inbound Mail Item, this will contain the identifier of the Lockbox that received it. + * If the Check Deposit was the result of an Inbound Mail Item routed to a Lockbox Recipient, this will contain the identifier of the Lockbox Recipient that received it. */ - #[Required('lockbox_id')] - public ?string $lockboxID; + #[Required('lockbox_recipient_id')] + public ?string $lockboxRecipientID; /** * The status of the Check Deposit. @@ -194,7 +194,7 @@ final class CheckDeposit implements BaseModel * idempotencyKey: ..., * inboundFundsHold: ..., * inboundMailItemID: ..., - * lockboxID: ..., + * lockboxRecipientID: ..., * status: ..., * transactionID: ..., * type: ..., @@ -220,7 +220,7 @@ final class CheckDeposit implements BaseModel * ->withIdempotencyKey(...) * ->withInboundFundsHold(...) * ->withInboundMailItemID(...) - * ->withLockboxID(...) + * ->withLockboxRecipientID(...) * ->withStatus(...) * ->withTransactionID(...) * ->withType(...) @@ -261,7 +261,7 @@ public static function with( ?string $idempotencyKey, InboundFundsHold|array|null $inboundFundsHold, ?string $inboundMailItemID, - ?string $lockboxID, + ?string $lockboxRecipientID, Status|string $status, ?string $transactionID, Type|string $type, @@ -283,7 +283,7 @@ public static function with( $self['idempotencyKey'] = $idempotencyKey; $self['inboundFundsHold'] = $inboundFundsHold; $self['inboundMailItemID'] = $inboundMailItemID; - $self['lockboxID'] = $lockboxID; + $self['lockboxRecipientID'] = $lockboxRecipientID; $self['status'] = $status; $self['transactionID'] = $transactionID; $self['type'] = $type; @@ -474,12 +474,12 @@ public function withInboundMailItemID(?string $inboundMailItemID): self } /** - * If the Check Deposit was the result of an Inbound Mail Item, this will contain the identifier of the Lockbox that received it. + * If the Check Deposit was the result of an Inbound Mail Item routed to a Lockbox Recipient, this will contain the identifier of the Lockbox Recipient that received it. */ - public function withLockboxID(?string $lockboxID): self + public function withLockboxRecipientID(?string $lockboxRecipientID): self { $self = clone $this; - $self['lockboxID'] = $lockboxID; + $self['lockboxRecipientID'] = $lockboxRecipientID; return $self; } diff --git a/src/Client.php b/src/Client.php index 270240e9..e1087753 100644 --- a/src/Client.php +++ b/src/Client.php @@ -47,7 +47,8 @@ use Increase\Services\IntrafiAccountEnrollmentsService; use Increase\Services\IntrafiBalancesService; use Increase\Services\IntrafiExclusionsService; -use Increase\Services\LockboxesService; +use Increase\Services\LockboxAddressesService; +use Increase\Services\LockboxRecipientsService; use Increase\Services\OAuthApplicationsService; use Increase\Services\OAuthConnectionsService; use Increase\Services\OAuthTokensService; @@ -223,7 +224,12 @@ class Client extends BaseClient /** * @api */ - public LockboxesService $lockboxes; + public LockboxAddressesService $lockboxAddresses; + + /** + * @api + */ + public LockboxRecipientsService $lockboxRecipients; /** * @api @@ -429,7 +435,8 @@ public function __construct( $this->inboundFednowTransfers = new InboundFednowTransfersService($this); $this->swiftTransfers = new SwiftTransfersService($this); $this->checkDeposits = new CheckDepositsService($this); - $this->lockboxes = new LockboxesService($this); + $this->lockboxAddresses = new LockboxAddressesService($this); + $this->lockboxRecipients = new LockboxRecipientsService($this); $this->inboundMailItems = new InboundMailItemsService($this); $this->routingNumbers = new RoutingNumbersService($this); $this->externalAccounts = new ExternalAccountsService($this); diff --git a/src/InboundMailItems/InboundMailItem.php b/src/InboundMailItems/InboundMailItem.php index 20a06c29..e00685fe 100644 --- a/src/InboundMailItems/InboundMailItem.php +++ b/src/InboundMailItems/InboundMailItem.php @@ -13,7 +13,7 @@ use Increase\InboundMailItems\InboundMailItem\Type; /** - * Inbound Mail Items represent pieces of physical mail delivered to a Lockbox. + * Inbound Mail Items represent pieces of physical mail delivered to a Lockbox Address. * * @phpstan-import-type CheckShape from \Increase\InboundMailItems\InboundMailItem\Check * @@ -22,7 +22,8 @@ * checks: list, * createdAt: \DateTimeInterface, * fileID: string, - * lockboxID: string|null, + * lockboxAddressID: string|null, + * lockboxRecipientID: string|null, * recipientName: string|null, * rejectionReason: null|RejectionReason|value-of, * status: Status|value-of, @@ -61,10 +62,16 @@ final class InboundMailItem implements BaseModel public string $fileID; /** - * The identifier for the Lockbox that received this mail item. For mail items that could not be processed due to an invalid address, this will be null. + * The identifier for the Lockbox Address that received this mail item. */ - #[Required('lockbox_id')] - public ?string $lockboxID; + #[Required('lockbox_address_id')] + public ?string $lockboxAddressID; + + /** + * The identifier for the Lockbox Recipient that received this mail item. For mail items that could not be routed to a Lockbox Recipient, this will be null. + */ + #[Required('lockbox_recipient_id')] + public ?string $lockboxRecipientID; /** * The recipient name as written on the mail item. @@ -106,7 +113,8 @@ final class InboundMailItem implements BaseModel * checks: ..., * createdAt: ..., * fileID: ..., - * lockboxID: ..., + * lockboxAddressID: ..., + * lockboxRecipientID: ..., * recipientName: ..., * rejectionReason: ..., * status: ..., @@ -122,7 +130,8 @@ final class InboundMailItem implements BaseModel * ->withChecks(...) * ->withCreatedAt(...) * ->withFileID(...) - * ->withLockboxID(...) + * ->withLockboxAddressID(...) + * ->withLockboxRecipientID(...) * ->withRecipientName(...) * ->withRejectionReason(...) * ->withStatus(...) @@ -149,7 +158,8 @@ public static function with( array $checks, \DateTimeInterface $createdAt, string $fileID, - ?string $lockboxID, + ?string $lockboxAddressID, + ?string $lockboxRecipientID, ?string $recipientName, RejectionReason|string|null $rejectionReason, Status|string $status, @@ -161,7 +171,8 @@ public static function with( $self['checks'] = $checks; $self['createdAt'] = $createdAt; $self['fileID'] = $fileID; - $self['lockboxID'] = $lockboxID; + $self['lockboxAddressID'] = $lockboxAddressID; + $self['lockboxRecipientID'] = $lockboxRecipientID; $self['recipientName'] = $recipientName; $self['rejectionReason'] = $rejectionReason; $self['status'] = $status; @@ -217,12 +228,23 @@ public function withFileID(string $fileID): self } /** - * The identifier for the Lockbox that received this mail item. For mail items that could not be processed due to an invalid address, this will be null. + * The identifier for the Lockbox Address that received this mail item. + */ + public function withLockboxAddressID(?string $lockboxAddressID): self + { + $self = clone $this; + $self['lockboxAddressID'] = $lockboxAddressID; + + return $self; + } + + /** + * The identifier for the Lockbox Recipient that received this mail item. For mail items that could not be routed to a Lockbox Recipient, this will be null. */ - public function withLockboxID(?string $lockboxID): self + public function withLockboxRecipientID(?string $lockboxRecipientID): self { $self = clone $this; - $self['lockboxID'] = $lockboxID; + $self['lockboxRecipientID'] = $lockboxRecipientID; return $self; } diff --git a/src/InboundMailItems/InboundMailItem/RejectionReason.php b/src/InboundMailItems/InboundMailItem/RejectionReason.php index cae4acd7..055aea1a 100644 --- a/src/InboundMailItems/InboundMailItem/RejectionReason.php +++ b/src/InboundMailItems/InboundMailItem/RejectionReason.php @@ -14,4 +14,8 @@ enum RejectionReason: string case NO_CHECK = 'no_check'; case LOCKBOX_NOT_ACTIVE = 'lockbox_not_active'; + + case LOCKBOX_ADDRESS_NOT_ACTIVE = 'lockbox_address_not_active'; + + case LOCKBOX_RECIPIENT_NOT_ACTIVE = 'lockbox_recipient_not_active'; } diff --git a/src/InboundMailItems/InboundMailItemListParams.php b/src/InboundMailItems/InboundMailItemListParams.php index 21e3724f..ec77cd2b 100644 --- a/src/InboundMailItems/InboundMailItemListParams.php +++ b/src/InboundMailItems/InboundMailItemListParams.php @@ -21,7 +21,8 @@ * createdAt?: null|CreatedAt|CreatedAtShape, * cursor?: string|null, * limit?: int|null, - * lockboxID?: string|null, + * lockboxAddressID?: string|null, + * lockboxRecipientID?: string|null, * } */ final class InboundMailItemListParams implements BaseModel @@ -46,10 +47,16 @@ final class InboundMailItemListParams implements BaseModel public ?int $limit; /** - * Filter Inbound Mail Items to ones sent to the provided Lockbox. + * Filter Inbound Mail Items to ones sent to the provided Lockbox Address. */ #[Optional] - public ?string $lockboxID; + public ?string $lockboxAddressID; + + /** + * Filter Inbound Mail Items to ones sent to the provided Lockbox Recipient. + */ + #[Optional] + public ?string $lockboxRecipientID; public function __construct() { @@ -67,14 +74,16 @@ public static function with( CreatedAt|array|null $createdAt = null, ?string $cursor = null, ?int $limit = null, - ?string $lockboxID = null, + ?string $lockboxAddressID = null, + ?string $lockboxRecipientID = null, ): self { $self = new self; null !== $createdAt && $self['createdAt'] = $createdAt; null !== $cursor && $self['cursor'] = $cursor; null !== $limit && $self['limit'] = $limit; - null !== $lockboxID && $self['lockboxID'] = $lockboxID; + null !== $lockboxAddressID && $self['lockboxAddressID'] = $lockboxAddressID; + null !== $lockboxRecipientID && $self['lockboxRecipientID'] = $lockboxRecipientID; return $self; } @@ -113,12 +122,23 @@ public function withLimit(int $limit): self } /** - * Filter Inbound Mail Items to ones sent to the provided Lockbox. + * Filter Inbound Mail Items to ones sent to the provided Lockbox Address. + */ + public function withLockboxAddressID(string $lockboxAddressID): self + { + $self = clone $this; + $self['lockboxAddressID'] = $lockboxAddressID; + + return $self; + } + + /** + * Filter Inbound Mail Items to ones sent to the provided Lockbox Recipient. */ - public function withLockboxID(string $lockboxID): self + public function withLockboxRecipientID(string $lockboxRecipientID): self { $self = clone $this; - $self['lockboxID'] = $lockboxID; + $self['lockboxRecipientID'] = $lockboxRecipientID; return $self; } diff --git a/src/LockboxAddresses/LockboxAddress.php b/src/LockboxAddresses/LockboxAddress.php new file mode 100644 index 00000000..5142ec51 --- /dev/null +++ b/src/LockboxAddresses/LockboxAddress.php @@ -0,0 +1,227 @@ +, + * type: Type|value-of, + * } + */ +final class LockboxAddress implements BaseModel +{ + /** @use SdkModel */ + use SdkModel; + + /** + * The Lockbox Address identifier. + */ + #[Required] + public string $id; + + /** + * The mailing address for the Lockbox Address. It will be present after Increase generates it. + */ + #[Required] + public ?Address $address; + + /** + * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox Address was created. + */ + #[Required('created_at')] + public \DateTimeInterface $createdAt; + + /** + * The description you choose for the Lockbox Address. + */ + #[Required] + public ?string $description; + + /** + * The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys). + */ + #[Required('idempotency_key')] + public ?string $idempotencyKey; + + /** + * The status of the Lockbox Address. + * + * @var value-of $status + */ + #[Required(enum: Status::class)] + public string $status; + + /** + * A constant representing the object's type. For this resource it will always be `lockbox_address`. + * + * @var value-of $type + */ + #[Required(enum: Type::class)] + public string $type; + + /** + * `new LockboxAddress()` is missing required properties by the API. + * + * To enforce required parameters use + * ``` + * LockboxAddress::with( + * id: ..., + * address: ..., + * createdAt: ..., + * description: ..., + * idempotencyKey: ..., + * status: ..., + * type: ..., + * ) + * ``` + * + * Otherwise ensure the following setters are called + * + * ``` + * (new LockboxAddress) + * ->withID(...) + * ->withAddress(...) + * ->withCreatedAt(...) + * ->withDescription(...) + * ->withIdempotencyKey(...) + * ->withStatus(...) + * ->withType(...) + * ``` + */ + public function __construct() + { + $this->initialize(); + } + + /** + * Construct an instance from the required parameters. + * + * You must use named parameters to construct any parameters with a default value. + * + * @param Address|AddressShape|null $address + * @param Status|value-of $status + * @param Type|value-of $type + */ + public static function with( + string $id, + Address|array|null $address, + \DateTimeInterface $createdAt, + ?string $description, + ?string $idempotencyKey, + Status|string $status, + Type|string $type, + ): self { + $self = new self; + + $self['id'] = $id; + $self['address'] = $address; + $self['createdAt'] = $createdAt; + $self['description'] = $description; + $self['idempotencyKey'] = $idempotencyKey; + $self['status'] = $status; + $self['type'] = $type; + + return $self; + } + + /** + * The Lockbox Address identifier. + */ + public function withID(string $id): self + { + $self = clone $this; + $self['id'] = $id; + + return $self; + } + + /** + * The mailing address for the Lockbox Address. It will be present after Increase generates it. + * + * @param Address|AddressShape|null $address + */ + public function withAddress(Address|array|null $address): self + { + $self = clone $this; + $self['address'] = $address; + + return $self; + } + + /** + * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox Address was created. + */ + public function withCreatedAt(\DateTimeInterface $createdAt): self + { + $self = clone $this; + $self['createdAt'] = $createdAt; + + return $self; + } + + /** + * The description you choose for the Lockbox Address. + */ + public function withDescription(?string $description): self + { + $self = clone $this; + $self['description'] = $description; + + return $self; + } + + /** + * The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys). + */ + public function withIdempotencyKey(?string $idempotencyKey): self + { + $self = clone $this; + $self['idempotencyKey'] = $idempotencyKey; + + return $self; + } + + /** + * The status of the Lockbox Address. + * + * @param Status|value-of $status + */ + public function withStatus(Status|string $status): self + { + $self = clone $this; + $self['status'] = $status; + + return $self; + } + + /** + * A constant representing the object's type. For this resource it will always be `lockbox_address`. + * + * @param Type|value-of $type + */ + public function withType(Type|string $type): self + { + $self = clone $this; + $self['type'] = $type; + + return $self; + } +} diff --git a/src/Lockboxes/Lockbox/Address.php b/src/LockboxAddresses/LockboxAddress/Address.php similarity index 71% rename from src/Lockboxes/Lockbox/Address.php rename to src/LockboxAddresses/LockboxAddress/Address.php index 1ba02fa3..63b66816 100644 --- a/src/Lockboxes/Lockbox/Address.php +++ b/src/LockboxAddresses/LockboxAddress/Address.php @@ -2,22 +2,17 @@ declare(strict_types=1); -namespace Increase\Lockboxes\Lockbox; +namespace Increase\LockboxAddresses\LockboxAddress; use Increase\Core\Attributes\Required; use Increase\Core\Concerns\SdkModel; use Increase\Core\Contracts\BaseModel; /** - * The mailing address for the Lockbox. + * The mailing address for the Lockbox Address. It will be present after Increase generates it. * * @phpstan-type AddressShape = array{ - * city: string, - * line1: string, - * line2: string, - * postalCode: string, - * recipient: string|null, - * state: string, + * city: string, line1: string, line2: string, postalCode: string, state: string * } */ final class Address implements BaseModel @@ -49,12 +44,6 @@ final class Address implements BaseModel #[Required('postal_code')] public string $postalCode; - /** - * The recipient line of the address. This will include the recipient name you provide when creating the address, as well as an ATTN suffix to help route the mail to your lockbox. Mail senders must include this ATTN line to receive mail at this Lockbox. - */ - #[Required] - public ?string $recipient; - /** * The two-letter United States Postal Service (USPS) abbreviation for the state of the address. */ @@ -66,9 +55,7 @@ final class Address implements BaseModel * * To enforce required parameters use * ``` - * Address::with( - * city: ..., line1: ..., line2: ..., postalCode: ..., recipient: ..., state: ... - * ) + * Address::with(city: ..., line1: ..., line2: ..., postalCode: ..., state: ...) * ``` * * Otherwise ensure the following setters are called @@ -79,7 +66,6 @@ final class Address implements BaseModel * ->withLine1(...) * ->withLine2(...) * ->withPostalCode(...) - * ->withRecipient(...) * ->withState(...) * ``` */ @@ -98,7 +84,6 @@ public static function with( string $line1, string $line2, string $postalCode, - ?string $recipient, string $state, ): self { $self = new self; @@ -107,7 +92,6 @@ public static function with( $self['line1'] = $line1; $self['line2'] = $line2; $self['postalCode'] = $postalCode; - $self['recipient'] = $recipient; $self['state'] = $state; return $self; @@ -157,17 +141,6 @@ public function withPostalCode(string $postalCode): self return $self; } - /** - * The recipient line of the address. This will include the recipient name you provide when creating the address, as well as an ATTN suffix to help route the mail to your lockbox. Mail senders must include this ATTN line to receive mail at this Lockbox. - */ - public function withRecipient(?string $recipient): self - { - $self = clone $this; - $self['recipient'] = $recipient; - - return $self; - } - /** * The two-letter United States Postal Service (USPS) abbreviation for the state of the address. */ diff --git a/src/LockboxAddresses/LockboxAddress/Status.php b/src/LockboxAddresses/LockboxAddress/Status.php new file mode 100644 index 00000000..0b3bdee3 --- /dev/null +++ b/src/LockboxAddresses/LockboxAddress/Status.php @@ -0,0 +1,19 @@ + */ + use SdkModel; + use SdkParams; + + /** + * The description you choose for the Lockbox Address. + */ + #[Optional] + public ?string $description; + + public function __construct() + { + $this->initialize(); + } + + /** + * Construct an instance from the required parameters. + * + * You must use named parameters to construct any parameters with a default value. + */ + public static function with(?string $description = null): self + { + $self = new self; + + null !== $description && $self['description'] = $description; + + return $self; + } + + /** + * The description you choose for the Lockbox Address. + */ + public function withDescription(string $description): self + { + $self = clone $this; + $self['description'] = $description; + + return $self; + } +} diff --git a/src/Lockboxes/LockboxListParams.php b/src/LockboxAddresses/LockboxAddressListParams.php similarity index 77% rename from src/Lockboxes/LockboxListParams.php rename to src/LockboxAddresses/LockboxAddressListParams.php index cd4d2fc2..9e0b491d 100644 --- a/src/Lockboxes/LockboxListParams.php +++ b/src/LockboxAddresses/LockboxAddressListParams.php @@ -2,41 +2,34 @@ declare(strict_types=1); -namespace Increase\Lockboxes; +namespace Increase\LockboxAddresses; use Increase\Core\Attributes\Optional; use Increase\Core\Concerns\SdkModel; use Increase\Core\Concerns\SdkParams; use Increase\Core\Contracts\BaseModel; -use Increase\Lockboxes\LockboxListParams\CreatedAt; +use Increase\LockboxAddresses\LockboxAddressListParams\CreatedAt; /** - * List Lockboxes. + * List Lockbox Addresses. * - * @see Increase\Services\LockboxesService::list() + * @see Increase\Services\LockboxAddressesService::list() * - * @phpstan-import-type CreatedAtShape from \Increase\Lockboxes\LockboxListParams\CreatedAt + * @phpstan-import-type CreatedAtShape from \Increase\LockboxAddresses\LockboxAddressListParams\CreatedAt * - * @phpstan-type LockboxListParamsShape = array{ - * accountID?: string|null, + * @phpstan-type LockboxAddressListParamsShape = array{ * createdAt?: null|CreatedAt|CreatedAtShape, * cursor?: string|null, * idempotencyKey?: string|null, * limit?: int|null, * } */ -final class LockboxListParams implements BaseModel +final class LockboxAddressListParams implements BaseModel { - /** @use SdkModel */ + /** @use SdkModel */ use SdkModel; use SdkParams; - /** - * Filter Lockboxes to those associated with the provided Account. - */ - #[Optional] - public ?string $accountID; - #[Optional] public ?CreatedAt $createdAt; @@ -71,7 +64,6 @@ public function __construct() * @param CreatedAt|CreatedAtShape|null $createdAt */ public static function with( - ?string $accountID = null, CreatedAt|array|null $createdAt = null, ?string $cursor = null, ?string $idempotencyKey = null, @@ -79,7 +71,6 @@ public static function with( ): self { $self = new self; - null !== $accountID && $self['accountID'] = $accountID; null !== $createdAt && $self['createdAt'] = $createdAt; null !== $cursor && $self['cursor'] = $cursor; null !== $idempotencyKey && $self['idempotencyKey'] = $idempotencyKey; @@ -88,17 +79,6 @@ public static function with( return $self; } - /** - * Filter Lockboxes to those associated with the provided Account. - */ - public function withAccountID(string $accountID): self - { - $self = clone $this; - $self['accountID'] = $accountID; - - return $self; - } - /** * @param CreatedAt|CreatedAtShape $createdAt */ diff --git a/src/Lockboxes/LockboxListParams/CreatedAt.php b/src/LockboxAddresses/LockboxAddressListParams/CreatedAt.php similarity index 98% rename from src/Lockboxes/LockboxListParams/CreatedAt.php rename to src/LockboxAddresses/LockboxAddressListParams/CreatedAt.php index 0cc48dc6..7371c552 100644 --- a/src/Lockboxes/LockboxListParams/CreatedAt.php +++ b/src/LockboxAddresses/LockboxAddressListParams/CreatedAt.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Increase\Lockboxes\LockboxListParams; +namespace Increase\LockboxAddresses\LockboxAddressListParams; use Increase\Core\Attributes\Optional; use Increase\Core\Concerns\SdkModel; diff --git a/src/LockboxAddresses/LockboxAddressUpdateParams.php b/src/LockboxAddresses/LockboxAddressUpdateParams.php new file mode 100644 index 00000000..ec083ae8 --- /dev/null +++ b/src/LockboxAddresses/LockboxAddressUpdateParams.php @@ -0,0 +1,89 @@ + + * } + */ +final class LockboxAddressUpdateParams implements BaseModel +{ + /** @use SdkModel */ + use SdkModel; + use SdkParams; + + /** + * The description you choose for the Lockbox Address. + */ + #[Optional] + public ?string $description; + + /** + * The status of the Lockbox Address. + * + * @var value-of|null $status + */ + #[Optional(enum: Status::class)] + public ?string $status; + + public function __construct() + { + $this->initialize(); + } + + /** + * Construct an instance from the required parameters. + * + * You must use named parameters to construct any parameters with a default value. + * + * @param Status|value-of|null $status + */ + public static function with( + ?string $description = null, + Status|string|null $status = null + ): self { + $self = new self; + + null !== $description && $self['description'] = $description; + null !== $status && $self['status'] = $status; + + return $self; + } + + /** + * The description you choose for the Lockbox Address. + */ + public function withDescription(string $description): self + { + $self = clone $this; + $self['description'] = $description; + + return $self; + } + + /** + * The status of the Lockbox Address. + * + * @param Status|value-of $status + */ + public function withStatus(Status|string $status): self + { + $self = clone $this; + $self['status'] = $status; + + return $self; + } +} diff --git a/src/LockboxAddresses/LockboxAddressUpdateParams/Status.php b/src/LockboxAddresses/LockboxAddressUpdateParams/Status.php new file mode 100644 index 00000000..0ea972d7 --- /dev/null +++ b/src/LockboxAddresses/LockboxAddressUpdateParams/Status.php @@ -0,0 +1,17 @@ +, * createdAt: \DateTimeInterface, * description: string|null, * idempotencyKey: string|null, + * lockboxAddressID: string, + * mailStopCode: string, * recipientName: string|null, + * status: null|Status|value-of, * type: Type|value-of, * } */ -final class Lockbox implements BaseModel +final class LockboxRecipient implements BaseModel { - /** @use SdkModel */ + /** @use SdkModel */ use SdkModel; /** - * The Lockbox identifier. + * The Lockbox Recipient identifier. */ #[Required] public string $id; /** - * The identifier for the Account checks sent to this lockbox will be deposited into. + * The identifier for the Account that checks sent to this Lockbox Recipient will be deposited into. */ #[Required('account_id')] public string $accountID; /** - * The mailing address for the Lockbox. - */ - #[Required] - public Address $address; - - /** - * Indicates if checks mailed to this lockbox will be deposited. - * - * @var value-of $checkDepositBehavior - */ - #[Required('check_deposit_behavior', enum: CheckDepositBehavior::class)] - public string $checkDepositBehavior; - - /** - * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox was created. + * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox Recipient was created. */ #[Required('created_at')] public \DateTimeInterface $createdAt; /** - * The description you choose for the Lockbox. + * The description of the Lockbox Recipient. */ #[Required] public ?string $description; @@ -78,13 +62,33 @@ final class Lockbox implements BaseModel public ?string $idempotencyKey; /** - * The recipient name you choose for the Lockbox. + * The identifier for the Lockbox Address where this Lockbox Recipient may receive physical mail. + */ + #[Required('lockbox_address_id')] + public string $lockboxAddressID; + + /** + * The mail stop code uniquely identifying this Lockbox Recipient at its Lockbox Address. It should be included in the mailing address intended for this Lockbox Recipient. + */ + #[Required('mail_stop_code')] + public string $mailStopCode; + + /** + * The name of the Lockbox Recipient. */ #[Required('recipient_name')] public ?string $recipientName; /** - * A constant representing the object's type. For this resource it will always be `lockbox`. + * The status of the Lockbox Recipient. + * + * @var value-of|null $status + */ + #[Required(enum: Status::class)] + public ?string $status; + + /** + * A constant representing the object's type. For this resource it will always be `lockbox_recipient`. * * @var value-of $type */ @@ -92,19 +96,20 @@ final class Lockbox implements BaseModel public string $type; /** - * `new Lockbox()` is missing required properties by the API. + * `new LockboxRecipient()` is missing required properties by the API. * * To enforce required parameters use * ``` - * Lockbox::with( + * LockboxRecipient::with( * id: ..., * accountID: ..., - * address: ..., - * checkDepositBehavior: ..., * createdAt: ..., * description: ..., * idempotencyKey: ..., + * lockboxAddressID: ..., + * mailStopCode: ..., * recipientName: ..., + * status: ..., * type: ..., * ) * ``` @@ -112,15 +117,16 @@ final class Lockbox implements BaseModel * Otherwise ensure the following setters are called * * ``` - * (new Lockbox) + * (new LockboxRecipient) * ->withID(...) * ->withAccountID(...) - * ->withAddress(...) - * ->withCheckDepositBehavior(...) * ->withCreatedAt(...) * ->withDescription(...) * ->withIdempotencyKey(...) + * ->withLockboxAddressID(...) + * ->withMailStopCode(...) * ->withRecipientName(...) + * ->withStatus(...) * ->withType(...) * ``` */ @@ -134,38 +140,39 @@ public function __construct() * * You must use named parameters to construct any parameters with a default value. * - * @param Address|AddressShape $address - * @param CheckDepositBehavior|value-of $checkDepositBehavior + * @param Status|value-of|null $status * @param Type|value-of $type */ public static function with( string $id, string $accountID, - Address|array $address, - CheckDepositBehavior|string $checkDepositBehavior, \DateTimeInterface $createdAt, ?string $description, ?string $idempotencyKey, + string $lockboxAddressID, + string $mailStopCode, ?string $recipientName, + Status|string|null $status, Type|string $type, ): self { $self = new self; $self['id'] = $id; $self['accountID'] = $accountID; - $self['address'] = $address; - $self['checkDepositBehavior'] = $checkDepositBehavior; $self['createdAt'] = $createdAt; $self['description'] = $description; $self['idempotencyKey'] = $idempotencyKey; + $self['lockboxAddressID'] = $lockboxAddressID; + $self['mailStopCode'] = $mailStopCode; $self['recipientName'] = $recipientName; + $self['status'] = $status; $self['type'] = $type; return $self; } /** - * The Lockbox identifier. + * The Lockbox Recipient identifier. */ public function withID(string $id): self { @@ -176,7 +183,7 @@ public function withID(string $id): self } /** - * The identifier for the Account checks sent to this lockbox will be deposited into. + * The identifier for the Account that checks sent to this Lockbox Recipient will be deposited into. */ public function withAccountID(string $accountID): self { @@ -187,67 +194,62 @@ public function withAccountID(string $accountID): self } /** - * The mailing address for the Lockbox. - * - * @param Address|AddressShape $address + * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox Recipient was created. */ - public function withAddress(Address|array $address): self + public function withCreatedAt(\DateTimeInterface $createdAt): self { $self = clone $this; - $self['address'] = $address; + $self['createdAt'] = $createdAt; return $self; } /** - * Indicates if checks mailed to this lockbox will be deposited. - * - * @param CheckDepositBehavior|value-of $checkDepositBehavior + * The description of the Lockbox Recipient. */ - public function withCheckDepositBehavior( - CheckDepositBehavior|string $checkDepositBehavior - ): self { + public function withDescription(?string $description): self + { $self = clone $this; - $self['checkDepositBehavior'] = $checkDepositBehavior; + $self['description'] = $description; return $self; } /** - * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox was created. + * The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys). */ - public function withCreatedAt(\DateTimeInterface $createdAt): self + public function withIdempotencyKey(?string $idempotencyKey): self { $self = clone $this; - $self['createdAt'] = $createdAt; + $self['idempotencyKey'] = $idempotencyKey; return $self; } /** - * The description you choose for the Lockbox. + * The identifier for the Lockbox Address where this Lockbox Recipient may receive physical mail. */ - public function withDescription(?string $description): self + public function withLockboxAddressID(string $lockboxAddressID): self { $self = clone $this; - $self['description'] = $description; + $self['lockboxAddressID'] = $lockboxAddressID; return $self; } /** - * The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys). + * The mail stop code uniquely identifying this Lockbox Recipient at its Lockbox Address. It should be included in the mailing address intended for this Lockbox Recipient. */ - public function withIdempotencyKey(?string $idempotencyKey): self + public function withMailStopCode(string $mailStopCode): self { $self = clone $this; - $self['idempotencyKey'] = $idempotencyKey; + $self['mailStopCode'] = $mailStopCode; return $self; } /** - * The recipient name you choose for the Lockbox. + * The name of the Lockbox Recipient. */ public function withRecipientName(?string $recipientName): self { @@ -258,7 +260,20 @@ public function withRecipientName(?string $recipientName): self } /** - * A constant representing the object's type. For this resource it will always be `lockbox`. + * The status of the Lockbox Recipient. + * + * @param Status|value-of|null $status + */ + public function withStatus(Status|string|null $status): self + { + $self = clone $this; + $self['status'] = $status; + + return $self; + } + + /** + * A constant representing the object's type. For this resource it will always be `lockbox_recipient`. * * @param Type|value-of $type */ diff --git a/src/LockboxRecipients/LockboxRecipient/Status.php b/src/LockboxRecipients/LockboxRecipient/Status.php new file mode 100644 index 00000000..49710db0 --- /dev/null +++ b/src/LockboxRecipients/LockboxRecipient/Status.php @@ -0,0 +1,17 @@ + */ + /** @use SdkModel */ use SdkModel; use SdkParams; /** - * The Account checks sent to this Lockbox should be deposited into. + * The Account that checks sent to this Lockbox Recipient should be deposited into. */ #[Required('account_id')] public string $accountID; /** - * The description you choose for the Lockbox, for display purposes. + * The Lockbox Address where this Lockbox Recipient may receive mail. + */ + #[Required('lockbox_address_id')] + public string $lockboxAddressID; + + /** + * The description you choose for the Lockbox Recipient. */ #[Optional] public ?string $description; /** - * The name of the recipient that will receive mail at this location. + * The name of the Lockbox Recipient. */ #[Optional('recipient_name')] public ?string $recipientName; /** - * `new LockboxCreateParams()` is missing required properties by the API. + * `new LockboxRecipientCreateParams()` is missing required properties by the API. * * To enforce required parameters use * ``` - * LockboxCreateParams::with(accountID: ...) + * LockboxRecipientCreateParams::with(accountID: ..., lockboxAddressID: ...) * ``` * * Otherwise ensure the following setters are called * * ``` - * (new LockboxCreateParams)->withAccountID(...) + * (new LockboxRecipientCreateParams) + * ->withAccountID(...) + * ->withLockboxAddressID(...) * ``` */ public function __construct() @@ -69,12 +80,14 @@ public function __construct() */ public static function with( string $accountID, + string $lockboxAddressID, ?string $description = null, - ?string $recipientName = null + ?string $recipientName = null, ): self { $self = new self; $self['accountID'] = $accountID; + $self['lockboxAddressID'] = $lockboxAddressID; null !== $description && $self['description'] = $description; null !== $recipientName && $self['recipientName'] = $recipientName; @@ -83,7 +96,7 @@ public static function with( } /** - * The Account checks sent to this Lockbox should be deposited into. + * The Account that checks sent to this Lockbox Recipient should be deposited into. */ public function withAccountID(string $accountID): self { @@ -94,7 +107,18 @@ public function withAccountID(string $accountID): self } /** - * The description you choose for the Lockbox, for display purposes. + * The Lockbox Address where this Lockbox Recipient may receive mail. + */ + public function withLockboxAddressID(string $lockboxAddressID): self + { + $self = clone $this; + $self['lockboxAddressID'] = $lockboxAddressID; + + return $self; + } + + /** + * The description you choose for the Lockbox Recipient. */ public function withDescription(string $description): self { @@ -105,7 +129,7 @@ public function withDescription(string $description): self } /** - * The name of the recipient that will receive mail at this location. + * The name of the Lockbox Recipient. */ public function withRecipientName(string $recipientName): self { diff --git a/src/LockboxRecipients/LockboxRecipientListParams.php b/src/LockboxRecipients/LockboxRecipientListParams.php new file mode 100644 index 00000000..4fdcf0d3 --- /dev/null +++ b/src/LockboxRecipients/LockboxRecipientListParams.php @@ -0,0 +1,165 @@ + */ + use SdkModel; + use SdkParams; + + /** + * Filter Lockbox Recipients to those associated with the provided Account. + */ + #[Optional] + public ?string $accountID; + + #[Optional] + public ?CreatedAt $createdAt; + + /** + * Return the page of entries after this one. + */ + #[Optional] + public ?string $cursor; + + /** + * Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys). + */ + #[Optional] + public ?string $idempotencyKey; + + /** + * Limit the size of the list that is returned. The default (and maximum) is 100 objects. + */ + #[Optional] + public ?int $limit; + + /** + * Filter Lockbox Recipients to those associated with the provided Lockbox Address. + */ + #[Optional] + public ?string $lockboxAddressID; + + public function __construct() + { + $this->initialize(); + } + + /** + * Construct an instance from the required parameters. + * + * You must use named parameters to construct any parameters with a default value. + * + * @param CreatedAt|CreatedAtShape|null $createdAt + */ + public static function with( + ?string $accountID = null, + CreatedAt|array|null $createdAt = null, + ?string $cursor = null, + ?string $idempotencyKey = null, + ?int $limit = null, + ?string $lockboxAddressID = null, + ): self { + $self = new self; + + null !== $accountID && $self['accountID'] = $accountID; + null !== $createdAt && $self['createdAt'] = $createdAt; + null !== $cursor && $self['cursor'] = $cursor; + null !== $idempotencyKey && $self['idempotencyKey'] = $idempotencyKey; + null !== $limit && $self['limit'] = $limit; + null !== $lockboxAddressID && $self['lockboxAddressID'] = $lockboxAddressID; + + return $self; + } + + /** + * Filter Lockbox Recipients to those associated with the provided Account. + */ + public function withAccountID(string $accountID): self + { + $self = clone $this; + $self['accountID'] = $accountID; + + return $self; + } + + /** + * @param CreatedAt|CreatedAtShape $createdAt + */ + public function withCreatedAt(CreatedAt|array $createdAt): self + { + $self = clone $this; + $self['createdAt'] = $createdAt; + + return $self; + } + + /** + * Return the page of entries after this one. + */ + public function withCursor(string $cursor): self + { + $self = clone $this; + $self['cursor'] = $cursor; + + return $self; + } + + /** + * Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys). + */ + public function withIdempotencyKey(string $idempotencyKey): self + { + $self = clone $this; + $self['idempotencyKey'] = $idempotencyKey; + + return $self; + } + + /** + * Limit the size of the list that is returned. The default (and maximum) is 100 objects. + */ + public function withLimit(int $limit): self + { + $self = clone $this; + $self['limit'] = $limit; + + return $self; + } + + /** + * Filter Lockbox Recipients to those associated with the provided Lockbox Address. + */ + public function withLockboxAddressID(string $lockboxAddressID): self + { + $self = clone $this; + $self['lockboxAddressID'] = $lockboxAddressID; + + return $self; + } +} diff --git a/src/LockboxRecipients/LockboxRecipientListParams/CreatedAt.php b/src/LockboxRecipients/LockboxRecipientListParams/CreatedAt.php new file mode 100644 index 00000000..7515dcc2 --- /dev/null +++ b/src/LockboxRecipients/LockboxRecipientListParams/CreatedAt.php @@ -0,0 +1,117 @@ + */ + use SdkModel; + + /** + * Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + */ + #[Optional] + public ?\DateTimeInterface $after; + + /** + * Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + */ + #[Optional] + public ?\DateTimeInterface $before; + + /** + * Return results on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + */ + #[Optional('on_or_after')] + public ?\DateTimeInterface $onOrAfter; + + /** + * Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + */ + #[Optional('on_or_before')] + public ?\DateTimeInterface $onOrBefore; + + public function __construct() + { + $this->initialize(); + } + + /** + * Construct an instance from the required parameters. + * + * You must use named parameters to construct any parameters with a default value. + */ + public static function with( + ?\DateTimeInterface $after = null, + ?\DateTimeInterface $before = null, + ?\DateTimeInterface $onOrAfter = null, + ?\DateTimeInterface $onOrBefore = null, + ): self { + $self = new self; + + null !== $after && $self['after'] = $after; + null !== $before && $self['before'] = $before; + null !== $onOrAfter && $self['onOrAfter'] = $onOrAfter; + null !== $onOrBefore && $self['onOrBefore'] = $onOrBefore; + + return $self; + } + + /** + * Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + */ + public function withAfter(\DateTimeInterface $after): self + { + $self = clone $this; + $self['after'] = $after; + + return $self; + } + + /** + * Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + */ + public function withBefore(\DateTimeInterface $before): self + { + $self = clone $this; + $self['before'] = $before; + + return $self; + } + + /** + * Return results on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + */ + public function withOnOrAfter(\DateTimeInterface $onOrAfter): self + { + $self = clone $this; + $self['onOrAfter'] = $onOrAfter; + + return $self; + } + + /** + * Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + */ + public function withOnOrBefore(\DateTimeInterface $onOrBefore): self + { + $self = clone $this; + $self['onOrBefore'] = $onOrBefore; + + return $self; + } +} diff --git a/src/Lockboxes/LockboxUpdateParams.php b/src/LockboxRecipients/LockboxRecipientUpdateParams.php similarity index 50% rename from src/Lockboxes/LockboxUpdateParams.php rename to src/LockboxRecipients/LockboxRecipientUpdateParams.php index cbca704a..64b66e96 100644 --- a/src/Lockboxes/LockboxUpdateParams.php +++ b/src/LockboxRecipients/LockboxRecipientUpdateParams.php @@ -2,51 +2,51 @@ declare(strict_types=1); -namespace Increase\Lockboxes; +namespace Increase\LockboxRecipients; use Increase\Core\Attributes\Optional; use Increase\Core\Concerns\SdkModel; use Increase\Core\Concerns\SdkParams; use Increase\Core\Contracts\BaseModel; -use Increase\Lockboxes\LockboxUpdateParams\CheckDepositBehavior; +use Increase\LockboxRecipients\LockboxRecipientUpdateParams\Status; /** - * Update a Lockbox. + * Update a Lockbox Recipient. * - * @see Increase\Services\LockboxesService::update() + * @see Increase\Services\LockboxRecipientsService::update() * - * @phpstan-type LockboxUpdateParamsShape = array{ - * checkDepositBehavior?: null|CheckDepositBehavior|value-of, + * @phpstan-type LockboxRecipientUpdateParamsShape = array{ * description?: string|null, * recipientName?: string|null, + * status?: null|Status|value-of, * } */ -final class LockboxUpdateParams implements BaseModel +final class LockboxRecipientUpdateParams implements BaseModel { - /** @use SdkModel */ + /** @use SdkModel */ use SdkModel; use SdkParams; /** - * This indicates if checks mailed to this lockbox will be deposited. - * - * @var value-of|null $checkDepositBehavior - */ - #[Optional('check_deposit_behavior', enum: CheckDepositBehavior::class)] - public ?string $checkDepositBehavior; - - /** - * The description you choose for the Lockbox. + * The description you choose for the Lockbox Recipient. */ #[Optional] public ?string $description; /** - * The recipient name you choose for the Lockbox. + * The name of the Lockbox Recipient. */ #[Optional('recipient_name')] public ?string $recipientName; + /** + * The status of the Lockbox Recipient. + * + * @var value-of|null $status + */ + #[Optional(enum: Status::class)] + public ?string $status; + public function __construct() { $this->initialize(); @@ -57,54 +57,53 @@ public function __construct() * * You must use named parameters to construct any parameters with a default value. * - * @param CheckDepositBehavior|value-of|null $checkDepositBehavior + * @param Status|value-of|null $status */ public static function with( - CheckDepositBehavior|string|null $checkDepositBehavior = null, ?string $description = null, ?string $recipientName = null, + Status|string|null $status = null, ): self { $self = new self; - null !== $checkDepositBehavior && $self['checkDepositBehavior'] = $checkDepositBehavior; null !== $description && $self['description'] = $description; null !== $recipientName && $self['recipientName'] = $recipientName; + null !== $status && $self['status'] = $status; return $self; } /** - * This indicates if checks mailed to this lockbox will be deposited. - * - * @param CheckDepositBehavior|value-of $checkDepositBehavior + * The description you choose for the Lockbox Recipient. */ - public function withCheckDepositBehavior( - CheckDepositBehavior|string $checkDepositBehavior - ): self { + public function withDescription(string $description): self + { $self = clone $this; - $self['checkDepositBehavior'] = $checkDepositBehavior; + $self['description'] = $description; return $self; } /** - * The description you choose for the Lockbox. + * The name of the Lockbox Recipient. */ - public function withDescription(string $description): self + public function withRecipientName(string $recipientName): self { $self = clone $this; - $self['description'] = $description; + $self['recipientName'] = $recipientName; return $self; } /** - * The recipient name you choose for the Lockbox. + * The status of the Lockbox Recipient. + * + * @param Status|value-of $status */ - public function withRecipientName(string $recipientName): self + public function withStatus(Status|string $status): self { $self = clone $this; - $self['recipientName'] = $recipientName; + $self['status'] = $status; return $self; } diff --git a/src/LockboxRecipients/LockboxRecipientUpdateParams/Status.php b/src/LockboxRecipients/LockboxRecipientUpdateParams/Status.php new file mode 100644 index 00000000..5b3847a3 --- /dev/null +++ b/src/LockboxRecipients/LockboxRecipientUpdateParams/Status.php @@ -0,0 +1,17 @@ + @@ -48,7 +49,8 @@ public function list( CreatedAt|array|null $createdAt = null, ?string $cursor = null, ?int $limit = null, - ?string $lockboxID = null, + ?string $lockboxAddressID = null, + ?string $lockboxRecipientID = null, RequestOptions|array|null $requestOptions = null, ): Page; diff --git a/src/ServiceContracts/LockboxesContract.php b/src/ServiceContracts/LockboxAddressesContract.php similarity index 59% rename from src/ServiceContracts/LockboxesContract.php rename to src/ServiceContracts/LockboxAddressesContract.php index e42578ac..3f298705 100644 --- a/src/ServiceContracts/LockboxesContract.php +++ b/src/ServiceContracts/LockboxAddressesContract.php @@ -5,83 +5,75 @@ namespace Increase\ServiceContracts; use Increase\Core\Exceptions\APIException; -use Increase\Lockboxes\Lockbox; -use Increase\Lockboxes\LockboxListParams\CreatedAt; -use Increase\Lockboxes\LockboxUpdateParams\CheckDepositBehavior; +use Increase\LockboxAddresses\LockboxAddress; +use Increase\LockboxAddresses\LockboxAddressListParams\CreatedAt; +use Increase\LockboxAddresses\LockboxAddressUpdateParams\Status; use Increase\Page; use Increase\RequestOptions; /** - * @phpstan-import-type CreatedAtShape from \Increase\Lockboxes\LockboxListParams\CreatedAt + * @phpstan-import-type CreatedAtShape from \Increase\LockboxAddresses\LockboxAddressListParams\CreatedAt * @phpstan-import-type RequestOpts from \Increase\RequestOptions */ -interface LockboxesContract +interface LockboxAddressesContract { /** * @api * - * @param string $accountID the Account checks sent to this Lockbox should be deposited into - * @param string $description the description you choose for the Lockbox, for display purposes - * @param string $recipientName the name of the recipient that will receive mail at this location + * @param string $description the description you choose for the Lockbox Address * @param RequestOpts|null $requestOptions * * @throws APIException */ public function create( - string $accountID, ?string $description = null, - ?string $recipientName = null, RequestOptions|array|null $requestOptions = null, - ): Lockbox; + ): LockboxAddress; /** * @api * - * @param string $lockboxID the identifier of the Lockbox to retrieve + * @param string $lockboxAddressID the identifier of the Lockbox Address to retrieve * @param RequestOpts|null $requestOptions * * @throws APIException */ public function retrieve( - string $lockboxID, + string $lockboxAddressID, RequestOptions|array|null $requestOptions = null - ): Lockbox; + ): LockboxAddress; /** * @api * - * @param string $lockboxID the identifier of the Lockbox - * @param CheckDepositBehavior|value-of $checkDepositBehavior this indicates if checks mailed to this lockbox will be deposited - * @param string $description the description you choose for the Lockbox - * @param string $recipientName the recipient name you choose for the Lockbox + * @param string $lockboxAddressID the identifier of the Lockbox Address + * @param string $description the description you choose for the Lockbox Address + * @param Status|value-of $status the status of the Lockbox Address * @param RequestOpts|null $requestOptions * * @throws APIException */ public function update( - string $lockboxID, - CheckDepositBehavior|string|null $checkDepositBehavior = null, + string $lockboxAddressID, ?string $description = null, - ?string $recipientName = null, + Status|string|null $status = null, RequestOptions|array|null $requestOptions = null, - ): Lockbox; + ): LockboxAddress; /** * @api * - * @param string $accountID filter Lockboxes to those associated with the provided Account * @param CreatedAt|CreatedAtShape $createdAt * @param string $cursor return the page of entries after this one * @param string $idempotencyKey Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys). * @param int $limit Limit the size of the list that is returned. The default (and maximum) is 100 objects. * @param RequestOpts|null $requestOptions * - * @return Page + * @return Page * * @throws APIException */ public function list( - ?string $accountID = null, CreatedAt|array|null $createdAt = null, ?string $cursor = null, ?string $idempotencyKey = null, diff --git a/src/ServiceContracts/LockboxesRawContract.php b/src/ServiceContracts/LockboxAddressesRawContract.php similarity index 54% rename from src/ServiceContracts/LockboxesRawContract.php rename to src/ServiceContracts/LockboxAddressesRawContract.php index 67b93cc9..cb653484 100644 --- a/src/ServiceContracts/LockboxesRawContract.php +++ b/src/ServiceContracts/LockboxAddressesRawContract.php @@ -6,77 +6,77 @@ use Increase\Core\Contracts\BaseResponse; use Increase\Core\Exceptions\APIException; -use Increase\Lockboxes\Lockbox; -use Increase\Lockboxes\LockboxCreateParams; -use Increase\Lockboxes\LockboxListParams; -use Increase\Lockboxes\LockboxUpdateParams; +use Increase\LockboxAddresses\LockboxAddress; +use Increase\LockboxAddresses\LockboxAddressCreateParams; +use Increase\LockboxAddresses\LockboxAddressListParams; +use Increase\LockboxAddresses\LockboxAddressUpdateParams; use Increase\Page; use Increase\RequestOptions; /** * @phpstan-import-type RequestOpts from \Increase\RequestOptions */ -interface LockboxesRawContract +interface LockboxAddressesRawContract { /** * @api * - * @param array|LockboxCreateParams $params + * @param array|LockboxAddressCreateParams $params * @param RequestOpts|null $requestOptions * - * @return BaseResponse + * @return BaseResponse * * @throws APIException */ public function create( - array|LockboxCreateParams $params, + array|LockboxAddressCreateParams $params, RequestOptions|array|null $requestOptions = null, ): BaseResponse; /** * @api * - * @param string $lockboxID the identifier of the Lockbox to retrieve + * @param string $lockboxAddressID the identifier of the Lockbox Address to retrieve * @param RequestOpts|null $requestOptions * - * @return BaseResponse + * @return BaseResponse * * @throws APIException */ public function retrieve( - string $lockboxID, + string $lockboxAddressID, RequestOptions|array|null $requestOptions = null ): BaseResponse; /** * @api * - * @param string $lockboxID the identifier of the Lockbox - * @param array|LockboxUpdateParams $params + * @param string $lockboxAddressID the identifier of the Lockbox Address + * @param array|LockboxAddressUpdateParams $params * @param RequestOpts|null $requestOptions * - * @return BaseResponse + * @return BaseResponse * * @throws APIException */ public function update( - string $lockboxID, - array|LockboxUpdateParams $params, + string $lockboxAddressID, + array|LockboxAddressUpdateParams $params, RequestOptions|array|null $requestOptions = null, ): BaseResponse; /** * @api * - * @param array|LockboxListParams $params + * @param array|LockboxAddressListParams $params * @param RequestOpts|null $requestOptions * - * @return BaseResponse> + * @return BaseResponse> * * @throws APIException */ public function list( - array|LockboxListParams $params, + array|LockboxAddressListParams $params, RequestOptions|array|null $requestOptions = null, ): BaseResponse; } diff --git a/src/ServiceContracts/LockboxRecipientsContract.php b/src/ServiceContracts/LockboxRecipientsContract.php new file mode 100644 index 00000000..de870faf --- /dev/null +++ b/src/ServiceContracts/LockboxRecipientsContract.php @@ -0,0 +1,95 @@ + $status the status of the Lockbox Recipient + * @param RequestOpts|null $requestOptions + * + * @throws APIException + */ + public function update( + string $lockboxRecipientID, + ?string $description = null, + ?string $recipientName = null, + Status|string|null $status = null, + RequestOptions|array|null $requestOptions = null, + ): LockboxRecipient; + + /** + * @api + * + * @param string $accountID filter Lockbox Recipients to those associated with the provided Account + * @param CreatedAt|CreatedAtShape $createdAt + * @param string $cursor return the page of entries after this one + * @param string $idempotencyKey Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys). + * @param int $limit Limit the size of the list that is returned. The default (and maximum) is 100 objects. + * @param string $lockboxAddressID filter Lockbox Recipients to those associated with the provided Lockbox Address + * @param RequestOpts|null $requestOptions + * + * @return Page + * + * @throws APIException + */ + public function list( + ?string $accountID = null, + CreatedAt|array|null $createdAt = null, + ?string $cursor = null, + ?string $idempotencyKey = null, + ?int $limit = null, + ?string $lockboxAddressID = null, + RequestOptions|array|null $requestOptions = null, + ): Page; +} diff --git a/src/ServiceContracts/LockboxRecipientsRawContract.php b/src/ServiceContracts/LockboxRecipientsRawContract.php new file mode 100644 index 00000000..9584d6c8 --- /dev/null +++ b/src/ServiceContracts/LockboxRecipientsRawContract.php @@ -0,0 +1,82 @@ +|LockboxRecipientCreateParams $params + * @param RequestOpts|null $requestOptions + * + * @return BaseResponse + * + * @throws APIException + */ + public function create( + array|LockboxRecipientCreateParams $params, + RequestOptions|array|null $requestOptions = null, + ): BaseResponse; + + /** + * @api + * + * @param string $lockboxRecipientID the identifier of the Lockbox Recipient to retrieve + * @param RequestOpts|null $requestOptions + * + * @return BaseResponse + * + * @throws APIException + */ + public function retrieve( + string $lockboxRecipientID, + RequestOptions|array|null $requestOptions = null, + ): BaseResponse; + + /** + * @api + * + * @param string $lockboxRecipientID the identifier of the Lockbox Recipient + * @param array|LockboxRecipientUpdateParams $params + * @param RequestOpts|null $requestOptions + * + * @return BaseResponse + * + * @throws APIException + */ + public function update( + string $lockboxRecipientID, + array|LockboxRecipientUpdateParams $params, + RequestOptions|array|null $requestOptions = null, + ): BaseResponse; + + /** + * @api + * + * @param array|LockboxRecipientListParams $params + * @param RequestOpts|null $requestOptions + * + * @return BaseResponse> + * + * @throws APIException + */ + public function list( + array|LockboxRecipientListParams $params, + RequestOptions|array|null $requestOptions = null, + ): BaseResponse; +} diff --git a/src/ServiceContracts/Simulations/InboundMailItemsContract.php b/src/ServiceContracts/Simulations/InboundMailItemsContract.php index 2e59bc07..3f98f757 100644 --- a/src/ServiceContracts/Simulations/InboundMailItemsContract.php +++ b/src/ServiceContracts/Simulations/InboundMailItemsContract.php @@ -17,16 +17,18 @@ interface InboundMailItemsContract * @api * * @param int $amount the amount of the check to be simulated, in cents - * @param string $lockboxID the identifier of the Lockbox to simulate inbound mail to * @param string $contentsFileID The file containing the PDF contents. If not present, a default check image file will be used. + * @param string $lockboxAddressID the identifier of the Lockbox Address to simulate inbound mail to + * @param string $lockboxRecipientID the identifier of the Lockbox Recipient to simulate inbound mail to * @param RequestOpts|null $requestOptions * * @throws APIException */ public function create( int $amount, - string $lockboxID, ?string $contentsFileID = null, + ?string $lockboxAddressID = null, + ?string $lockboxRecipientID = null, RequestOptions|array|null $requestOptions = null, ): InboundMailItem; } diff --git a/src/Services/InboundMailItemsRawService.php b/src/Services/InboundMailItemsRawService.php index 9b2d2ba5..6bf3329e 100644 --- a/src/Services/InboundMailItemsRawService.php +++ b/src/Services/InboundMailItemsRawService.php @@ -64,7 +64,8 @@ public function retrieve( * createdAt?: CreatedAt|CreatedAtShape, * cursor?: string, * limit?: int, - * lockboxID?: string, + * lockboxAddressID?: string, + * lockboxRecipientID?: string, * }|InboundMailItemListParams $params * @param RequestOpts|null $requestOptions * @@ -87,7 +88,11 @@ public function list( path: 'inbound_mail_items', query: Util::array_transform_keys( $parsed, - ['createdAt' => 'created_at', 'lockboxID' => 'lockbox_id'] + [ + 'createdAt' => 'created_at', + 'lockboxAddressID' => 'lockbox_address_id', + 'lockboxRecipientID' => 'lockbox_recipient_id', + ], ), options: $options, convert: InboundMailItem::class, diff --git a/src/Services/InboundMailItemsService.php b/src/Services/InboundMailItemsService.php index b012b443..5f7c83cf 100644 --- a/src/Services/InboundMailItemsService.php +++ b/src/Services/InboundMailItemsService.php @@ -62,7 +62,8 @@ public function retrieve( * @param CreatedAt|CreatedAtShape $createdAt * @param string $cursor return the page of entries after this one * @param int $limit Limit the size of the list that is returned. The default (and maximum) is 100 objects. - * @param string $lockboxID filter Inbound Mail Items to ones sent to the provided Lockbox + * @param string $lockboxAddressID filter Inbound Mail Items to ones sent to the provided Lockbox Address + * @param string $lockboxRecipientID filter Inbound Mail Items to ones sent to the provided Lockbox Recipient * @param RequestOpts|null $requestOptions * * @return Page @@ -73,7 +74,8 @@ public function list( CreatedAt|array|null $createdAt = null, ?string $cursor = null, ?int $limit = null, - ?string $lockboxID = null, + ?string $lockboxAddressID = null, + ?string $lockboxRecipientID = null, RequestOptions|array|null $requestOptions = null, ): Page { $params = Util::removeNulls( @@ -81,7 +83,8 @@ public function list( 'createdAt' => $createdAt, 'cursor' => $cursor, 'limit' => $limit, - 'lockboxID' => $lockboxID, + 'lockboxAddressID' => $lockboxAddressID, + 'lockboxRecipientID' => $lockboxRecipientID, ], ); diff --git a/src/Services/LockboxAddressesRawService.php b/src/Services/LockboxAddressesRawService.php new file mode 100644 index 00000000..aeb537dc --- /dev/null +++ b/src/Services/LockboxAddressesRawService.php @@ -0,0 +1,163 @@ + + * + * @throws APIException + */ + public function create( + array|LockboxAddressCreateParams $params, + RequestOptions|array|null $requestOptions = null, + ): BaseResponse { + [$parsed, $options] = LockboxAddressCreateParams::parseRequest( + $params, + $requestOptions, + ); + + // @phpstan-ignore-next-line return.type + return $this->client->request( + method: 'post', + path: 'lockbox_addresses', + body: (object) $parsed, + options: $options, + convert: LockboxAddress::class, + ); + } + + /** + * @api + * + * Retrieve a Lockbox Address + * + * @param string $lockboxAddressID the identifier of the Lockbox Address to retrieve + * @param RequestOpts|null $requestOptions + * + * @return BaseResponse + * + * @throws APIException + */ + public function retrieve( + string $lockboxAddressID, + RequestOptions|array|null $requestOptions = null + ): BaseResponse { + // @phpstan-ignore-next-line return.type + return $this->client->request( + method: 'get', + path: ['lockbox_addresses/%1$s', $lockboxAddressID], + options: $requestOptions, + convert: LockboxAddress::class, + ); + } + + /** + * @api + * + * Update a Lockbox Address + * + * @param string $lockboxAddressID the identifier of the Lockbox Address + * @param array{ + * description?: string, status?: Status|value-of + * }|LockboxAddressUpdateParams $params + * @param RequestOpts|null $requestOptions + * + * @return BaseResponse + * + * @throws APIException + */ + public function update( + string $lockboxAddressID, + array|LockboxAddressUpdateParams $params, + RequestOptions|array|null $requestOptions = null, + ): BaseResponse { + [$parsed, $options] = LockboxAddressUpdateParams::parseRequest( + $params, + $requestOptions, + ); + + // @phpstan-ignore-next-line return.type + return $this->client->request( + method: 'patch', + path: ['lockbox_addresses/%1$s', $lockboxAddressID], + body: (object) $parsed, + options: $options, + convert: LockboxAddress::class, + ); + } + + /** + * @api + * + * List Lockbox Addresses + * + * @param array{ + * createdAt?: CreatedAt|CreatedAtShape, + * cursor?: string, + * idempotencyKey?: string, + * limit?: int, + * }|LockboxAddressListParams $params + * @param RequestOpts|null $requestOptions + * + * @return BaseResponse> + * + * @throws APIException + */ + public function list( + array|LockboxAddressListParams $params, + RequestOptions|array|null $requestOptions = null, + ): BaseResponse { + [$parsed, $options] = LockboxAddressListParams::parseRequest( + $params, + $requestOptions, + ); + + // @phpstan-ignore-next-line return.type + return $this->client->request( + method: 'get', + path: 'lockbox_addresses', + query: Util::array_transform_keys( + $parsed, + ['createdAt' => 'created_at', 'idempotencyKey' => 'idempotency_key'], + ), + options: $options, + convert: LockboxAddress::class, + page: Page::class, + ); + } +} diff --git a/src/Services/LockboxAddressesService.php b/src/Services/LockboxAddressesService.php new file mode 100644 index 00000000..280d31ba --- /dev/null +++ b/src/Services/LockboxAddressesService.php @@ -0,0 +1,142 @@ +raw = new LockboxAddressesRawService($client); + } + + /** + * @api + * + * Create a Lockbox Address + * + * @param string $description the description you choose for the Lockbox Address + * @param RequestOpts|null $requestOptions + * + * @throws APIException + */ + public function create( + ?string $description = null, + RequestOptions|array|null $requestOptions = null + ): LockboxAddress { + $params = Util::removeNulls(['description' => $description]); + + // @phpstan-ignore-next-line argument.type + $response = $this->raw->create(params: $params, requestOptions: $requestOptions); + + return $response->parse(); + } + + /** + * @api + * + * Retrieve a Lockbox Address + * + * @param string $lockboxAddressID the identifier of the Lockbox Address to retrieve + * @param RequestOpts|null $requestOptions + * + * @throws APIException + */ + public function retrieve( + string $lockboxAddressID, + RequestOptions|array|null $requestOptions = null + ): LockboxAddress { + // @phpstan-ignore-next-line argument.type + $response = $this->raw->retrieve($lockboxAddressID, requestOptions: $requestOptions); + + return $response->parse(); + } + + /** + * @api + * + * Update a Lockbox Address + * + * @param string $lockboxAddressID the identifier of the Lockbox Address + * @param string $description the description you choose for the Lockbox Address + * @param Status|value-of $status the status of the Lockbox Address + * @param RequestOpts|null $requestOptions + * + * @throws APIException + */ + public function update( + string $lockboxAddressID, + ?string $description = null, + Status|string|null $status = null, + RequestOptions|array|null $requestOptions = null, + ): LockboxAddress { + $params = Util::removeNulls( + ['description' => $description, 'status' => $status] + ); + + // @phpstan-ignore-next-line argument.type + $response = $this->raw->update($lockboxAddressID, params: $params, requestOptions: $requestOptions); + + return $response->parse(); + } + + /** + * @api + * + * List Lockbox Addresses + * + * @param CreatedAt|CreatedAtShape $createdAt + * @param string $cursor return the page of entries after this one + * @param string $idempotencyKey Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys). + * @param int $limit Limit the size of the list that is returned. The default (and maximum) is 100 objects. + * @param RequestOpts|null $requestOptions + * + * @return Page + * + * @throws APIException + */ + public function list( + CreatedAt|array|null $createdAt = null, + ?string $cursor = null, + ?string $idempotencyKey = null, + ?int $limit = null, + RequestOptions|array|null $requestOptions = null, + ): Page { + $params = Util::removeNulls( + [ + 'createdAt' => $createdAt, + 'cursor' => $cursor, + 'idempotencyKey' => $idempotencyKey, + 'limit' => $limit, + ], + ); + + // @phpstan-ignore-next-line argument.type + $response = $this->raw->list(params: $params, requestOptions: $requestOptions); + + return $response->parse(); + } +} diff --git a/src/Services/LockboxesRawService.php b/src/Services/LockboxRecipientsRawService.php similarity index 55% rename from src/Services/LockboxesRawService.php rename to src/Services/LockboxRecipientsRawService.php index 8908594a..0008fe82 100644 --- a/src/Services/LockboxesRawService.php +++ b/src/Services/LockboxRecipientsRawService.php @@ -8,21 +8,21 @@ use Increase\Core\Contracts\BaseResponse; use Increase\Core\Exceptions\APIException; use Increase\Core\Util; -use Increase\Lockboxes\Lockbox; -use Increase\Lockboxes\LockboxCreateParams; -use Increase\Lockboxes\LockboxListParams; -use Increase\Lockboxes\LockboxListParams\CreatedAt; -use Increase\Lockboxes\LockboxUpdateParams; -use Increase\Lockboxes\LockboxUpdateParams\CheckDepositBehavior; +use Increase\LockboxRecipients\LockboxRecipient; +use Increase\LockboxRecipients\LockboxRecipientCreateParams; +use Increase\LockboxRecipients\LockboxRecipientListParams; +use Increase\LockboxRecipients\LockboxRecipientListParams\CreatedAt; +use Increase\LockboxRecipients\LockboxRecipientUpdateParams; +use Increase\LockboxRecipients\LockboxRecipientUpdateParams\Status; use Increase\Page; use Increase\RequestOptions; -use Increase\ServiceContracts\LockboxesRawContract; +use Increase\ServiceContracts\LockboxRecipientsRawContract; /** - * @phpstan-import-type CreatedAtShape from \Increase\Lockboxes\LockboxListParams\CreatedAt + * @phpstan-import-type CreatedAtShape from \Increase\LockboxRecipients\LockboxRecipientListParams\CreatedAt * @phpstan-import-type RequestOpts from \Increase\RequestOptions */ -final class LockboxesRawService implements LockboxesRawContract +final class LockboxRecipientsRawService implements LockboxRecipientsRawContract { // @phpstan-ignore-next-line /** @@ -33,22 +33,25 @@ public function __construct(private Client $client) {} /** * @api * - * Create a Lockbox + * Create a Lockbox Recipient * * @param array{ - * accountID: string, description?: string, recipientName?: string - * }|LockboxCreateParams $params + * accountID: string, + * lockboxAddressID: string, + * description?: string, + * recipientName?: string, + * }|LockboxRecipientCreateParams $params * @param RequestOpts|null $requestOptions * - * @return BaseResponse + * @return BaseResponse * * @throws APIException */ public function create( - array|LockboxCreateParams $params, + array|LockboxRecipientCreateParams $params, RequestOptions|array|null $requestOptions = null, ): BaseResponse { - [$parsed, $options] = LockboxCreateParams::parseRequest( + [$parsed, $options] = LockboxRecipientCreateParams::parseRequest( $params, $requestOptions, ); @@ -56,61 +59,59 @@ public function create( // @phpstan-ignore-next-line return.type return $this->client->request( method: 'post', - path: 'lockboxes', + path: 'lockbox_recipients', body: (object) $parsed, options: $options, - convert: Lockbox::class, + convert: LockboxRecipient::class, ); } /** * @api * - * Retrieve a Lockbox + * Retrieve a Lockbox Recipient * - * @param string $lockboxID the identifier of the Lockbox to retrieve + * @param string $lockboxRecipientID the identifier of the Lockbox Recipient to retrieve * @param RequestOpts|null $requestOptions * - * @return BaseResponse + * @return BaseResponse * * @throws APIException */ public function retrieve( - string $lockboxID, + string $lockboxRecipientID, RequestOptions|array|null $requestOptions = null ): BaseResponse { // @phpstan-ignore-next-line return.type return $this->client->request( method: 'get', - path: ['lockboxes/%1$s', $lockboxID], + path: ['lockbox_recipients/%1$s', $lockboxRecipientID], options: $requestOptions, - convert: Lockbox::class, + convert: LockboxRecipient::class, ); } /** * @api * - * Update a Lockbox + * Update a Lockbox Recipient * - * @param string $lockboxID the identifier of the Lockbox + * @param string $lockboxRecipientID the identifier of the Lockbox Recipient * @param array{ - * checkDepositBehavior?: CheckDepositBehavior|value-of, - * description?: string, - * recipientName?: string, - * }|LockboxUpdateParams $params + * description?: string, recipientName?: string, status?: Status|value-of + * }|LockboxRecipientUpdateParams $params * @param RequestOpts|null $requestOptions * - * @return BaseResponse + * @return BaseResponse * * @throws APIException */ public function update( - string $lockboxID, - array|LockboxUpdateParams $params, + string $lockboxRecipientID, + array|LockboxRecipientUpdateParams $params, RequestOptions|array|null $requestOptions = null, ): BaseResponse { - [$parsed, $options] = LockboxUpdateParams::parseRequest( + [$parsed, $options] = LockboxRecipientUpdateParams::parseRequest( $params, $requestOptions, ); @@ -118,17 +119,17 @@ public function update( // @phpstan-ignore-next-line return.type return $this->client->request( method: 'patch', - path: ['lockboxes/%1$s', $lockboxID], + path: ['lockbox_recipients/%1$s', $lockboxRecipientID], body: (object) $parsed, options: $options, - convert: Lockbox::class, + convert: LockboxRecipient::class, ); } /** * @api * - * List Lockboxes + * List Lockbox Recipients * * @param array{ * accountID?: string, @@ -136,18 +137,19 @@ public function update( * cursor?: string, * idempotencyKey?: string, * limit?: int, - * }|LockboxListParams $params + * lockboxAddressID?: string, + * }|LockboxRecipientListParams $params * @param RequestOpts|null $requestOptions * - * @return BaseResponse> + * @return BaseResponse> * * @throws APIException */ public function list( - array|LockboxListParams $params, + array|LockboxRecipientListParams $params, RequestOptions|array|null $requestOptions = null, ): BaseResponse { - [$parsed, $options] = LockboxListParams::parseRequest( + [$parsed, $options] = LockboxRecipientListParams::parseRequest( $params, $requestOptions, ); @@ -155,17 +157,18 @@ public function list( // @phpstan-ignore-next-line return.type return $this->client->request( method: 'get', - path: 'lockboxes', + path: 'lockbox_recipients', query: Util::array_transform_keys( $parsed, [ 'accountID' => 'account_id', 'createdAt' => 'created_at', 'idempotencyKey' => 'idempotency_key', + 'lockboxAddressID' => 'lockbox_address_id', ], ), options: $options, - convert: Lockbox::class, + convert: LockboxRecipient::class, page: Page::class, ); } diff --git a/src/Services/LockboxesService.php b/src/Services/LockboxRecipientsService.php similarity index 61% rename from src/Services/LockboxesService.php rename to src/Services/LockboxRecipientsService.php index 31ae45f9..304e7602 100644 --- a/src/Services/LockboxesService.php +++ b/src/Services/LockboxRecipientsService.php @@ -7,53 +7,56 @@ use Increase\Client; use Increase\Core\Exceptions\APIException; use Increase\Core\Util; -use Increase\Lockboxes\Lockbox; -use Increase\Lockboxes\LockboxListParams\CreatedAt; -use Increase\Lockboxes\LockboxUpdateParams\CheckDepositBehavior; +use Increase\LockboxRecipients\LockboxRecipient; +use Increase\LockboxRecipients\LockboxRecipientListParams\CreatedAt; +use Increase\LockboxRecipients\LockboxRecipientUpdateParams\Status; use Increase\Page; use Increase\RequestOptions; -use Increase\ServiceContracts\LockboxesContract; +use Increase\ServiceContracts\LockboxRecipientsContract; /** - * @phpstan-import-type CreatedAtShape from \Increase\Lockboxes\LockboxListParams\CreatedAt + * @phpstan-import-type CreatedAtShape from \Increase\LockboxRecipients\LockboxRecipientListParams\CreatedAt * @phpstan-import-type RequestOpts from \Increase\RequestOptions */ -final class LockboxesService implements LockboxesContract +final class LockboxRecipientsService implements LockboxRecipientsContract { /** * @api */ - public LockboxesRawService $raw; + public LockboxRecipientsRawService $raw; /** * @internal */ public function __construct(private Client $client) { - $this->raw = new LockboxesRawService($client); + $this->raw = new LockboxRecipientsRawService($client); } /** * @api * - * Create a Lockbox + * Create a Lockbox Recipient * - * @param string $accountID the Account checks sent to this Lockbox should be deposited into - * @param string $description the description you choose for the Lockbox, for display purposes - * @param string $recipientName the name of the recipient that will receive mail at this location + * @param string $accountID the Account that checks sent to this Lockbox Recipient should be deposited into + * @param string $lockboxAddressID the Lockbox Address where this Lockbox Recipient may receive mail + * @param string $description the description you choose for the Lockbox Recipient + * @param string $recipientName The name of the Lockbox Recipient * @param RequestOpts|null $requestOptions * * @throws APIException */ public function create( string $accountID, + string $lockboxAddressID, ?string $description = null, ?string $recipientName = null, RequestOptions|array|null $requestOptions = null, - ): Lockbox { + ): LockboxRecipient { $params = Util::removeNulls( [ 'accountID' => $accountID, + 'lockboxAddressID' => $lockboxAddressID, 'description' => $description, 'recipientName' => $recipientName, ], @@ -68,19 +71,19 @@ public function create( /** * @api * - * Retrieve a Lockbox + * Retrieve a Lockbox Recipient * - * @param string $lockboxID the identifier of the Lockbox to retrieve + * @param string $lockboxRecipientID the identifier of the Lockbox Recipient to retrieve * @param RequestOpts|null $requestOptions * * @throws APIException */ public function retrieve( - string $lockboxID, + string $lockboxRecipientID, RequestOptions|array|null $requestOptions = null - ): Lockbox { + ): LockboxRecipient { // @phpstan-ignore-next-line argument.type - $response = $this->raw->retrieve($lockboxID, requestOptions: $requestOptions); + $response = $this->raw->retrieve($lockboxRecipientID, requestOptions: $requestOptions); return $response->parse(); } @@ -88,33 +91,33 @@ public function retrieve( /** * @api * - * Update a Lockbox + * Update a Lockbox Recipient * - * @param string $lockboxID the identifier of the Lockbox - * @param CheckDepositBehavior|value-of $checkDepositBehavior this indicates if checks mailed to this lockbox will be deposited - * @param string $description the description you choose for the Lockbox - * @param string $recipientName the recipient name you choose for the Lockbox + * @param string $lockboxRecipientID the identifier of the Lockbox Recipient + * @param string $description the description you choose for the Lockbox Recipient + * @param string $recipientName the name of the Lockbox Recipient + * @param Status|value-of $status the status of the Lockbox Recipient * @param RequestOpts|null $requestOptions * * @throws APIException */ public function update( - string $lockboxID, - CheckDepositBehavior|string|null $checkDepositBehavior = null, + string $lockboxRecipientID, ?string $description = null, ?string $recipientName = null, + Status|string|null $status = null, RequestOptions|array|null $requestOptions = null, - ): Lockbox { + ): LockboxRecipient { $params = Util::removeNulls( [ - 'checkDepositBehavior' => $checkDepositBehavior, 'description' => $description, 'recipientName' => $recipientName, + 'status' => $status, ], ); // @phpstan-ignore-next-line argument.type - $response = $this->raw->update($lockboxID, params: $params, requestOptions: $requestOptions); + $response = $this->raw->update($lockboxRecipientID, params: $params, requestOptions: $requestOptions); return $response->parse(); } @@ -122,16 +125,17 @@ public function update( /** * @api * - * List Lockboxes + * List Lockbox Recipients * - * @param string $accountID filter Lockboxes to those associated with the provided Account + * @param string $accountID filter Lockbox Recipients to those associated with the provided Account * @param CreatedAt|CreatedAtShape $createdAt * @param string $cursor return the page of entries after this one * @param string $idempotencyKey Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys). * @param int $limit Limit the size of the list that is returned. The default (and maximum) is 100 objects. + * @param string $lockboxAddressID filter Lockbox Recipients to those associated with the provided Lockbox Address * @param RequestOpts|null $requestOptions * - * @return Page + * @return Page * * @throws APIException */ @@ -141,6 +145,7 @@ public function list( ?string $cursor = null, ?string $idempotencyKey = null, ?int $limit = null, + ?string $lockboxAddressID = null, RequestOptions|array|null $requestOptions = null, ): Page { $params = Util::removeNulls( @@ -150,6 +155,7 @@ public function list( 'cursor' => $cursor, 'idempotencyKey' => $idempotencyKey, 'limit' => $limit, + 'lockboxAddressID' => $lockboxAddressID, ], ); diff --git a/src/Services/Simulations/InboundMailItemsRawService.php b/src/Services/Simulations/InboundMailItemsRawService.php index 6df42b20..aa366f60 100644 --- a/src/Services/Simulations/InboundMailItemsRawService.php +++ b/src/Services/Simulations/InboundMailItemsRawService.php @@ -29,7 +29,10 @@ public function __construct(private Client $client) {} * Simulates an inbound mail item to your account, as if someone had mailed a physical check to one of your account's Lockboxes. * * @param array{ - * amount: int, lockboxID: string, contentsFileID?: string + * amount: int, + * contentsFileID?: string, + * lockboxAddressID?: string, + * lockboxRecipientID?: string, * }|InboundMailItemCreateParams $params * @param RequestOpts|null $requestOptions * diff --git a/src/Services/Simulations/InboundMailItemsService.php b/src/Services/Simulations/InboundMailItemsService.php index ed308c51..f44b14b9 100644 --- a/src/Services/Simulations/InboundMailItemsService.php +++ b/src/Services/Simulations/InboundMailItemsService.php @@ -35,23 +35,26 @@ public function __construct(private Client $client) * Simulates an inbound mail item to your account, as if someone had mailed a physical check to one of your account's Lockboxes. * * @param int $amount the amount of the check to be simulated, in cents - * @param string $lockboxID the identifier of the Lockbox to simulate inbound mail to * @param string $contentsFileID The file containing the PDF contents. If not present, a default check image file will be used. + * @param string $lockboxAddressID the identifier of the Lockbox Address to simulate inbound mail to + * @param string $lockboxRecipientID the identifier of the Lockbox Recipient to simulate inbound mail to * @param RequestOpts|null $requestOptions * * @throws APIException */ public function create( int $amount, - string $lockboxID, ?string $contentsFileID = null, + ?string $lockboxAddressID = null, + ?string $lockboxRecipientID = null, RequestOptions|array|null $requestOptions = null, ): InboundMailItem { $params = Util::removeNulls( [ 'amount' => $amount, - 'lockboxID' => $lockboxID, 'contentsFileID' => $contentsFileID, + 'lockboxAddressID' => $lockboxAddressID, + 'lockboxRecipientID' => $lockboxRecipientID, ], ); diff --git a/src/Simulations/InboundMailItems/InboundMailItemCreateParams.php b/src/Simulations/InboundMailItems/InboundMailItemCreateParams.php index 121cc0e3..fea90a23 100644 --- a/src/Simulations/InboundMailItems/InboundMailItemCreateParams.php +++ b/src/Simulations/InboundMailItems/InboundMailItemCreateParams.php @@ -16,7 +16,10 @@ * @see Increase\Services\Simulations\InboundMailItemsService::create() * * @phpstan-type InboundMailItemCreateParamsShape = array{ - * amount: int, lockboxID: string, contentsFileID?: string|null + * amount: int, + * contentsFileID?: string|null, + * lockboxAddressID?: string|null, + * lockboxRecipientID?: string|null, * } */ final class InboundMailItemCreateParams implements BaseModel @@ -31,30 +34,36 @@ final class InboundMailItemCreateParams implements BaseModel #[Required] public int $amount; - /** - * The identifier of the Lockbox to simulate inbound mail to. - */ - #[Required('lockbox_id')] - public string $lockboxID; - /** * The file containing the PDF contents. If not present, a default check image file will be used. */ #[Optional('contents_file_id')] public ?string $contentsFileID; + /** + * The identifier of the Lockbox Address to simulate inbound mail to. + */ + #[Optional('lockbox_address_id')] + public ?string $lockboxAddressID; + + /** + * The identifier of the Lockbox Recipient to simulate inbound mail to. + */ + #[Optional('lockbox_recipient_id')] + public ?string $lockboxRecipientID; + /** * `new InboundMailItemCreateParams()` is missing required properties by the API. * * To enforce required parameters use * ``` - * InboundMailItemCreateParams::with(amount: ..., lockboxID: ...) + * InboundMailItemCreateParams::with(amount: ...) * ``` * * Otherwise ensure the following setters are called * * ``` - * (new InboundMailItemCreateParams)->withAmount(...)->withLockboxID(...) + * (new InboundMailItemCreateParams)->withAmount(...) * ``` */ public function __construct() @@ -69,15 +78,17 @@ public function __construct() */ public static function with( int $amount, - string $lockboxID, - ?string $contentsFileID = null + ?string $contentsFileID = null, + ?string $lockboxAddressID = null, + ?string $lockboxRecipientID = null, ): self { $self = new self; $self['amount'] = $amount; - $self['lockboxID'] = $lockboxID; null !== $contentsFileID && $self['contentsFileID'] = $contentsFileID; + null !== $lockboxAddressID && $self['lockboxAddressID'] = $lockboxAddressID; + null !== $lockboxRecipientID && $self['lockboxRecipientID'] = $lockboxRecipientID; return $self; } @@ -94,23 +105,34 @@ public function withAmount(int $amount): self } /** - * The identifier of the Lockbox to simulate inbound mail to. + * The file containing the PDF contents. If not present, a default check image file will be used. */ - public function withLockboxID(string $lockboxID): self + public function withContentsFileID(string $contentsFileID): self { $self = clone $this; - $self['lockboxID'] = $lockboxID; + $self['contentsFileID'] = $contentsFileID; return $self; } /** - * The file containing the PDF contents. If not present, a default check image file will be used. + * The identifier of the Lockbox Address to simulate inbound mail to. */ - public function withContentsFileID(string $contentsFileID): self + public function withLockboxAddressID(string $lockboxAddressID): self { $self = clone $this; - $self['contentsFileID'] = $contentsFileID; + $self['lockboxAddressID'] = $lockboxAddressID; + + return $self; + } + + /** + * The identifier of the Lockbox Recipient to simulate inbound mail to. + */ + public function withLockboxRecipientID(string $lockboxRecipientID): self + { + $self = clone $this; + $self['lockboxRecipientID'] = $lockboxRecipientID; return $self; } diff --git a/tests/Services/LockboxAddressesTest.php b/tests/Services/LockboxAddressesTest.php new file mode 100644 index 00000000..cde80c71 --- /dev/null +++ b/tests/Services/LockboxAddressesTest.php @@ -0,0 +1,75 @@ +client = $client; + } + + #[Test] + public function testCreate(): void + { + $result = $this->client->lockboxAddresses->create(); + + // @phpstan-ignore-next-line method.alreadyNarrowedType + $this->assertInstanceOf(LockboxAddress::class, $result); + } + + #[Test] + public function testRetrieve(): void + { + $result = $this->client->lockboxAddresses->retrieve( + 'lockbox_address_lw6sbzl9ol5dfd8hdml6' + ); + + // @phpstan-ignore-next-line method.alreadyNarrowedType + $this->assertInstanceOf(LockboxAddress::class, $result); + } + + #[Test] + public function testUpdate(): void + { + $result = $this->client->lockboxAddresses->update( + 'lockbox_address_lw6sbzl9ol5dfd8hdml6' + ); + + // @phpstan-ignore-next-line method.alreadyNarrowedType + $this->assertInstanceOf(LockboxAddress::class, $result); + } + + #[Test] + public function testList(): void + { + $page = $this->client->lockboxAddresses->list(); + + // @phpstan-ignore-next-line method.alreadyNarrowedType + $this->assertInstanceOf(Page::class, $page); + + if ($item = $page->getItems()[0] ?? null) { + // @phpstan-ignore-next-line method.alreadyNarrowedType + $this->assertInstanceOf(LockboxAddress::class, $item); + } + } +} diff --git a/tests/Services/LockboxesTest.php b/tests/Services/LockboxRecipientsTest.php similarity index 59% rename from tests/Services/LockboxesTest.php rename to tests/Services/LockboxRecipientsTest.php index 5085f53c..438f43c6 100644 --- a/tests/Services/LockboxesTest.php +++ b/tests/Services/LockboxRecipientsTest.php @@ -4,7 +4,7 @@ use Increase\Client; use Increase\Core\Util; -use Increase\Lockboxes\Lockbox; +use Increase\LockboxRecipients\LockboxRecipient; use Increase\Page; use PHPUnit\Framework\Attributes\CoversNothing; use PHPUnit\Framework\Attributes\Test; @@ -14,7 +14,7 @@ * @internal */ #[CoversNothing] -final class LockboxesTest extends TestCase +final class LockboxRecipientsTest extends TestCase { protected Client $client; @@ -31,58 +31,62 @@ protected function setUp(): void #[Test] public function testCreate(): void { - $result = $this->client->lockboxes->create( - accountID: 'account_in71c4amph0vgo2qllky' + $result = $this->client->lockboxRecipients->create( + accountID: 'account_in71c4amph0vgo2qllky', + lockboxAddressID: 'lockbox_address_lw6sbzl9ol5dfd8hdml6', ); // @phpstan-ignore-next-line method.alreadyNarrowedType - $this->assertInstanceOf(Lockbox::class, $result); + $this->assertInstanceOf(LockboxRecipient::class, $result); } #[Test] public function testCreateWithOptionalParams(): void { - $result = $this->client->lockboxes->create( + $result = $this->client->lockboxRecipients->create( accountID: 'account_in71c4amph0vgo2qllky', - description: 'Rent payments', - recipientName: 'x', + lockboxAddressID: 'lockbox_address_lw6sbzl9ol5dfd8hdml6', + description: 'x', + recipientName: 'Ian Crease', ); // @phpstan-ignore-next-line method.alreadyNarrowedType - $this->assertInstanceOf(Lockbox::class, $result); + $this->assertInstanceOf(LockboxRecipient::class, $result); } #[Test] public function testRetrieve(): void { - $result = $this->client->lockboxes->retrieve( + $result = $this->client->lockboxRecipients->retrieve( 'lockbox_3xt21ok13q19advds4t5' ); // @phpstan-ignore-next-line method.alreadyNarrowedType - $this->assertInstanceOf(Lockbox::class, $result); + $this->assertInstanceOf(LockboxRecipient::class, $result); } #[Test] public function testUpdate(): void { - $result = $this->client->lockboxes->update('lockbox_3xt21ok13q19advds4t5'); + $result = $this->client->lockboxRecipients->update( + 'lockbox_3xt21ok13q19advds4t5' + ); // @phpstan-ignore-next-line method.alreadyNarrowedType - $this->assertInstanceOf(Lockbox::class, $result); + $this->assertInstanceOf(LockboxRecipient::class, $result); } #[Test] public function testList(): void { - $page = $this->client->lockboxes->list(); + $page = $this->client->lockboxRecipients->list(); // @phpstan-ignore-next-line method.alreadyNarrowedType $this->assertInstanceOf(Page::class, $page); if ($item = $page->getItems()[0] ?? null) { // @phpstan-ignore-next-line method.alreadyNarrowedType - $this->assertInstanceOf(Lockbox::class, $item); + $this->assertInstanceOf(LockboxRecipient::class, $item); } } } diff --git a/tests/Services/Simulations/InboundMailItemsTest.php b/tests/Services/Simulations/InboundMailItemsTest.php index 19307ed3..50bf0f49 100644 --- a/tests/Services/Simulations/InboundMailItemsTest.php +++ b/tests/Services/Simulations/InboundMailItemsTest.php @@ -31,8 +31,7 @@ protected function setUp(): void public function testCreate(): void { $result = $this->client->simulations->inboundMailItems->create( - amount: 1000, - lockboxID: 'lockbox_3xt21ok13q19advds4t5' + amount: 1000 ); // @phpstan-ignore-next-line method.alreadyNarrowedType @@ -44,8 +43,9 @@ public function testCreateWithOptionalParams(): void { $result = $this->client->simulations->inboundMailItems->create( amount: 1000, - lockboxID: 'lockbox_3xt21ok13q19advds4t5', contentsFileID: 'contents_file_id', + lockboxAddressID: 'lockbox_address_id', + lockboxRecipientID: 'lockbox_3xt21ok13q19advds4t5', ); // @phpstan-ignore-next-line method.alreadyNarrowedType From 90d6652796b26be20e85f93ba7c915b6fe930924 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 21:51:02 +0000 Subject: [PATCH 2/3] feat(api): api update --- .stats.yml | 2 +- src/CardPushTransfers/CardPushTransfer/Route.php | 2 ++ src/CardTokens/CardTokenCapabilities/Route1/Route.php | 2 ++ src/CardValidations/CardValidation/Route.php | 2 ++ .../CardTokens/CardTokenCreateParams/Capability/Route.php | 2 ++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0f4697e3..6f61c3b1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-47752267c48d299a01c906499bb7d584228ea8801b7d83e34ae4100d5dec3434.yml -openapi_spec_hash: 132e71b6e6bb1c5f06153f87d50e335b +openapi_spec_hash: 9ea8bc6dc383de626d3fa15c823227ae config_hash: 026e2baa580c7f5f2447c24332081ba8 diff --git a/src/CardPushTransfers/CardPushTransfer/Route.php b/src/CardPushTransfers/CardPushTransfer/Route.php index 4f3dac78..eda3d6cf 100644 --- a/src/CardPushTransfers/CardPushTransfer/Route.php +++ b/src/CardPushTransfers/CardPushTransfer/Route.php @@ -12,4 +12,6 @@ enum Route: string case VISA = 'visa'; case MASTERCARD = 'mastercard'; + + case PULSE = 'pulse'; } diff --git a/src/CardTokens/CardTokenCapabilities/Route1/Route.php b/src/CardTokens/CardTokenCapabilities/Route1/Route.php index 5494379f..a4573930 100644 --- a/src/CardTokens/CardTokenCapabilities/Route1/Route.php +++ b/src/CardTokens/CardTokenCapabilities/Route1/Route.php @@ -12,4 +12,6 @@ enum Route: string case VISA = 'visa'; case MASTERCARD = 'mastercard'; + + case PULSE = 'pulse'; } diff --git a/src/CardValidations/CardValidation/Route.php b/src/CardValidations/CardValidation/Route.php index c25335b7..8b034de6 100644 --- a/src/CardValidations/CardValidation/Route.php +++ b/src/CardValidations/CardValidation/Route.php @@ -12,4 +12,6 @@ enum Route: string case VISA = 'visa'; case MASTERCARD = 'mastercard'; + + case PULSE = 'pulse'; } diff --git a/src/Simulations/CardTokens/CardTokenCreateParams/Capability/Route.php b/src/Simulations/CardTokens/CardTokenCreateParams/Capability/Route.php index db87567c..c3c10a67 100644 --- a/src/Simulations/CardTokens/CardTokenCreateParams/Capability/Route.php +++ b/src/Simulations/CardTokens/CardTokenCreateParams/Capability/Route.php @@ -12,4 +12,6 @@ enum Route: string case VISA = 'visa'; case MASTERCARD = 'mastercard'; + + case PULSE = 'pulse'; } From c4b1960c3b1d017a073e5dbc5bcb8bce10c380ed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 21:51:32 +0000 Subject: [PATCH 3/3] release: 0.122.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ README.md | 2 +- src/Version.php | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a951ac34..bd115b20 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.121.1" + ".": "0.122.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index afe156ac..305db21c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.122.0 (2026-04-27) + +Full Changelog: [v0.121.1...v0.122.0](https://github.com/Increase/increase-php/compare/v0.121.1...v0.122.0) + +### Features + +* **api:** api update ([90d6652](https://github.com/Increase/increase-php/commit/90d6652796b26be20e85f93ba7c915b6fe930924)) +* **api:** api update ([6aa9680](https://github.com/Increase/increase-php/commit/6aa96806acae29f8f3bb558c89bcdcb6fe268efa)) + ## 0.121.1 (2026-04-25) Full Changelog: [v0.121.0...v0.121.1](https://github.com/Increase/increase-php/compare/v0.121.0...v0.121.1) diff --git a/README.md b/README.md index bcdd1656..e7890a38 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ The REST API documentation can be found on [increase.com](https://increase.com/d ``` -composer require "increase/increase 0.121.1" +composer require "increase/increase 0.122.0" ``` diff --git a/src/Version.php b/src/Version.php index 3f2411d1..9887a3a9 100644 --- a/src/Version.php +++ b/src/Version.php @@ -5,5 +5,5 @@ namespace Increase; // x-release-please-start-version -const VERSION = '0.121.1'; +const VERSION = '0.122.0'; // x-release-please-end