From 624fffed470d199c69e093ad78e33da38e87fdeb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2026 03:28:43 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +- .../RealTimeDecision/CardAuthentication.php | 789 +++++++++++++++++- .../CardAuthentication/Category.php | 15 + .../CardAuthentication/DeviceChannel.php | 138 +++ .../DeviceChannel/Browser.php | 172 ++++ .../Browser/JavascriptEnabled.php | 15 + .../DeviceChannel/Category.php | 17 + .../DeviceChannel/MerchantInitiated.php | 79 ++ .../MerchantInitiated/Indicator.php | 49 ++ .../RequestorAuthenticationIndicator.php | 25 + .../RequestorChallengeIndicator.php | 29 + .../CardAuthentication/TransactionType.php | 21 + 12 files changed, 1348 insertions(+), 5 deletions(-) create mode 100644 src/RealTimeDecisions/RealTimeDecision/CardAuthentication/Category.php create mode 100644 src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel.php create mode 100644 src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/Browser.php create mode 100644 src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/Browser/JavascriptEnabled.php create mode 100644 src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/Category.php create mode 100644 src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/MerchantInitiated.php create mode 100644 src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/MerchantInitiated/Indicator.php create mode 100644 src/RealTimeDecisions/RealTimeDecision/CardAuthentication/RequestorAuthenticationIndicator.php create mode 100644 src/RealTimeDecisions/RealTimeDecision/CardAuthentication/RequestorChallengeIndicator.php create mode 100644 src/RealTimeDecisions/RealTimeDecision/CardAuthentication/TransactionType.php diff --git a/.stats.yml b/.stats.yml index 507678f..c9fd376 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 234 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-561b73fd99114001dc2e93ee7371e33969398e7bc5b7e78dd1b3e8eea8e254ff.yml -openapi_spec_hash: 3b0ba693d170e8b422ba9255cdc96853 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-946ad9479adebd282fe6122c780bc4d062ff9ce0e8794c74bd1ec4aa330aab04.yml +openapi_spec_hash: eb1f88706f7c87c9f72903c7a7c96026 config_hash: 890ca5fa6b8209d4eaac90550c7dc62c diff --git a/src/RealTimeDecisions/RealTimeDecision/CardAuthentication.php b/src/RealTimeDecisions/RealTimeDecision/CardAuthentication.php index 8c757cb..a9459bd 100644 --- a/src/RealTimeDecisions/RealTimeDecision/CardAuthentication.php +++ b/src/RealTimeDecisions/RealTimeDecision/CardAuthentication.php @@ -7,15 +7,55 @@ use Increase\Core\Attributes\Required; use Increase\Core\Concerns\SdkModel; use Increase\Core\Contracts\BaseModel; +use Increase\RealTimeDecisions\RealTimeDecision\CardAuthentication\Category; use Increase\RealTimeDecisions\RealTimeDecision\CardAuthentication\Decision; +use Increase\RealTimeDecisions\RealTimeDecision\CardAuthentication\DeviceChannel; +use Increase\RealTimeDecisions\RealTimeDecision\CardAuthentication\RequestorAuthenticationIndicator; +use Increase\RealTimeDecisions\RealTimeDecision\CardAuthentication\RequestorChallengeIndicator; +use Increase\RealTimeDecisions\RealTimeDecision\CardAuthentication\TransactionType; /** * Fields related to a 3DS authentication attempt. * + * @phpstan-import-type DeviceChannelShape from \Increase\RealTimeDecisions\RealTimeDecision\CardAuthentication\DeviceChannel + * * @phpstan-type CardAuthenticationShape = array{ + * accessControlServerTransactionID: string, * accountID: string, + * billingAddressCity: string|null, + * billingAddressCountry: string|null, + * billingAddressLine1: string|null, + * billingAddressLine2: string|null, + * billingAddressLine3: string|null, + * billingAddressPostalCode: string|null, + * billingAddressState: string|null, * cardID: string, + * cardholderEmail: string|null, + * cardholderName: string|null, + * category: null|\Increase\RealTimeDecisions\RealTimeDecision\CardAuthentication\Category|value-of<\Increase\RealTimeDecisions\RealTimeDecision\CardAuthentication\Category>, * decision: null|Decision|value-of, + * deviceChannel: DeviceChannel|DeviceChannelShape, + * directoryServerTransactionID: string, + * merchantAcceptorID: string, + * merchantCategoryCode: string, + * merchantCountry: string, + * merchantName: string, + * priorCardAuthenticationID: string|null, + * purchaseAmount: int|null, + * purchaseCurrency: string|null, + * requestorAuthenticationIndicator: null|RequestorAuthenticationIndicator|value-of, + * requestorChallengeIndicator: null|RequestorChallengeIndicator|value-of, + * requestorName: string, + * requestorURL: string, + * shippingAddressCity: string|null, + * shippingAddressCountry: string|null, + * shippingAddressLine1: string|null, + * shippingAddressLine2: string|null, + * shippingAddressLine3: string|null, + * shippingAddressPostalCode: string|null, + * shippingAddressState: string|null, + * threeDSecureServerTransactionID: string, + * transactionType: null|TransactionType|value-of, * upcomingCardPaymentID: string, * } */ @@ -24,6 +64,12 @@ final class CardAuthentication implements BaseModel /** @use SdkModel */ use SdkModel; + /** + * A unique identifier assigned by the Access Control Server (us) for this transaction. + */ + #[Required('access_control_server_transaction_id')] + public string $accessControlServerTransactionID; + /** * The identifier of the Account the card belongs to. */ @@ -31,11 +77,75 @@ final class CardAuthentication implements BaseModel public string $accountID; /** - * The identifier of the Card that is being tokenized. + * The city of the cardholder billing address associated with the card used for this purchase. + */ + #[Required('billing_address_city')] + public ?string $billingAddressCity; + + /** + * The country of the cardholder billing address associated with the card used for this purchase. + */ + #[Required('billing_address_country')] + public ?string $billingAddressCountry; + + /** + * The first line of the cardholder billing address associated with the card used for this purchase. + */ + #[Required('billing_address_line1')] + public ?string $billingAddressLine1; + + /** + * The second line of the cardholder billing address associated with the card used for this purchase. + */ + #[Required('billing_address_line2')] + public ?string $billingAddressLine2; + + /** + * The third line of the cardholder billing address associated with the card used for this purchase. + */ + #[Required('billing_address_line3')] + public ?string $billingAddressLine3; + + /** + * The postal code of the cardholder billing address associated with the card used for this purchase. + */ + #[Required('billing_address_postal_code')] + public ?string $billingAddressPostalCode; + + /** + * The US state of the cardholder billing address associated with the card used for this purchase. + */ + #[Required('billing_address_state')] + public ?string $billingAddressState; + + /** + * The identifier of the Card. */ #[Required('card_id')] public string $cardID; + /** + * The email address of the cardholder. + */ + #[Required('cardholder_email')] + public ?string $cardholderEmail; + + /** + * The name of the cardholder. + */ + #[Required('cardholder_name')] + public ?string $cardholderName; + + /** + * The category of the card authentication attempt. + * + * @var value-of|null $category + */ + #[Required( + enum: Category::class, + )] + public ?string $category; + /** * Whether or not the authentication attempt was approved. * @@ -44,6 +154,150 @@ final class CardAuthentication implements BaseModel #[Required(enum: Decision::class)] public ?string $decision; + /** + * The device channel of the card authentication attempt. + */ + #[Required('device_channel')] + public DeviceChannel $deviceChannel; + + /** + * A unique identifier assigned by the Directory Server (the card network) for this transaction. + */ + #[Required('directory_server_transaction_id')] + public string $directoryServerTransactionID; + + /** + * The merchant identifier (commonly abbreviated as MID) of the merchant the card is transacting with. + */ + #[Required('merchant_acceptor_id')] + public string $merchantAcceptorID; + + /** + * The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is transacting with. + */ + #[Required('merchant_category_code')] + public string $merchantCategoryCode; + + /** + * The country the merchant resides in. + */ + #[Required('merchant_country')] + public string $merchantCountry; + + /** + * The name of the merchant. + */ + #[Required('merchant_name')] + public string $merchantName; + + /** + * The ID of a prior Card Authentication that the requestor used to authenticate this cardholder for a previous transaction. + */ + #[Required('prior_card_authentication_id')] + public ?string $priorCardAuthenticationID; + + /** + * The purchase amount in minor units. + */ + #[Required('purchase_amount')] + public ?int $purchaseAmount; + + /** + * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the authentication attempt's purchase currency. + */ + #[Required('purchase_currency')] + public ?string $purchaseCurrency; + + /** + * The 3DS requestor authentication indicator describes why the authentication attempt is performed, such as for a recurring transaction. + * + * @var value-of|null $requestorAuthenticationIndicator + */ + #[Required( + 'requestor_authentication_indicator', + enum: RequestorAuthenticationIndicator::class, + )] + public ?string $requestorAuthenticationIndicator; + + /** + * Indicates whether a challenge is requested for this transaction. + * + * @var value-of|null $requestorChallengeIndicator + */ + #[Required( + 'requestor_challenge_indicator', + enum: RequestorChallengeIndicator::class + )] + public ?string $requestorChallengeIndicator; + + /** + * The name of the 3DS requestor. + */ + #[Required('requestor_name')] + public string $requestorName; + + /** + * The URL of the 3DS requestor. + */ + #[Required('requestor_url')] + public string $requestorURL; + + /** + * The city of the shipping address associated with this purchase. + */ + #[Required('shipping_address_city')] + public ?string $shippingAddressCity; + + /** + * The country of the shipping address associated with this purchase. + */ + #[Required('shipping_address_country')] + public ?string $shippingAddressCountry; + + /** + * The first line of the shipping address associated with this purchase. + */ + #[Required('shipping_address_line1')] + public ?string $shippingAddressLine1; + + /** + * The second line of the shipping address associated with this purchase. + */ + #[Required('shipping_address_line2')] + public ?string $shippingAddressLine2; + + /** + * The third line of the shipping address associated with this purchase. + */ + #[Required('shipping_address_line3')] + public ?string $shippingAddressLine3; + + /** + * The postal code of the shipping address associated with this purchase. + */ + #[Required('shipping_address_postal_code')] + public ?string $shippingAddressPostalCode; + + /** + * The US state of the shipping address associated with this purchase. + */ + #[Required('shipping_address_state')] + public ?string $shippingAddressState; + + /** + * A unique identifier assigned by the 3DS Server initiating the authentication attempt for this transaction. + */ + #[Required('three_d_secure_server_transaction_id')] + public string $threeDSecureServerTransactionID; + + /** + * The type of transaction being authenticated. + * + * @var value-of|null $transactionType + */ + #[Required('transaction_type', enum: TransactionType::class)] + public ?string $transactionType; + /** * The identifier of the Card Payment this authentication attempt will belong to. Available in the API once the card authentication has completed. */ @@ -56,7 +310,43 @@ final class CardAuthentication implements BaseModel * To enforce required parameters use * ``` * CardAuthentication::with( - * accountID: ..., cardID: ..., decision: ..., upcomingCardPaymentID: ... + * accessControlServerTransactionID: ..., + * accountID: ..., + * billingAddressCity: ..., + * billingAddressCountry: ..., + * billingAddressLine1: ..., + * billingAddressLine2: ..., + * billingAddressLine3: ..., + * billingAddressPostalCode: ..., + * billingAddressState: ..., + * cardID: ..., + * cardholderEmail: ..., + * cardholderName: ..., + * category: ..., + * decision: ..., + * deviceChannel: ..., + * directoryServerTransactionID: ..., + * merchantAcceptorID: ..., + * merchantCategoryCode: ..., + * merchantCountry: ..., + * merchantName: ..., + * priorCardAuthenticationID: ..., + * purchaseAmount: ..., + * purchaseCurrency: ..., + * requestorAuthenticationIndicator: ..., + * requestorChallengeIndicator: ..., + * requestorName: ..., + * requestorURL: ..., + * shippingAddressCity: ..., + * shippingAddressCountry: ..., + * shippingAddressLine1: ..., + * shippingAddressLine2: ..., + * shippingAddressLine3: ..., + * shippingAddressPostalCode: ..., + * shippingAddressState: ..., + * threeDSecureServerTransactionID: ..., + * transactionType: ..., + * upcomingCardPaymentID: ..., * ) * ``` * @@ -64,9 +354,42 @@ final class CardAuthentication implements BaseModel * * ``` * (new CardAuthentication) + * ->withAccessControlServerTransactionID(...) * ->withAccountID(...) + * ->withBillingAddressCity(...) + * ->withBillingAddressCountry(...) + * ->withBillingAddressLine1(...) + * ->withBillingAddressLine2(...) + * ->withBillingAddressLine3(...) + * ->withBillingAddressPostalCode(...) + * ->withBillingAddressState(...) * ->withCardID(...) + * ->withCardholderEmail(...) + * ->withCardholderName(...) + * ->withCategory(...) * ->withDecision(...) + * ->withDeviceChannel(...) + * ->withDirectoryServerTransactionID(...) + * ->withMerchantAcceptorID(...) + * ->withMerchantCategoryCode(...) + * ->withMerchantCountry(...) + * ->withMerchantName(...) + * ->withPriorCardAuthenticationID(...) + * ->withPurchaseAmount(...) + * ->withPurchaseCurrency(...) + * ->withRequestorAuthenticationIndicator(...) + * ->withRequestorChallengeIndicator(...) + * ->withRequestorName(...) + * ->withRequestorURL(...) + * ->withShippingAddressCity(...) + * ->withShippingAddressCountry(...) + * ->withShippingAddressLine1(...) + * ->withShippingAddressLine2(...) + * ->withShippingAddressLine3(...) + * ->withShippingAddressPostalCode(...) + * ->withShippingAddressState(...) + * ->withThreeDSecureServerTransactionID(...) + * ->withTransactionType(...) * ->withUpcomingCardPaymentID(...) * ``` */ @@ -80,24 +403,107 @@ public function __construct() * * You must use named parameters to construct any parameters with a default value. * + * @param Category|value-of|null $category * @param Decision|value-of|null $decision + * @param DeviceChannel|DeviceChannelShape $deviceChannel + * @param RequestorAuthenticationIndicator|value-of|null $requestorAuthenticationIndicator + * @param RequestorChallengeIndicator|value-of|null $requestorChallengeIndicator + * @param TransactionType|value-of|null $transactionType */ public static function with( + string $accessControlServerTransactionID, string $accountID, + ?string $billingAddressCity, + ?string $billingAddressCountry, + ?string $billingAddressLine1, + ?string $billingAddressLine2, + ?string $billingAddressLine3, + ?string $billingAddressPostalCode, + ?string $billingAddressState, string $cardID, + ?string $cardholderEmail, + ?string $cardholderName, + Category|string|null $category, Decision|string|null $decision, + DeviceChannel|array $deviceChannel, + string $directoryServerTransactionID, + string $merchantAcceptorID, + string $merchantCategoryCode, + string $merchantCountry, + string $merchantName, + ?string $priorCardAuthenticationID, + ?int $purchaseAmount, + ?string $purchaseCurrency, + RequestorAuthenticationIndicator|string|null $requestorAuthenticationIndicator, + RequestorChallengeIndicator|string|null $requestorChallengeIndicator, + string $requestorName, + string $requestorURL, + ?string $shippingAddressCity, + ?string $shippingAddressCountry, + ?string $shippingAddressLine1, + ?string $shippingAddressLine2, + ?string $shippingAddressLine3, + ?string $shippingAddressPostalCode, + ?string $shippingAddressState, + string $threeDSecureServerTransactionID, + TransactionType|string|null $transactionType, string $upcomingCardPaymentID, ): self { $self = new self; + $self['accessControlServerTransactionID'] = $accessControlServerTransactionID; $self['accountID'] = $accountID; + $self['billingAddressCity'] = $billingAddressCity; + $self['billingAddressCountry'] = $billingAddressCountry; + $self['billingAddressLine1'] = $billingAddressLine1; + $self['billingAddressLine2'] = $billingAddressLine2; + $self['billingAddressLine3'] = $billingAddressLine3; + $self['billingAddressPostalCode'] = $billingAddressPostalCode; + $self['billingAddressState'] = $billingAddressState; $self['cardID'] = $cardID; + $self['cardholderEmail'] = $cardholderEmail; + $self['cardholderName'] = $cardholderName; + $self['category'] = $category; $self['decision'] = $decision; + $self['deviceChannel'] = $deviceChannel; + $self['directoryServerTransactionID'] = $directoryServerTransactionID; + $self['merchantAcceptorID'] = $merchantAcceptorID; + $self['merchantCategoryCode'] = $merchantCategoryCode; + $self['merchantCountry'] = $merchantCountry; + $self['merchantName'] = $merchantName; + $self['priorCardAuthenticationID'] = $priorCardAuthenticationID; + $self['purchaseAmount'] = $purchaseAmount; + $self['purchaseCurrency'] = $purchaseCurrency; + $self['requestorAuthenticationIndicator'] = $requestorAuthenticationIndicator; + $self['requestorChallengeIndicator'] = $requestorChallengeIndicator; + $self['requestorName'] = $requestorName; + $self['requestorURL'] = $requestorURL; + $self['shippingAddressCity'] = $shippingAddressCity; + $self['shippingAddressCountry'] = $shippingAddressCountry; + $self['shippingAddressLine1'] = $shippingAddressLine1; + $self['shippingAddressLine2'] = $shippingAddressLine2; + $self['shippingAddressLine3'] = $shippingAddressLine3; + $self['shippingAddressPostalCode'] = $shippingAddressPostalCode; + $self['shippingAddressState'] = $shippingAddressState; + $self['threeDSecureServerTransactionID'] = $threeDSecureServerTransactionID; + $self['transactionType'] = $transactionType; $self['upcomingCardPaymentID'] = $upcomingCardPaymentID; return $self; } + /** + * A unique identifier assigned by the Access Control Server (us) for this transaction. + */ + public function withAccessControlServerTransactionID( + string $accessControlServerTransactionID + ): self { + $self = clone $this; + $self['accessControlServerTransactionID'] = $accessControlServerTransactionID; + + return $self; + } + /** * The identifier of the Account the card belongs to. */ @@ -110,7 +516,86 @@ public function withAccountID(string $accountID): self } /** - * The identifier of the Card that is being tokenized. + * The city of the cardholder billing address associated with the card used for this purchase. + */ + public function withBillingAddressCity(?string $billingAddressCity): self + { + $self = clone $this; + $self['billingAddressCity'] = $billingAddressCity; + + return $self; + } + + /** + * The country of the cardholder billing address associated with the card used for this purchase. + */ + public function withBillingAddressCountry( + ?string $billingAddressCountry + ): self { + $self = clone $this; + $self['billingAddressCountry'] = $billingAddressCountry; + + return $self; + } + + /** + * The first line of the cardholder billing address associated with the card used for this purchase. + */ + public function withBillingAddressLine1(?string $billingAddressLine1): self + { + $self = clone $this; + $self['billingAddressLine1'] = $billingAddressLine1; + + return $self; + } + + /** + * The second line of the cardholder billing address associated with the card used for this purchase. + */ + public function withBillingAddressLine2(?string $billingAddressLine2): self + { + $self = clone $this; + $self['billingAddressLine2'] = $billingAddressLine2; + + return $self; + } + + /** + * The third line of the cardholder billing address associated with the card used for this purchase. + */ + public function withBillingAddressLine3(?string $billingAddressLine3): self + { + $self = clone $this; + $self['billingAddressLine3'] = $billingAddressLine3; + + return $self; + } + + /** + * The postal code of the cardholder billing address associated with the card used for this purchase. + */ + public function withBillingAddressPostalCode( + ?string $billingAddressPostalCode + ): self { + $self = clone $this; + $self['billingAddressPostalCode'] = $billingAddressPostalCode; + + return $self; + } + + /** + * The US state of the cardholder billing address associated with the card used for this purchase. + */ + public function withBillingAddressState(?string $billingAddressState): self + { + $self = clone $this; + $self['billingAddressState'] = $billingAddressState; + + return $self; + } + + /** + * The identifier of the Card. */ public function withCardID(string $cardID): self { @@ -120,6 +605,42 @@ public function withCardID(string $cardID): self return $self; } + /** + * The email address of the cardholder. + */ + public function withCardholderEmail(?string $cardholderEmail): self + { + $self = clone $this; + $self['cardholderEmail'] = $cardholderEmail; + + return $self; + } + + /** + * The name of the cardholder. + */ + public function withCardholderName(?string $cardholderName): self + { + $self = clone $this; + $self['cardholderName'] = $cardholderName; + + return $self; + } + + /** + * The category of the card authentication attempt. + * + * @param Category|value-of|null $category + */ + public function withCategory( + Category|string|null $category, + ): self { + $self = clone $this; + $self['category'] = $category; + + return $self; + } + /** * Whether or not the authentication attempt was approved. * @@ -133,6 +654,268 @@ public function withDecision(Decision|string|null $decision): self return $self; } + /** + * The device channel of the card authentication attempt. + * + * @param DeviceChannel|DeviceChannelShape $deviceChannel + */ + public function withDeviceChannel(DeviceChannel|array $deviceChannel): self + { + $self = clone $this; + $self['deviceChannel'] = $deviceChannel; + + return $self; + } + + /** + * A unique identifier assigned by the Directory Server (the card network) for this transaction. + */ + public function withDirectoryServerTransactionID( + string $directoryServerTransactionID + ): self { + $self = clone $this; + $self['directoryServerTransactionID'] = $directoryServerTransactionID; + + return $self; + } + + /** + * The merchant identifier (commonly abbreviated as MID) of the merchant the card is transacting with. + */ + public function withMerchantAcceptorID(string $merchantAcceptorID): self + { + $self = clone $this; + $self['merchantAcceptorID'] = $merchantAcceptorID; + + return $self; + } + + /** + * The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is transacting with. + */ + public function withMerchantCategoryCode(string $merchantCategoryCode): self + { + $self = clone $this; + $self['merchantCategoryCode'] = $merchantCategoryCode; + + return $self; + } + + /** + * The country the merchant resides in. + */ + public function withMerchantCountry(string $merchantCountry): self + { + $self = clone $this; + $self['merchantCountry'] = $merchantCountry; + + return $self; + } + + /** + * The name of the merchant. + */ + public function withMerchantName(string $merchantName): self + { + $self = clone $this; + $self['merchantName'] = $merchantName; + + return $self; + } + + /** + * The ID of a prior Card Authentication that the requestor used to authenticate this cardholder for a previous transaction. + */ + public function withPriorCardAuthenticationID( + ?string $priorCardAuthenticationID + ): self { + $self = clone $this; + $self['priorCardAuthenticationID'] = $priorCardAuthenticationID; + + return $self; + } + + /** + * The purchase amount in minor units. + */ + public function withPurchaseAmount(?int $purchaseAmount): self + { + $self = clone $this; + $self['purchaseAmount'] = $purchaseAmount; + + return $self; + } + + /** + * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the authentication attempt's purchase currency. + */ + public function withPurchaseCurrency(?string $purchaseCurrency): self + { + $self = clone $this; + $self['purchaseCurrency'] = $purchaseCurrency; + + return $self; + } + + /** + * The 3DS requestor authentication indicator describes why the authentication attempt is performed, such as for a recurring transaction. + * + * @param RequestorAuthenticationIndicator|value-of|null $requestorAuthenticationIndicator + */ + public function withRequestorAuthenticationIndicator( + RequestorAuthenticationIndicator|string|null $requestorAuthenticationIndicator, + ): self { + $self = clone $this; + $self['requestorAuthenticationIndicator'] = $requestorAuthenticationIndicator; + + return $self; + } + + /** + * Indicates whether a challenge is requested for this transaction. + * + * @param RequestorChallengeIndicator|value-of|null $requestorChallengeIndicator + */ + public function withRequestorChallengeIndicator( + RequestorChallengeIndicator|string|null $requestorChallengeIndicator + ): self { + $self = clone $this; + $self['requestorChallengeIndicator'] = $requestorChallengeIndicator; + + return $self; + } + + /** + * The name of the 3DS requestor. + */ + public function withRequestorName(string $requestorName): self + { + $self = clone $this; + $self['requestorName'] = $requestorName; + + return $self; + } + + /** + * The URL of the 3DS requestor. + */ + public function withRequestorURL(string $requestorURL): self + { + $self = clone $this; + $self['requestorURL'] = $requestorURL; + + return $self; + } + + /** + * The city of the shipping address associated with this purchase. + */ + public function withShippingAddressCity(?string $shippingAddressCity): self + { + $self = clone $this; + $self['shippingAddressCity'] = $shippingAddressCity; + + return $self; + } + + /** + * The country of the shipping address associated with this purchase. + */ + public function withShippingAddressCountry( + ?string $shippingAddressCountry + ): self { + $self = clone $this; + $self['shippingAddressCountry'] = $shippingAddressCountry; + + return $self; + } + + /** + * The first line of the shipping address associated with this purchase. + */ + public function withShippingAddressLine1( + ?string $shippingAddressLine1 + ): self { + $self = clone $this; + $self['shippingAddressLine1'] = $shippingAddressLine1; + + return $self; + } + + /** + * The second line of the shipping address associated with this purchase. + */ + public function withShippingAddressLine2( + ?string $shippingAddressLine2 + ): self { + $self = clone $this; + $self['shippingAddressLine2'] = $shippingAddressLine2; + + return $self; + } + + /** + * The third line of the shipping address associated with this purchase. + */ + public function withShippingAddressLine3( + ?string $shippingAddressLine3 + ): self { + $self = clone $this; + $self['shippingAddressLine3'] = $shippingAddressLine3; + + return $self; + } + + /** + * The postal code of the shipping address associated with this purchase. + */ + public function withShippingAddressPostalCode( + ?string $shippingAddressPostalCode + ): self { + $self = clone $this; + $self['shippingAddressPostalCode'] = $shippingAddressPostalCode; + + return $self; + } + + /** + * The US state of the shipping address associated with this purchase. + */ + public function withShippingAddressState( + ?string $shippingAddressState + ): self { + $self = clone $this; + $self['shippingAddressState'] = $shippingAddressState; + + return $self; + } + + /** + * A unique identifier assigned by the 3DS Server initiating the authentication attempt for this transaction. + */ + public function withThreeDSecureServerTransactionID( + string $threeDSecureServerTransactionID + ): self { + $self = clone $this; + $self['threeDSecureServerTransactionID'] = $threeDSecureServerTransactionID; + + return $self; + } + + /** + * The type of transaction being authenticated. + * + * @param TransactionType|value-of|null $transactionType + */ + public function withTransactionType( + TransactionType|string|null $transactionType + ): self { + $self = clone $this; + $self['transactionType'] = $transactionType; + + return $self; + } + /** * The identifier of the Card Payment this authentication attempt will belong to. Available in the API once the card authentication has completed. */ diff --git a/src/RealTimeDecisions/RealTimeDecision/CardAuthentication/Category.php b/src/RealTimeDecisions/RealTimeDecision/CardAuthentication/Category.php new file mode 100644 index 0000000..f9f1233 --- /dev/null +++ b/src/RealTimeDecisions/RealTimeDecision/CardAuthentication/Category.php @@ -0,0 +1,15 @@ +, + * merchantInitiated: null|MerchantInitiated|MerchantInitiatedShape, + * } + */ +final class DeviceChannel implements BaseModel +{ + /** @use SdkModel */ + use SdkModel; + + /** + * Fields specific to the browser device channel. + */ + #[Required] + public ?Browser $browser; + + /** + * The category of the device channel. + * + * @var value-of $category + */ + #[Required( + enum: Category::class, + )] + public string $category; + + /** + * Fields specific to merchant initiated transactions. + */ + #[Required('merchant_initiated')] + public ?MerchantInitiated $merchantInitiated; + + /** + * `new DeviceChannel()` is missing required properties by the API. + * + * To enforce required parameters use + * ``` + * DeviceChannel::with(browser: ..., category: ..., merchantInitiated: ...) + * ``` + * + * Otherwise ensure the following setters are called + * + * ``` + * (new DeviceChannel) + * ->withBrowser(...) + * ->withCategory(...) + * ->withMerchantInitiated(...) + * ``` + */ + 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 Browser|BrowserShape|null $browser + * @param Category|value-of $category + * @param MerchantInitiated|MerchantInitiatedShape|null $merchantInitiated + */ + public static function with( + Browser|array|null $browser, + Category|string $category, + MerchantInitiated|array|null $merchantInitiated, + ): self { + $self = new self; + + $self['browser'] = $browser; + $self['category'] = $category; + $self['merchantInitiated'] = $merchantInitiated; + + return $self; + } + + /** + * Fields specific to the browser device channel. + * + * @param Browser|BrowserShape|null $browser + */ + public function withBrowser(Browser|array|null $browser): self + { + $self = clone $this; + $self['browser'] = $browser; + + return $self; + } + + /** + * The category of the device channel. + * + * @param Category|value-of $category + */ + public function withCategory( + Category|string $category, + ): self { + $self = clone $this; + $self['category'] = $category; + + return $self; + } + + /** + * Fields specific to merchant initiated transactions. + * + * @param MerchantInitiated|MerchantInitiatedShape|null $merchantInitiated + */ + public function withMerchantInitiated( + MerchantInitiated|array|null $merchantInitiated + ): self { + $self = clone $this; + $self['merchantInitiated'] = $merchantInitiated; + + return $self; + } +} diff --git a/src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/Browser.php b/src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/Browser.php new file mode 100644 index 0000000..26a39e9 --- /dev/null +++ b/src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/Browser.php @@ -0,0 +1,172 @@ +, + * language: string|null, + * userAgent: string|null, + * } + */ +final class Browser implements BaseModel +{ + /** @use SdkModel */ + use SdkModel; + + /** + * The accept header from the cardholder's browser. + */ + #[Required('accept_header')] + public ?string $acceptHeader; + + /** + * The IP address of the cardholder's browser. + */ + #[Required('ip_address')] + public ?string $ipAddress; + + /** + * Whether JavaScript is enabled in the cardholder's browser. + * + * @var value-of|null $javascriptEnabled + */ + #[Required('javascript_enabled', enum: JavascriptEnabled::class)] + public ?string $javascriptEnabled; + + /** + * The language of the cardholder's browser. + */ + #[Required] + public ?string $language; + + /** + * The user agent of the cardholder's browser. + */ + #[Required('user_agent')] + public ?string $userAgent; + + /** + * `new Browser()` is missing required properties by the API. + * + * To enforce required parameters use + * ``` + * Browser::with( + * acceptHeader: ..., + * ipAddress: ..., + * javascriptEnabled: ..., + * language: ..., + * userAgent: ..., + * ) + * ``` + * + * Otherwise ensure the following setters are called + * + * ``` + * (new Browser) + * ->withAcceptHeader(...) + * ->withIPAddress(...) + * ->withJavascriptEnabled(...) + * ->withLanguage(...) + * ->withUserAgent(...) + * ``` + */ + 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 JavascriptEnabled|value-of|null $javascriptEnabled + */ + public static function with( + ?string $acceptHeader, + ?string $ipAddress, + JavascriptEnabled|string|null $javascriptEnabled, + ?string $language, + ?string $userAgent, + ): self { + $self = new self; + + $self['acceptHeader'] = $acceptHeader; + $self['ipAddress'] = $ipAddress; + $self['javascriptEnabled'] = $javascriptEnabled; + $self['language'] = $language; + $self['userAgent'] = $userAgent; + + return $self; + } + + /** + * The accept header from the cardholder's browser. + */ + public function withAcceptHeader(?string $acceptHeader): self + { + $self = clone $this; + $self['acceptHeader'] = $acceptHeader; + + return $self; + } + + /** + * The IP address of the cardholder's browser. + */ + public function withIPAddress(?string $ipAddress): self + { + $self = clone $this; + $self['ipAddress'] = $ipAddress; + + return $self; + } + + /** + * Whether JavaScript is enabled in the cardholder's browser. + * + * @param JavascriptEnabled|value-of|null $javascriptEnabled + */ + public function withJavascriptEnabled( + JavascriptEnabled|string|null $javascriptEnabled + ): self { + $self = clone $this; + $self['javascriptEnabled'] = $javascriptEnabled; + + return $self; + } + + /** + * The language of the cardholder's browser. + */ + public function withLanguage(?string $language): self + { + $self = clone $this; + $self['language'] = $language; + + return $self; + } + + /** + * The user agent of the cardholder's browser. + */ + public function withUserAgent(?string $userAgent): self + { + $self = clone $this; + $self['userAgent'] = $userAgent; + + return $self; + } +} diff --git a/src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/Browser/JavascriptEnabled.php b/src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/Browser/JavascriptEnabled.php new file mode 100644 index 0000000..52fc3bc --- /dev/null +++ b/src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/Browser/JavascriptEnabled.php @@ -0,0 +1,15 @@ + + * } + */ +final class MerchantInitiated implements BaseModel +{ + /** @use SdkModel */ + use SdkModel; + + /** + * The merchant initiated indicator for the transaction. + * + * @var value-of $indicator + */ + #[Required(enum: Indicator::class)] + public string $indicator; + + /** + * `new MerchantInitiated()` is missing required properties by the API. + * + * To enforce required parameters use + * ``` + * MerchantInitiated::with(indicator: ...) + * ``` + * + * Otherwise ensure the following setters are called + * + * ``` + * (new MerchantInitiated)->withIndicator(...) + * ``` + */ + 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 Indicator|value-of $indicator + */ + public static function with(Indicator|string $indicator): self + { + $self = new self; + + $self['indicator'] = $indicator; + + return $self; + } + + /** + * The merchant initiated indicator for the transaction. + * + * @param Indicator|value-of $indicator + */ + public function withIndicator(Indicator|string $indicator): self + { + $self = clone $this; + $self['indicator'] = $indicator; + + return $self; + } +} diff --git a/src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/MerchantInitiated/Indicator.php b/src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/MerchantInitiated/Indicator.php new file mode 100644 index 0000000..b8aad71 --- /dev/null +++ b/src/RealTimeDecisions/RealTimeDecision/CardAuthentication/DeviceChannel/MerchantInitiated/Indicator.php @@ -0,0 +1,49 @@ + Date: Fri, 6 Mar 2026 03:28:59 +0000 Subject: [PATCH 2/2] release: 0.59.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ README.md | 2 +- src/Version.php | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2fbefb9..85c3118 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.58.0" + ".": "0.59.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0165aa1..fa35782 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.59.0 (2026-03-06) + +Full Changelog: [v0.58.0...v0.59.0](https://github.com/Increase/increase-php/compare/v0.58.0...v0.59.0) + +### Features + +* **api:** api update ([624fffe](https://github.com/Increase/increase-php/commit/624fffed470d199c69e093ad78e33da38e87fdeb)) + ## 0.58.0 (2026-03-05) Full Changelog: [v0.57.0...v0.58.0](https://github.com/Increase/increase-php/compare/v0.57.0...v0.58.0) diff --git a/README.md b/README.md index 82e9f68..13dedd7 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.58.0" +composer require "increase/increase 0.59.0" ``` diff --git a/src/Version.php b/src/Version.php index 5b7b908..209fca1 100644 --- a/src/Version.php +++ b/src/Version.php @@ -5,5 +5,5 @@ namespace Increase; // x-release-please-start-version -const VERSION = '0.58.0'; +const VERSION = '0.59.0'; // x-release-please-end