From 315f6412c9427233cfe98f7eb3645654a83f5e70 Mon Sep 17 00:00:00 2001 From: xendit-devx-bot Date: Mon, 1 Apr 2024 03:39:38 +0000 Subject: [PATCH] Generated Xendit php SDK --- .openapi-generator/FILES | 9 + README.md | 4 +- composer.json | 2 +- docs/BalanceApi.md | 6 +- docs/PaymentMethod/Card.md | 3 +- docs/PaymentMethod/CardChannelCode.md | 18 + docs/PaymentMethod/CardChannelProperties.md | 1 + docs/PaymentMethod/DirectDebitChannelCode.md | 6 + docs/PaymentMethod/EWalletChannelCode.md | 2 +- .../PaymentMethod/EWalletChannelProperties.md | 1 + docs/PaymentMethod/QRCodeChannelCode.md | 2 + .../PaymentMethod/TokenizedCardInformation.md | 20 +- .../VirtualAccountChannelCode.md | 6 + docs/PaymentRequest/Card.md | 5 +- docs/PaymentRequest/CardChannelCode.md | 18 + docs/PaymentRequest/CardChannelProperties.md | 1 + docs/PaymentRequest/CardInformation.md | 10 +- docs/PaymentRequest/CardParameters.md | 16 + docs/PaymentRequest/DirectDebitChannelCode.md | 36 +- .../DirectDebitChannelProperties.md | 2 +- ...irectDebitChannelPropertiesBankRedirect.md | 1 + docs/PaymentRequest/EWalletChannelCode.md | 2 +- .../EWalletChannelProperties.md | 2 + .../PaymentRequest/PaymentMethodParameters.md | 1 + docs/PaymentRequest/PaymentRequestStatus.md | 2 + docs/PaymentRequest/PaymentSimulation.md | 16 + docs/PaymentRequest/QRCodeChannelCode.md | 4 + .../VirtualAccountChannelCode.md | 2 + docs/PaymentRequestApi.md | 45 ++ lib/BalanceAndTransaction/Balance.php | 2 +- lib/BalanceAndTransaction/BalanceApi.php | 37 +- .../ChannelsCategories.php | 2 +- lib/BalanceAndTransaction/Currency.php | 2 +- lib/BalanceAndTransaction/DateRangeFilter.php | 2 +- lib/BalanceAndTransaction/FeeResponse.php | 4 +- lib/BalanceAndTransaction/LinkItem.php | 2 +- lib/BalanceAndTransaction/ServerError.php | 2 +- lib/BalanceAndTransaction/TransactionApi.php | 6 +- .../TransactionResponse.php | 2 +- .../TransactionResponseType.php | 2 +- .../TransactionStatuses.php | 2 +- .../TransactionTypes.php | 2 +- .../TransactionsResponse.php | 2 +- lib/BalanceAndTransaction/ValidationError.php | 2 +- lib/Configuration.php | 8 +- lib/Customer/CustomerApi.php | 8 +- lib/HeaderSelector.php | 2 +- lib/Invoice/InvoiceApi.php | 8 +- lib/Model/ModelInterface.php | 2 +- lib/ObjectSerializer.php | 2 +- lib/PaymentMethod/BillingInformation.php | 2 +- lib/PaymentMethod/Card.php | 45 +- lib/PaymentMethod/CardChannelCode.php | 78 ++++ lib/PaymentMethod/CardChannelProperties.php | 48 +- lib/PaymentMethod/CardParameters.php | 2 +- .../CardParametersCardInformation.php | 2 +- lib/PaymentMethod/CardVerificationResults.php | 2 +- .../CardVerificationResultsThreeDSecure.php | 2 +- .../CreatePaymentMethod409Response.php | 2 +- .../CreatePaymentMethod503Response.php | 2 +- lib/PaymentMethod/DirectDebit.php | 2 +- lib/PaymentMethod/DirectDebitAllOf.php | 2 +- lib/PaymentMethod/DirectDebitBankAccount.php | 2 +- lib/PaymentMethod/DirectDebitChannelCode.php | 11 +- .../DirectDebitChannelProperties.php | 2 +- lib/PaymentMethod/DirectDebitDebitCard.php | 2 +- lib/PaymentMethod/DirectDebitParameters.php | 2 +- lib/PaymentMethod/DirectDebitType.php | 2 +- lib/PaymentMethod/EWallet.php | 2 +- lib/PaymentMethod/EWalletAccount.php | 2 +- lib/PaymentMethod/EWalletChannelCode.php | 6 +- .../EWalletChannelProperties.php | 45 +- lib/PaymentMethod/EWalletParameters.php | 2 +- .../GetAllPaymentMethods400Response.php | 2 +- .../GetAllPaymentMethods403Response.php | 2 +- .../GetAllPaymentMethods404Response.php | 2 +- .../GetAllPaymentMethodsDefaultResponse.php | 2 +- lib/PaymentMethod/OverTheCounter.php | 2 +- .../OverTheCounterChannelCode.php | 2 +- .../OverTheCounterChannelProperties.php | 2 +- .../OverTheCounterChannelPropertiesUpdate.php | 2 +- .../OverTheCounterParameters.php | 2 +- .../OverTheCounterUpdateParameters.php | 2 +- lib/PaymentMethod/PaymentMethod.php | 2 +- lib/PaymentMethod/PaymentMethodAction.php | 2 +- lib/PaymentMethod/PaymentMethodApi.php | 18 +- .../PaymentMethodAuthParameters.php | 2 +- lib/PaymentMethod/PaymentMethodCallback.php | 2 +- lib/PaymentMethod/PaymentMethodCountry.php | 2 +- .../PaymentMethodExpireParameters.php | 2 +- lib/PaymentMethod/PaymentMethodList.php | 2 +- lib/PaymentMethod/PaymentMethodParameters.php | 2 +- .../PaymentMethodReusability.php | 2 +- lib/PaymentMethod/PaymentMethodStatus.php | 2 +- lib/PaymentMethod/PaymentMethodType.php | 2 +- .../PaymentMethodUpdateParameters.php | 2 +- lib/PaymentMethod/QRCode.php | 2 +- lib/PaymentMethod/QRCodeChannelCode.php | 5 +- lib/PaymentMethod/QRCodeChannelProperties.php | 2 +- lib/PaymentMethod/QRCodeParameters.php | 2 +- lib/PaymentMethod/SimulatePaymentRequest.php | 2 +- .../TokenizedCardInformation.php | 145 +++--- lib/PaymentMethod/VirtualAccount.php | 2 +- lib/PaymentMethod/VirtualAccountAllOf.php | 2 +- .../VirtualAccountAlternativeDisplay.php | 2 +- .../VirtualAccountChannelCode.php | 11 +- .../VirtualAccountChannelProperties.php | 2 +- .../VirtualAccountChannelPropertiesPatch.php | 2 +- .../VirtualAccountParameters.php | 2 +- .../VirtualAccountUpdateParameters.php | 2 +- lib/PaymentRequest/Capture.php | 2 +- lib/PaymentRequest/CaptureListResponse.php | 2 +- lib/PaymentRequest/CaptureParameters.php | 2 +- lib/PaymentRequest/Card.php | 52 ++- lib/PaymentRequest/CardChannelCode.php | 78 ++++ lib/PaymentRequest/CardChannelProperties.php | 48 +- lib/PaymentRequest/CardInformation.php | 110 +++-- lib/PaymentRequest/CardParameters.php | 439 ++++++++++++++++++ .../CardVerificationResults.php | 2 +- .../CardVerificationResultsThreeDSecure.php | 2 +- lib/PaymentRequest/DirectDebit.php | 2 +- lib/PaymentRequest/DirectDebitAllOf.php | 2 +- lib/PaymentRequest/DirectDebitBankAccount.php | 2 +- lib/PaymentRequest/DirectDebitChannelCode.php | 57 ++- .../DirectDebitChannelProperties.php | 84 ++-- ...irectDebitChannelPropertiesBankAccount.php | 2 +- ...rectDebitChannelPropertiesBankRedirect.php | 38 +- .../DirectDebitChannelPropertiesDebitCard.php | 2 +- lib/PaymentRequest/DirectDebitDebitCard.php | 2 +- lib/PaymentRequest/DirectDebitParameters.php | 2 +- lib/PaymentRequest/DirectDebitType.php | 2 +- lib/PaymentRequest/EWallet.php | 2 +- lib/PaymentRequest/EWalletAccount.php | 2 +- lib/PaymentRequest/EWalletAllOf.php | 2 +- lib/PaymentRequest/EWalletChannelCode.php | 6 +- .../EWalletChannelProperties.php | 91 +++- lib/PaymentRequest/EWalletParameters.php | 2 +- lib/PaymentRequest/Error.php | 2 +- lib/PaymentRequest/InvoicePartnerMetadata.php | 2 +- lib/PaymentRequest/OverTheCounter.php | 2 +- .../OverTheCounterChannelCode.php | 2 +- .../OverTheCounterChannelProperties.php | 2 +- .../OverTheCounterParameters.php | 2 +- lib/PaymentRequest/PaymentCallback.php | 2 +- lib/PaymentRequest/PaymentCallbackData.php | 2 +- lib/PaymentRequest/PaymentMethod.php | 2 +- .../PaymentMethodParameters.php | 43 +- .../PaymentMethodReusability.php | 2 +- lib/PaymentRequest/PaymentMethodStatus.php | 2 +- lib/PaymentRequest/PaymentMethodType.php | 2 +- lib/PaymentRequest/PaymentRequest.php | 2 +- lib/PaymentRequest/PaymentRequestAction.php | 2 +- lib/PaymentRequest/PaymentRequestApi.php | 268 ++++++++++- .../PaymentRequestAuthParameters.php | 2 +- .../PaymentRequestBasketItem.php | 2 +- .../PaymentRequestCaptureMethod.php | 2 +- .../PaymentRequestCardVerificationResults.php | 2 +- ...tCardVerificationResultsThreeDeeSecure.php | 2 +- .../PaymentRequestChannelProperties.php | 2 +- lib/PaymentRequest/PaymentRequestCountry.php | 2 +- lib/PaymentRequest/PaymentRequestCurrency.php | 2 +- .../PaymentRequestInitiator.php | 2 +- .../PaymentRequestListResponse.php | 2 +- .../PaymentRequestParameters.php | 2 +- ...mentRequestParametersChannelProperties.php | 2 +- ...equestParametersChannelPropertiesAllOf.php | 2 +- .../PaymentRequestShippingInformation.php | 2 +- lib/PaymentRequest/PaymentRequestStatus.php | 5 +- lib/PaymentRequest/PaymentSimulation.php | 436 +++++++++++++++++ lib/PaymentRequest/QRCode.php | 2 +- lib/PaymentRequest/QRCodeChannelCode.php | 8 +- .../QRCodeChannelProperties.php | 2 +- lib/PaymentRequest/QRCodeParameters.php | 2 +- lib/PaymentRequest/VirtualAccount.php | 2 +- lib/PaymentRequest/VirtualAccountAllOf.php | 2 +- .../VirtualAccountAlternativeDisplay.php | 2 +- .../VirtualAccountChannelCode.php | 5 +- .../VirtualAccountChannelProperties.php | 2 +- .../VirtualAccountParameters.php | 2 +- lib/Payout/PayoutApi.php | 10 +- lib/Refund/RefundApi.php | 8 +- lib/XenditSdkException.php | 2 +- 182 files changed, 2373 insertions(+), 377 deletions(-) create mode 100644 docs/PaymentMethod/CardChannelCode.md create mode 100644 docs/PaymentRequest/CardChannelCode.md create mode 100644 docs/PaymentRequest/CardParameters.md create mode 100644 docs/PaymentRequest/PaymentSimulation.md create mode 100644 lib/PaymentMethod/CardChannelCode.php create mode 100644 lib/PaymentRequest/CardChannelCode.php create mode 100644 lib/PaymentRequest/CardParameters.php create mode 100644 lib/PaymentRequest/PaymentSimulation.php diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 108ad54..61731dd 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -9,8 +9,10 @@ docs/PaymentRequest/Capture.md docs/PaymentRequest/CaptureListResponse.md docs/PaymentRequest/CaptureParameters.md docs/PaymentRequest/Card.md +docs/PaymentRequest/CardChannelCode.md docs/PaymentRequest/CardChannelProperties.md docs/PaymentRequest/CardInformation.md +docs/PaymentRequest/CardParameters.md docs/PaymentRequest/CardVerificationResults.md docs/PaymentRequest/CardVerificationResultsThreeDSecure.md docs/PaymentRequest/DirectDebit.md @@ -60,6 +62,7 @@ docs/PaymentRequest/PaymentRequestParametersChannelProperties.md docs/PaymentRequest/PaymentRequestParametersChannelPropertiesAllOf.md docs/PaymentRequest/PaymentRequestShippingInformation.md docs/PaymentRequest/PaymentRequestStatus.md +docs/PaymentRequest/PaymentSimulation.md docs/PaymentRequest/QRCode.md docs/PaymentRequest/QRCodeChannelCode.md docs/PaymentRequest/QRCodeChannelProperties.md @@ -80,8 +83,10 @@ lib/PaymentRequest/Capture.php lib/PaymentRequest/CaptureListResponse.php lib/PaymentRequest/CaptureParameters.php lib/PaymentRequest/Card.php +lib/PaymentRequest/CardChannelCode.php lib/PaymentRequest/CardChannelProperties.php lib/PaymentRequest/CardInformation.php +lib/PaymentRequest/CardParameters.php lib/PaymentRequest/CardVerificationResults.php lib/PaymentRequest/CardVerificationResultsThreeDSecure.php lib/PaymentRequest/DirectDebit.php @@ -132,6 +137,7 @@ lib/PaymentRequest/PaymentRequestParametersChannelProperties.php lib/PaymentRequest/PaymentRequestParametersChannelPropertiesAllOf.php lib/PaymentRequest/PaymentRequestShippingInformation.php lib/PaymentRequest/PaymentRequestStatus.php +lib/PaymentRequest/PaymentSimulation.php lib/PaymentRequest/QRCode.php lib/PaymentRequest/QRCodeChannelCode.php lib/PaymentRequest/QRCodeChannelProperties.php @@ -148,8 +154,10 @@ test/Api/PaymentRequestApiTest.php test/Model/PaymentRequest/CaptureListResponseTest.php test/Model/PaymentRequest/CaptureParametersTest.php test/Model/PaymentRequest/CaptureTest.php +test/Model/PaymentRequest/CardChannelCodeTest.php test/Model/PaymentRequest/CardChannelPropertiesTest.php test/Model/PaymentRequest/CardInformationTest.php +test/Model/PaymentRequest/CardParametersTest.php test/Model/PaymentRequest/CardTest.php test/Model/PaymentRequest/CardVerificationResultsTest.php test/Model/PaymentRequest/CardVerificationResultsThreeDSecureTest.php @@ -200,6 +208,7 @@ test/Model/PaymentRequest/PaymentRequestParametersTest.php test/Model/PaymentRequest/PaymentRequestShippingInformationTest.php test/Model/PaymentRequest/PaymentRequestStatusTest.php test/Model/PaymentRequest/PaymentRequestTest.php +test/Model/PaymentRequest/PaymentSimulationTest.php test/Model/PaymentRequest/QRCodeChannelCodeTest.php test/Model/PaymentRequest/QRCodeChannelPropertiesTest.php test/Model/PaymentRequest/QRCodeParametersTest.php diff --git a/README.md b/README.md index 04ec8e1..53c0788 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The official Xendit PHP SDK provides a simple and convenient way to call Xendit's REST API in applications written in PHP. -* Package version: 4.3.0 +* Package version: 5.0.0 # Getting Started @@ -28,7 +28,7 @@ To install the bindings via [Composer](https://getcomposer.org/), add the follow } ], "require": { - "xendit/xendit-php": "4.3.0" + "xendit/xendit-php": "5.0.0" } } ``` diff --git a/composer.json b/composer.json index 8a1ba93..83b97e6 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "xendit/xendit-php", - "version": "4.3.0", + "version": "5.0.0", "description": "Xendit PHP SDK", "keywords": [ "openapitools", diff --git a/docs/BalanceApi.md b/docs/BalanceApi.md index c7d8925..ab0556e 100644 --- a/docs/BalanceApi.md +++ b/docs/BalanceApi.md @@ -26,7 +26,7 @@ All URIs are relative to https://api.xendit.co, except if the operation defines ## `getBalance()` Function ```php -getBalance($account_type, $currency, $for_user_id): \BalanceAndTransaction\Balance +getBalance($account_type, $currency, $at_timestamp, $for_user_id): \BalanceAndTransaction\Balance ``` Retrieves balances for a business, default to CASH type @@ -44,6 +44,7 @@ Retrieves balances for a business, default to CASH type |-------------|:-------------:|:-------------:|-------------| | **account_type** | **string** | | ['CASH'] | | **currency** | **string** | | | +| **at_timestamp** | **\DateTime** | | | | **for_user_id** | **string** | | | ### Usage Example @@ -59,10 +60,11 @@ Configuration::setXenditKey("YOUR_API_KEY_HERE"); $apiInstance = new BalanceApi(); $account_type = "CASH"; // string | The selected balance type $currency = "IDR"; // string | Currency for filter for customers with multi currency accounts +$at_timestamp = 2020-06-19T00:00+07:00; // \DateTime | The timestamp you want to use as the limit for balance retrieval $for_user_id = "5dbf20d7c8eb0c0896f811b6"; // string | The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information try { - $result = $apiInstance->getBalance($account_type, $currency, $for_user_id); + $result = $apiInstance->getBalance($account_type, $currency, $at_timestamp, $for_user_id); print_r($result); } catch (\Xendit\XenditSdkException $e) { echo 'Exception when calling BalanceApi->getBalance: ', $e->getMessage(), PHP_EOL; diff --git a/docs/PaymentMethod/Card.md b/docs/PaymentMethod/Card.md index 30f1873..19b947c 100644 --- a/docs/PaymentMethod/Card.md +++ b/docs/PaymentMethod/Card.md @@ -9,7 +9,8 @@ use Xendit\PaymentMethod\Card; | Name | Type | Required | Description | Examples | |------------|:-------------:|:-------------:|-------------|:-------------:| -| **currency** | **string** | ☑️ | | null | +| **channel_code** | [**CardChannelCode**](CardChannelCode.md) | | | null | +| **currency** | **string** | | | null | | **channel_properties** | [**CardChannelProperties**](CardChannelProperties.md) | ☑️ | | null | | **card_information** | [**TokenizedCardInformation**](TokenizedCardInformation.md) | | | null | | **card_verification_results** | [**CardVerificationResults**](CardVerificationResults.md) | | | null | diff --git a/docs/PaymentMethod/CardChannelCode.md b/docs/PaymentMethod/CardChannelCode.md new file mode 100644 index 0000000..e28544b --- /dev/null +++ b/docs/PaymentMethod/CardChannelCode.md @@ -0,0 +1,18 @@ +# # CardChannelCode +Card Channel Code + +```php +use Xendit\PaymentMethod\CardChannelCode; +``` + + + ## Enum + + + * `GPN` (value: `'GPN'`) + + * `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`) + +If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM. + +[[Back to README]](../../README.md) diff --git a/docs/PaymentMethod/CardChannelProperties.md b/docs/PaymentMethod/CardChannelProperties.md index 3e0a2f5..18b529b 100644 --- a/docs/PaymentMethod/CardChannelProperties.md +++ b/docs/PaymentMethod/CardChannelProperties.md @@ -13,6 +13,7 @@ use Xendit\PaymentMethod\CardChannelProperties; | **success_return_url** | **string** | | URL where the end-customer is redirected if the authorization is successful | https://webhook.site/f4b755f5-4770-4a11-8c72-cc0b3cc6b882 | | **failure_return_url** | **string** | | URL where the end-customer is redirected if the authorization failed | https://webhook.site/f4b755f5-4770-4a11-8c72-cc0b3cc6b882 | | **cardonfile_type** | **string** | | Type of “credential-on-file” / “card-on-file” payment being made. Indicate that this payment uses a previously linked Payment Method for charging. | RECURRING | +| **expires_at** | **\DateTime** | | | null | [[Back to README]](../../README.md) diff --git a/docs/PaymentMethod/DirectDebitChannelCode.md b/docs/PaymentMethod/DirectDebitChannelCode.md index 6b94589..6fb0ae5 100644 --- a/docs/PaymentMethod/DirectDebitChannelCode.md +++ b/docs/PaymentMethod/DirectDebitChannelCode.md @@ -17,6 +17,10 @@ use Xendit\PaymentMethod\DirectDebitChannelCode; * `BPI` (value: `'BPI'`) + * `AUTODEBIT_BPI` (value: `'AUTODEBIT_BPI'`) + + * `BPI_RECURRING` (value: `'BPI_RECURRING'`) + * `BRI` (value: `'BRI'`) * `BNI` (value: `'BNI'`) @@ -55,6 +59,8 @@ use Xendit\PaymentMethod\DirectDebitChannelCode; * `AUTODEBIT_UBP` (value: `'AUTODEBIT_UBP'`) + * `UBP_DEBIT_PULL` (value: `'UBP_DEBIT_PULL'`) + * `AFFIN_FPX` (value: `'AFFIN_FPX'`) * `AGRO_FPX` (value: `'AGRO_FPX'`) diff --git a/docs/PaymentMethod/EWalletChannelCode.md b/docs/PaymentMethod/EWalletChannelCode.md index 22dbe21..56fc628 100644 --- a/docs/PaymentMethod/EWalletChannelCode.md +++ b/docs/PaymentMethod/EWalletChannelCode.md @@ -49,7 +49,7 @@ use Xendit\PaymentMethod\EWalletChannelCode; * `ALIPAY` (value: `'ALIPAY'`) - * `TOUCHANDGO` (value: `'TOUCHANDGO'`) + * `TOUCHNGO` (value: `'TOUCHNGO'`) * `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`) diff --git a/docs/PaymentMethod/EWalletChannelProperties.md b/docs/PaymentMethod/EWalletChannelProperties.md index e6eb95f..0f516ef 100644 --- a/docs/PaymentMethod/EWalletChannelProperties.md +++ b/docs/PaymentMethod/EWalletChannelProperties.md @@ -12,6 +12,7 @@ use Xendit\PaymentMethod\EWalletChannelProperties; | **success_return_url** | **string** | | URL where the end-customer is redirected if the authorization is successful | https://webhook.site/f4b755f5-4770-4a11-8c72-cc0b3cc6b882 | | **failure_return_url** | **string** | | URL where the end-customer is redirected if the authorization failed | https://webhook.site/f4b755f5-4770-4a11-8c72-cc0b3cc6b882 | | **cancel_return_url** | **string** | | URL where the end-customer is redirected if the authorization cancelled | https://webhook.site/f4b755f5-4770-4a11-8c72-cc0b3cc6b882 | +| **pending_return_url** | **string** | | URL where the end-customer is redirected if the authorization is pending | https://webhook.site/f4b755f5-4770-4a11-8c72-cc0b3cc6b882 | | **mobile_number** | **string** | | Mobile number of customer in E.164 format (e.g. +628123123123). For OVO one time payment use only. | +628123123123 | | **redeem_points** | **string** | | REDEEM_NONE will not use any point, REDEEM_ALL will use all available points before cash balance is used. For OVO and ShopeePay tokenized payment use only. | REDEEM_NONE | | **cashtag** | **string** | | Available for JENIUSPAY only | $abc1234 | diff --git a/docs/PaymentMethod/QRCodeChannelCode.md b/docs/PaymentMethod/QRCodeChannelCode.md index 52a0453..7b4f2f1 100644 --- a/docs/PaymentMethod/QRCodeChannelCode.md +++ b/docs/PaymentMethod/QRCodeChannelCode.md @@ -19,6 +19,8 @@ use Xendit\PaymentMethod\QRCodeChannelCode; * `LINKAJA` (value: `'LINKAJA'`) + * `XENDIT` (value: `'XENDIT'`) + * `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`) If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM. diff --git a/docs/PaymentMethod/TokenizedCardInformation.md b/docs/PaymentMethod/TokenizedCardInformation.md index a581958..04e5cec 100644 --- a/docs/PaymentMethod/TokenizedCardInformation.md +++ b/docs/PaymentMethod/TokenizedCardInformation.md @@ -9,16 +9,18 @@ use Xendit\PaymentMethod\TokenizedCardInformation; | Name | Type | Required | Description | Examples | |------------|:-------------:|:-------------:|-------------|:-------------:| -| **token_id** | **string** | ☑️ | | null | -| **masked_card_number** | **string** | ☑️ | 1st 6 and last 4 digits of the card | null | +| **token_id** | **string** | | | null | +| **masked_card_number** | **string** | | 1st 6 and last 4 digits of the card | null | | **cardholder_name** | **string** | | Cardholder name is optional but recommended for 3DS 2 / AVS verification | null | -| **expiry_month** | **string** | ☑️ | Card expiry month in MM format | null | -| **expiry_year** | **string** | ☑️ | Card expiry month in YY format | null | -| **fingerprint** | **string** | ☑️ | Xendit-generated identifier for the unique card number. Multiple payment method objects can be created for the same account - e.g. if the user first creates a one-time payment request, and then later on creates a multiple-use payment method using the same account. The fingerprint helps to identify the unique account being used. | null | -| **type** | **string** | ☑️ | Whether the card is a credit or debit card | null | -| **network** | **string** | ☑️ | Card network - VISA, MASTERCARD, JCB, AMEX, DISCOVER, BCA | null | -| **country** | **string** | ☑️ | Country where the card was issued ISO 3166-1 Alpha-2 | null | -| **issuer** | **string** | ☑️ | Issuer of the card, most often an issuing bank For example, “BCA”, “MANDIRI” | null | +| **expiry_month** | **string** | | Card expiry month in MM format | null | +| **expiry_year** | **string** | | Card expiry month in YY format | null | +| **fingerprint** | **string** | | Xendit-generated identifier for the unique card number. Multiple payment method objects can be created for the same account - e.g. if the user first creates a one-time payment request, and then later on creates a multiple-use payment method using the same account. The fingerprint helps to identify the unique account being used. | null | +| **type** | **string** | | Whether the card is a credit or debit card | null | +| **network** | **string** | | Card network - VISA, MASTERCARD, JCB, AMEX, DISCOVER, BCA | null | +| **country** | **string** | | Country where the card was issued ISO 3166-1 Alpha-2 | null | +| **issuer** | **string** | | Issuer of the card, most often an issuing bank For example, “BCA”, “MANDIRI” | null | +| **card_number** | **string** | | | null | +| **one_time_token** | **string** | | | null | [[Back to README]](../../README.md) diff --git a/docs/PaymentMethod/VirtualAccountChannelCode.md b/docs/PaymentMethod/VirtualAccountChannelCode.md index 520530f..e553184 100644 --- a/docs/PaymentMethod/VirtualAccountChannelCode.md +++ b/docs/PaymentMethod/VirtualAccountChannelCode.md @@ -41,6 +41,12 @@ use Xendit\PaymentMethod\VirtualAccountChannelCode; * `AMBANK` (value: `'AMBANK'`) + * `BNC` (value: `'BNC'`) + + * `HANA` (value: `'HANA'`) + + * `MUAMALAT` (value: `'MUAMALAT'`) + * `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`) If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM. diff --git a/docs/PaymentRequest/Card.md b/docs/PaymentRequest/Card.md index d080325..342223b 100644 --- a/docs/PaymentRequest/Card.md +++ b/docs/PaymentRequest/Card.md @@ -9,9 +9,10 @@ use Xendit\PaymentRequest\Card; | Name | Type | Required | Description | Examples | |------------|:-------------:|:-------------:|-------------|:-------------:| -| **currency** | [**PaymentRequestCurrency**](PaymentRequestCurrency.md) | ☑️ | | null | +| **channel_code** | [**CardChannelCode**](CardChannelCode.md) | | | null | +| **currency** | [**PaymentRequestCurrency**](PaymentRequestCurrency.md) | | | null | | **channel_properties** | [**CardChannelProperties**](CardChannelProperties.md) | ☑️ | | null | -| **card_information** | [**CardInformation**](CardInformation.md) | ☑️ | | null | +| **card_information** | [**CardInformation**](CardInformation.md) | | | null | | **card_verification_results** | [**CardVerificationResults**](CardVerificationResults.md) | | | null | diff --git a/docs/PaymentRequest/CardChannelCode.md b/docs/PaymentRequest/CardChannelCode.md new file mode 100644 index 0000000..e45d2f7 --- /dev/null +++ b/docs/PaymentRequest/CardChannelCode.md @@ -0,0 +1,18 @@ +# # CardChannelCode +Card Channel Code + +```php +use Xendit\PaymentRequest\CardChannelCode; +``` + + + ## Enum + + + * `GPN` (value: `'GPN'`) + + * `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`) + +If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM. + +[[Back to README]](../../README.md) diff --git a/docs/PaymentRequest/CardChannelProperties.md b/docs/PaymentRequest/CardChannelProperties.md index 79225aa..ea3c9c5 100644 --- a/docs/PaymentRequest/CardChannelProperties.md +++ b/docs/PaymentRequest/CardChannelProperties.md @@ -14,6 +14,7 @@ use Xendit\PaymentRequest\CardChannelProperties; | **failure_return_url** | **string** | | URL where the end-customer is redirected if the authorization failed | https://webhook.site/f4b755f5-4770-4a11-8c72-cc0b3cc6b882 | | **cardonfile_type** | **string** | | Type of “credential-on-file” / “card-on-file” payment being made. Indicate that this payment uses a previously linked Payment Method for charging. | RECURRING | | **merchant_id_tag** | **string** | | Tag for a Merchant ID that you want to associate this payment with. For merchants using their own MIDs to specify which MID they want to use | null | +| **expires_at** | **\DateTime** | | | null | [[Back to README]](../../README.md) diff --git a/docs/PaymentRequest/CardInformation.md b/docs/PaymentRequest/CardInformation.md index c4ee8ee..2ff7a63 100644 --- a/docs/PaymentRequest/CardInformation.md +++ b/docs/PaymentRequest/CardInformation.md @@ -9,16 +9,18 @@ use Xendit\PaymentRequest\CardInformation; | Name | Type | Required | Description | Examples | |------------|:-------------:|:-------------:|-------------|:-------------:| -| **token_id** | **string** | ☑️ | | null | -| **masked_card_number** | **string** | ☑️ | 1st 6 and last 4 digits of the card | null | -| **expiry_month** | **string** | ☑️ | Card expiry month in MM format | null | -| **expiry_year** | **string** | ☑️ | Card expiry month in YY format | null | +| **token_id** | **string** | | | null | +| **masked_card_number** | **string** | | 1st 6 and last 4 digits of the card | null | +| **expiry_month** | **string** | | Card expiry month in MM format | null | +| **expiry_year** | **string** | | Card expiry month in YY format | null | | **cardholder_name** | **string** | | Cardholder name | null | | **fingerprint** | **string** | | | null | | **type** | **string** | | | null | | **network** | **string** | | | null | | **country** | **string** | | | null | | **issuer** | **string** | | | null | +| **card_number** | **string** | | | null | +| **one_time_token** | **string** | | | null | [[Back to README]](../../README.md) diff --git a/docs/PaymentRequest/CardParameters.md b/docs/PaymentRequest/CardParameters.md new file mode 100644 index 0000000..ed91984 --- /dev/null +++ b/docs/PaymentRequest/CardParameters.md @@ -0,0 +1,16 @@ +# # CardParameters + + +```php +use Xendit\PaymentRequest\CardParameters; +``` + +## Properties + +| Name | Type | Required | Description | Examples | +|------------|:-------------:|:-------------:|-------------|:-------------:| +| **channel_properties** | [**CardChannelProperties**](CardChannelProperties.md) | ☑️ | | null | +| **card_information** | [**CardInformation**](CardInformation.md) | | | null | + + +[[Back to README]](../../README.md) diff --git a/docs/PaymentRequest/DirectDebitChannelCode.md b/docs/PaymentRequest/DirectDebitChannelCode.md index 1585a08..4daa2c2 100644 --- a/docs/PaymentRequest/DirectDebitChannelCode.md +++ b/docs/PaymentRequest/DirectDebitChannelCode.md @@ -21,6 +21,8 @@ use Xendit\PaymentRequest\DirectDebitChannelCode; * `BPI` (value: `'BPI'`) + * `BPI_RECURRING` (value: `'BPI_RECURRING'`) + * `BDO` (value: `'BDO'`) * `CIMBNIAGA` (value: `'CIMBNIAGA'`) @@ -31,7 +33,9 @@ use Xendit\PaymentRequest\DirectDebitChannelCode; * `UBP` (value: `'UBP'`) - * `AUTODEBIT_UBP` (value: `'AUTODEBIT_UBP'`) + * `UBP_EADA` (value: `'UBP_EADA'`) + + * `UBP_DEBIT_PULL` (value: `'UBP_DEBIT_PULL'`) * `CHINABANK` (value: `'CHINABANK'`) @@ -135,6 +139,36 @@ use Xendit\PaymentRequest\DirectDebitChannelCode; * `UOB_FPX_BUSINESS` (value: `'UOB_FPX_BUSINESS'`) + * `BDO_ONLINE_BANKING` (value: `'BDO_ONLINE_BANKING'`) + + * `BPI_ONLINE_BANKING` (value: `'BPI_ONLINE_BANKING'`) + + * `UNIONBANK_ONLINE_BANKING` (value: `'UNIONBANK_ONLINE_BANKING'`) + + * `BOC_ONLINE_BANKING` (value: `'BOC_ONLINE_BANKING'`) + + * `CHINABANK_ONLINE_BANKING` (value: `'CHINABANK_ONLINE_BANKING'`) + + * `INSTAPAY_ONLINE_BANKING` (value: `'INSTAPAY_ONLINE_BANKING'`) + + * `LANDBANK_ONLINE_BANKING` (value: `'LANDBANK_ONLINE_BANKING'`) + + * `MAYBANK_ONLINE_BANKING` (value: `'MAYBANK_ONLINE_BANKING'`) + + * `METROBANK_ONLINE_BANKING` (value: `'METROBANK_ONLINE_BANKING'`) + + * `PNB_ONLINE_BANKING` (value: `'PNB_ONLINE_BANKING'`) + + * `PSBANK_ONLINE_BANKING` (value: `'PSBANK_ONLINE_BANKING'`) + + * `PESONET_ONLINE_BANKING` (value: `'PESONET_ONLINE_BANKING'`) + + * `RCBC_ONLINE_BANKING` (value: `'RCBC_ONLINE_BANKING'`) + + * `ROBINSONS_BANK_ONLINE_BANKING` (value: `'ROBINSONS_BANK_ONLINE_BANKING'`) + + * `SECURITY_BANK_ONLINE_BANKING` (value: `'SECURITY_BANK_ONLINE_BANKING'`) + * `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`) If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM. diff --git a/docs/PaymentRequest/DirectDebitChannelProperties.md b/docs/PaymentRequest/DirectDebitChannelProperties.md index 962246b..eb71864 100644 --- a/docs/PaymentRequest/DirectDebitChannelProperties.md +++ b/docs/PaymentRequest/DirectDebitChannelProperties.md @@ -9,6 +9,7 @@ use Xendit\PaymentRequest\DirectDebitChannelProperties; | Name | Type | Required | Description | Examples | |------------|:-------------:|:-------------:|-------------|:-------------:| +| **email** | **string** | | Email address of the customer that is registered to the partner channel | test.email@xendit.co | | **mobile_number** | **string** | | Mobile number of the customer registered to the partner channel | +62818555988 | | **success_return_url** | **string** | | | null | | **failure_return_url** | **string** | | | null | @@ -16,7 +17,6 @@ use Xendit\PaymentRequest\DirectDebitChannelProperties; | **account_number** | **string** | | | 1234567890 | | **card_last_four** | **string** | | Last four digits of the debit card | 8888 | | **card_expiry** | **string** | | Expiry month and year of the debit card (in MM/YY format) | 06/24 | -| **email** | **string** | | Email address of the customer that is registered to the partner channel | test.email@xendit.co | [[Back to README]](../../README.md) diff --git a/docs/PaymentRequest/DirectDebitChannelPropertiesBankRedirect.md b/docs/PaymentRequest/DirectDebitChannelPropertiesBankRedirect.md index ab4aee6..d179ad2 100644 --- a/docs/PaymentRequest/DirectDebitChannelPropertiesBankRedirect.md +++ b/docs/PaymentRequest/DirectDebitChannelPropertiesBankRedirect.md @@ -9,6 +9,7 @@ use Xendit\PaymentRequest\DirectDebitChannelPropertiesBankRedirect; | Name | Type | Required | Description | Examples | |------------|:-------------:|:-------------:|-------------|:-------------:| +| **email** | **string** | | | null | | **mobile_number** | **string** | | Mobile number of the customer that is registered to channel | null | | **success_return_url** | **string** | | | null | | **failure_return_url** | **string** | | | null | diff --git a/docs/PaymentRequest/EWalletChannelCode.md b/docs/PaymentRequest/EWalletChannelCode.md index 5c7b0db..64c8784 100644 --- a/docs/PaymentRequest/EWalletChannelCode.md +++ b/docs/PaymentRequest/EWalletChannelCode.md @@ -47,7 +47,7 @@ use Xendit\PaymentRequest\EWalletChannelCode; * `ALIPAY` (value: `'ALIPAY'`) - * `TOUCHANDGO` (value: `'TOUCHANDGO'`) + * `TOUCHNGO` (value: `'TOUCHNGO'`) * `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`) diff --git a/docs/PaymentRequest/EWalletChannelProperties.md b/docs/PaymentRequest/EWalletChannelProperties.md index 2d53f17..e5fb15b 100644 --- a/docs/PaymentRequest/EWalletChannelProperties.md +++ b/docs/PaymentRequest/EWalletChannelProperties.md @@ -10,11 +10,13 @@ use Xendit\PaymentRequest\EWalletChannelProperties; | Name | Type | Required | Description | Examples | |------------|:-------------:|:-------------:|-------------|:-------------:| | **success_return_url** | **string** | | URL where the end-customer is redirected if the authorization is successful | https://webhook.site/f4b755f5-4770-4a11-8c72-cc0b3cc6b882 | +| **pending_return_url** | **string** | | URL where the end-customer is redirected if the authorization is successful | https://webhook.site/f4b755f5-4770-4a11-8c72-cc0b3cc6b882 | | **failure_return_url** | **string** | | URL where the end-customer is redirected if the authorization failed | https://webhook.site/f4b755f5-4770-4a11-8c72-cc0b3cc6b882 | | **cancel_return_url** | **string** | | URL where the end-customer is redirected if the authorization cancelled | https://webhook.site/f4b755f5-4770-4a11-8c72-cc0b3cc6b882 | | **redeem_points** | **string** | | REDEEM_NONE will not use any point, REDEEM_ALL will use all available points before cash balance is used. For OVO and ShopeePay tokenized payment use only. | REDEEM_NONE | | **mobile_number** | **string** | | | null | | **cashtag** | **string** | | | null | +| **promotion_label** | **string** | | | null | [[Back to README]](../../README.md) diff --git a/docs/PaymentRequest/PaymentMethodParameters.md b/docs/PaymentRequest/PaymentMethodParameters.md index 193a189..ef5d5f0 100644 --- a/docs/PaymentRequest/PaymentMethodParameters.md +++ b/docs/PaymentRequest/PaymentMethodParameters.md @@ -13,6 +13,7 @@ use Xendit\PaymentRequest\PaymentMethodParameters; | **reusability** | [**PaymentMethodReusability**](PaymentMethodReusability.md) | ☑️ | | null | | **description** | **string** | | | null | | **reference_id** | **string** | | | null | +| **card** | [**CardParameters**](CardParameters.md) | | | null | | **direct_debit** | [**DirectDebitParameters**](DirectDebitParameters.md) | | | null | | **ewallet** | [**EWalletParameters**](EWalletParameters.md) | | | null | | **over_the_counter** | [**OverTheCounterParameters**](OverTheCounterParameters.md) | | | null | diff --git a/docs/PaymentRequest/PaymentRequestStatus.md b/docs/PaymentRequest/PaymentRequestStatus.md index ad8b7fd..df7e720 100644 --- a/docs/PaymentRequest/PaymentRequestStatus.md +++ b/docs/PaymentRequest/PaymentRequestStatus.md @@ -25,6 +25,8 @@ use Xendit\PaymentRequest\PaymentRequestStatus; * `AWAITING_CAPTURE` (value: `'AWAITING_CAPTURE'`) + * `EXPIRED` (value: `'EXPIRED'`) + * `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`) If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM. diff --git a/docs/PaymentRequest/PaymentSimulation.md b/docs/PaymentRequest/PaymentSimulation.md new file mode 100644 index 0000000..95d7bc2 --- /dev/null +++ b/docs/PaymentRequest/PaymentSimulation.md @@ -0,0 +1,16 @@ +# # PaymentSimulation + + +```php +use Xendit\PaymentRequest\PaymentSimulation; +``` + +## Properties + +| Name | Type | Required | Description | Examples | +|------------|:-------------:|:-------------:|-------------|:-------------:| +| **status** | **string** | | | null | +| **message** | **string** | | | null | + + +[[Back to README]](../../README.md) diff --git a/docs/PaymentRequest/QRCodeChannelCode.md b/docs/PaymentRequest/QRCodeChannelCode.md index ee0cfc2..677db30 100644 --- a/docs/PaymentRequest/QRCodeChannelCode.md +++ b/docs/PaymentRequest/QRCodeChannelCode.md @@ -19,6 +19,10 @@ use Xendit\PaymentRequest\QRCodeChannelCode; * `PROMPTPAY` (value: `'PROMPTPAY'`) + * `XENDIT` (value: `'XENDIT'`) + + * `QRPH` (value: `'QRPH'`) + * `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`) If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM. diff --git a/docs/PaymentRequest/VirtualAccountChannelCode.md b/docs/PaymentRequest/VirtualAccountChannelCode.md index f45cedc..f8773b7 100644 --- a/docs/PaymentRequest/VirtualAccountChannelCode.md +++ b/docs/PaymentRequest/VirtualAccountChannelCode.md @@ -47,6 +47,8 @@ use Xendit\PaymentRequest\VirtualAccountChannelCode; * `MUAMALAT` (value: `'MUAMALAT'`) + * `BANK_TRANSFER` (value: `'BANK_TRANSFER'`) + * `XENDIT_ENUM_DEFAULT_FALLBACK` (value: `UNKNOWN_ENUM_VALUE`) If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM. diff --git a/docs/PaymentRequestApi.md b/docs/PaymentRequestApi.md index c54d838..0e8ff03 100644 --- a/docs/PaymentRequestApi.md +++ b/docs/PaymentRequestApi.md @@ -27,6 +27,7 @@ All URIs are relative to https://api.xendit.co, except if the operation defines | [**capturePaymentRequest()**](PaymentRequestApi.md#capturepaymentrequest-function) | **POST** /payment_requests/{paymentRequestId}/captures | Payment Request Capture | | [**authorizePaymentRequest()**](PaymentRequestApi.md#authorizepaymentrequest-function) | **POST** /payment_requests/{paymentRequestId}/auth | Payment Request Authorize | | [**resendPaymentRequestAuth()**](PaymentRequestApi.md#resendpaymentrequestauth-function) | **POST** /payment_requests/{paymentRequestId}/auth/resend | Payment Request Resend Auth | +| [**simulatePaymentRequestPayment()**](PaymentRequestApi.md#simulatepaymentrequestpayment-function) | **POST** /payment_requests/{paymentRequestId}/payments/simulate | Payment Request Simulate Payment | ## `createPaymentRequest()` Function @@ -532,6 +533,50 @@ try { ``` +## `simulatePaymentRequestPayment()` Function + +```php +simulatePaymentRequestPayment($payment_request_id): \PaymentRequest\PaymentSimulation +``` + +Payment Request Simulate Payment + Payment Request Simulate Payment + +| Name | Value | +|--------------------|:-------------:| +| Function Name | `simulatePaymentRequestPayment` | +| Request Parameters | [SimulatePaymentRequestPaymentRequestParams](#request-parameters--SimulatePaymentRequestPaymentRequestParams) | +| Return Type | [**\Xendit\PaymentRequest\PaymentSimulation**](PaymentRequest/PaymentSimulation.md) | + +### Request Parameters - SimulatePaymentRequestPaymentRequestParams + +|Name | Type | Required |Default | +|-------------|:-------------:|:-------------:|-------------| +| **payment_request_id** | **string** | ☑️ | | + +### Usage Example +```php +simulatePaymentRequestPayment($payment_request_id); + print_r($result); +} catch (\Xendit\XenditSdkException $e) { + echo 'Exception when calling PaymentRequestApi->simulatePaymentRequestPayment: ', $e->getMessage(), PHP_EOL; + echo 'Full Error: ', json_encode($e->getFullError()), PHP_EOL; +} +``` + + ## Callback Objects Use the following callback objects provided by Xendit to receive callbacks (also known as webhooks) that Xendit sends you on events, such as successful payments. Note that the example is meant to illustrate the contents of the callback object -- you will not need to instantiate these objects in practice ### PaymentCallback Object diff --git a/lib/BalanceAndTransaction/Balance.php b/lib/BalanceAndTransaction/Balance.php index 53ccf38..c654945 100644 --- a/lib/BalanceAndTransaction/Balance.php +++ b/lib/BalanceAndTransaction/Balance.php @@ -11,7 +11,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** diff --git a/lib/BalanceAndTransaction/BalanceApi.php b/lib/BalanceAndTransaction/BalanceApi.php index 566cdd3..7e48f97 100644 --- a/lib/BalanceAndTransaction/BalanceApi.php +++ b/lib/BalanceAndTransaction/BalanceApi.php @@ -10,7 +10,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** @@ -127,6 +127,7 @@ public function getConfig() * * @param string $account_type The selected balance type (optional, default to 'CASH') * @param string $currency Currency for filter for customers with multi currency accounts (optional) + * @param \DateTime $at_timestamp The timestamp you want to use as the limit for balance retrieval (optional) * @param string $for_user_id The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBalance'] to see the possible values for this operation * @@ -134,9 +135,9 @@ public function getConfig() * @throws \InvalidArgumentException * @return \Xendit\BalanceAndTransaction\Balance */ - public function getBalance($account_type = 'CASH', $currency = null, $for_user_id = null, string $contentType = self::contentTypes['getBalance'][0]) + public function getBalance($account_type = 'CASH', $currency = null, $at_timestamp = null, $for_user_id = null, string $contentType = self::contentTypes['getBalance'][0]) { - list($response) = $this->getBalanceWithHttpInfo($account_type, $currency, $for_user_id, $contentType); + list($response) = $this->getBalanceWithHttpInfo($account_type, $currency, $at_timestamp, $for_user_id, $contentType); return $response; } @@ -147,6 +148,7 @@ public function getBalance($account_type = 'CASH', $currency = null, $for_user_i * * @param string $account_type The selected balance type (optional, default to 'CASH') * @param string $currency Currency for filter for customers with multi currency accounts (optional) + * @param \DateTime $at_timestamp The timestamp you want to use as the limit for balance retrieval (optional) * @param string $for_user_id The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBalance'] to see the possible values for this operation * @@ -154,9 +156,9 @@ public function getBalance($account_type = 'CASH', $currency = null, $for_user_i * @throws \InvalidArgumentException * @return array of \Xendit\BalanceAndTransaction\Balance, HTTP status code, HTTP response headers (array of strings) */ - public function getBalanceWithHttpInfo($account_type = 'CASH', $currency = null, $for_user_id = null, string $contentType = self::contentTypes['getBalance'][0]) + public function getBalanceWithHttpInfo($account_type = 'CASH', $currency = null, $at_timestamp = null, $for_user_id = null, string $contentType = self::contentTypes['getBalance'][0]) { - $request = $this->getBalanceRequest($account_type, $currency, $for_user_id, $contentType); + $request = $this->getBalanceRequest($account_type, $currency, $at_timestamp, $for_user_id, $contentType); $options = $this->createHttpClientOption(); try { @@ -216,15 +218,16 @@ public function getBalanceWithHttpInfo($account_type = 'CASH', $currency = null, * * @param string $account_type The selected balance type (optional, default to 'CASH') * @param string $currency Currency for filter for customers with multi currency accounts (optional) + * @param \DateTime $at_timestamp The timestamp you want to use as the limit for balance retrieval (optional) * @param string $for_user_id The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBalance'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getBalanceAsync($account_type = 'CASH', $currency = null, $for_user_id = null, string $contentType = self::contentTypes['getBalance'][0]) + public function getBalanceAsync($account_type = 'CASH', $currency = null, $at_timestamp = null, $for_user_id = null, string $contentType = self::contentTypes['getBalance'][0]) { - return $this->getBalanceAsyncWithHttpInfo($account_type, $currency, $for_user_id, $contentType) + return $this->getBalanceAsyncWithHttpInfo($account_type, $currency, $at_timestamp, $for_user_id, $contentType) ->then( function ($response) { return $response[0]; @@ -239,16 +242,17 @@ function ($response) { * * @param string $account_type The selected balance type (optional, default to 'CASH') * @param string $currency Currency for filter for customers with multi currency accounts (optional) + * @param \DateTime $at_timestamp The timestamp you want to use as the limit for balance retrieval (optional) * @param string $for_user_id The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBalance'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getBalanceAsyncWithHttpInfo($account_type = 'CASH', $currency = null, $for_user_id = null, string $contentType = self::contentTypes['getBalance'][0]) + public function getBalanceAsyncWithHttpInfo($account_type = 'CASH', $currency = null, $at_timestamp = null, $for_user_id = null, string $contentType = self::contentTypes['getBalance'][0]) { $returnType = '\Xendit\BalanceAndTransaction\Balance'; - $request = $this->getBalanceRequest($account_type, $currency, $for_user_id, $contentType); + $request = $this->getBalanceRequest($account_type, $currency, $at_timestamp, $for_user_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -284,19 +288,21 @@ function ($e) { * * @param string $account_type The selected balance type (optional, default to 'CASH') * @param string $currency Currency for filter for customers with multi currency accounts (optional) + * @param \DateTime $at_timestamp The timestamp you want to use as the limit for balance retrieval (optional) * @param string $for_user_id The sub-account user-id that you want to make this transaction for. This header is only used if you have access to xenPlatform. See xenPlatform for more information (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getBalance'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getBalanceRequest($account_type = 'CASH', $currency = null, $for_user_id = null, string $contentType = self::contentTypes['getBalance'][0]) + public function getBalanceRequest($account_type = 'CASH', $currency = null, $at_timestamp = null, $for_user_id = null, string $contentType = self::contentTypes['getBalance'][0]) { + $resourcePath = '/balance'; $formParams = []; $queryParams = []; @@ -322,6 +328,15 @@ public function getBalanceRequest($account_type = 'CASH', $currency = null, $for true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $at_timestamp, + 'at_timestamp', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // header param: for-user-id if ($for_user_id !== null) { @@ -367,7 +382,7 @@ public function getBalanceRequest($account_type = 'CASH', $currency = null, $for // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/BalanceAndTransaction/ChannelsCategories.php b/lib/BalanceAndTransaction/ChannelsCategories.php index a28ee0b..536cde0 100644 --- a/lib/BalanceAndTransaction/ChannelsCategories.php +++ b/lib/BalanceAndTransaction/ChannelsCategories.php @@ -11,7 +11,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** diff --git a/lib/BalanceAndTransaction/Currency.php b/lib/BalanceAndTransaction/Currency.php index fb98a54..0f017f1 100644 --- a/lib/BalanceAndTransaction/Currency.php +++ b/lib/BalanceAndTransaction/Currency.php @@ -11,7 +11,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** diff --git a/lib/BalanceAndTransaction/DateRangeFilter.php b/lib/BalanceAndTransaction/DateRangeFilter.php index 2b486a6..e807dde 100644 --- a/lib/BalanceAndTransaction/DateRangeFilter.php +++ b/lib/BalanceAndTransaction/DateRangeFilter.php @@ -11,7 +11,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** diff --git a/lib/BalanceAndTransaction/FeeResponse.php b/lib/BalanceAndTransaction/FeeResponse.php index c8d1a4b..7491a3a 100644 --- a/lib/BalanceAndTransaction/FeeResponse.php +++ b/lib/BalanceAndTransaction/FeeResponse.php @@ -11,7 +11,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** @@ -249,6 +249,7 @@ public function getModelName() public const STATUS_COMPLETED = 'COMPLETED'; public const STATUS_CANCELED = 'CANCELED'; public const STATUS_REVERSED = 'REVERSED'; + public const STATUS_NOT_APPLICABLE = 'NOT_APPLICABLE'; /** * Gets allowable values of the enum @@ -262,6 +263,7 @@ public function getStatusAllowableValues() self::STATUS_COMPLETED, self::STATUS_CANCELED, self::STATUS_REVERSED, + self::STATUS_NOT_APPLICABLE, ]; } diff --git a/lib/BalanceAndTransaction/LinkItem.php b/lib/BalanceAndTransaction/LinkItem.php index 77e29bf..3353d02 100644 --- a/lib/BalanceAndTransaction/LinkItem.php +++ b/lib/BalanceAndTransaction/LinkItem.php @@ -11,7 +11,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** diff --git a/lib/BalanceAndTransaction/ServerError.php b/lib/BalanceAndTransaction/ServerError.php index 9a6cb18..7027baa 100644 --- a/lib/BalanceAndTransaction/ServerError.php +++ b/lib/BalanceAndTransaction/ServerError.php @@ -11,7 +11,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** diff --git a/lib/BalanceAndTransaction/TransactionApi.php b/lib/BalanceAndTransaction/TransactionApi.php index 0b1661f..74da8f8 100644 --- a/lib/BalanceAndTransaction/TransactionApi.php +++ b/lib/BalanceAndTransaction/TransactionApi.php @@ -10,7 +10,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** @@ -363,7 +363,7 @@ public function getTransactionByIDRequest($id, $for_user_id = null, string $cont // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -806,7 +806,7 @@ public function getAllTransactionsRequest($for_user_id = null, $types = null, $s // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/BalanceAndTransaction/TransactionResponse.php b/lib/BalanceAndTransaction/TransactionResponse.php index ea81a5b..1c38871 100644 --- a/lib/BalanceAndTransaction/TransactionResponse.php +++ b/lib/BalanceAndTransaction/TransactionResponse.php @@ -11,7 +11,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** diff --git a/lib/BalanceAndTransaction/TransactionResponseType.php b/lib/BalanceAndTransaction/TransactionResponseType.php index da96a10..ca1428a 100644 --- a/lib/BalanceAndTransaction/TransactionResponseType.php +++ b/lib/BalanceAndTransaction/TransactionResponseType.php @@ -11,7 +11,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** diff --git a/lib/BalanceAndTransaction/TransactionStatuses.php b/lib/BalanceAndTransaction/TransactionStatuses.php index 2272348..44e7ae5 100644 --- a/lib/BalanceAndTransaction/TransactionStatuses.php +++ b/lib/BalanceAndTransaction/TransactionStatuses.php @@ -11,7 +11,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** diff --git a/lib/BalanceAndTransaction/TransactionTypes.php b/lib/BalanceAndTransaction/TransactionTypes.php index 29c4df4..61e2625 100644 --- a/lib/BalanceAndTransaction/TransactionTypes.php +++ b/lib/BalanceAndTransaction/TransactionTypes.php @@ -11,7 +11,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** diff --git a/lib/BalanceAndTransaction/TransactionsResponse.php b/lib/BalanceAndTransaction/TransactionsResponse.php index 96cc2d6..f85c6cd 100644 --- a/lib/BalanceAndTransaction/TransactionsResponse.php +++ b/lib/BalanceAndTransaction/TransactionsResponse.php @@ -11,7 +11,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** diff --git a/lib/BalanceAndTransaction/ValidationError.php b/lib/BalanceAndTransaction/ValidationError.php index 482c87b..1a3d5ff 100644 --- a/lib/BalanceAndTransaction/ValidationError.php +++ b/lib/BalanceAndTransaction/ValidationError.php @@ -11,7 +11,7 @@ /** * Transaction Service V4 API * - * The version of the OpenAPI document: 3.5.2 + * The version of the OpenAPI document: 5.4.0 */ /** diff --git a/lib/Configuration.php b/lib/Configuration.php index ece5290..1a6587b 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -10,7 +10,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -64,7 +64,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/4.3.0/PHP'; + protected $userAgent = 'OpenAPI-Generator/5.0.0/PHP'; /** * Debug switch (default set to false) @@ -304,8 +304,8 @@ public static function toDebugReport() $report = 'PHP SDK (Xendit) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' The version of the OpenAPI document: 1.45.2' . PHP_EOL; - $report .= ' SDK Package Version: 4.3.0' . PHP_EOL; + $report .= ' The version of the OpenAPI document: 1.59.0' . PHP_EOL; + $report .= ' SDK Package Version: 5.0.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Customer/CustomerApi.php b/lib/Customer/CustomerApi.php index 332ffb0..3e905e0 100644 --- a/lib/Customer/CustomerApi.php +++ b/lib/Customer/CustomerApi.php @@ -369,7 +369,7 @@ public function createCustomerRequest($idempotency_key = null, $for_user_id = nu // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -628,7 +628,7 @@ public function getCustomerRequest($id, $for_user_id = null, string $contentType // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -891,7 +891,7 @@ public function getCustomerByReferenceIDRequest($reference_id, $for_user_id = nu // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1163,7 +1163,7 @@ public function updateCustomerRequest($id, $for_user_id = null, $patch_customer // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index d5d8235..c325910 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -10,7 +10,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/Invoice/InvoiceApi.php b/lib/Invoice/InvoiceApi.php index 4f1c293..53da11c 100644 --- a/lib/Invoice/InvoiceApi.php +++ b/lib/Invoice/InvoiceApi.php @@ -365,7 +365,7 @@ public function createInvoiceRequest($create_invoice_request, $for_user_id = nul // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -624,7 +624,7 @@ public function getInvoiceByIdRequest($invoice_id, $for_user_id = null, string $ // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1073,7 +1073,7 @@ public function getInvoicesRequest($for_user_id = null, $external_id = null, $st // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1332,7 +1332,7 @@ public function expireInvoiceRequest($invoice_id, $for_user_id = null, string $c // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/Model/ModelInterface.php b/lib/Model/ModelInterface.php index 7be3b9d..dc19571 100644 --- a/lib/Model/ModelInterface.php +++ b/lib/Model/ModelInterface.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 1eb1079..640c56a 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -13,7 +13,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentMethod/BillingInformation.php b/lib/PaymentMethod/BillingInformation.php index e54ebc6..2cd3371 100644 --- a/lib/PaymentMethod/BillingInformation.php +++ b/lib/PaymentMethod/BillingInformation.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/Card.php b/lib/PaymentMethod/Card.php index d7e0250..f4abdb5 100644 --- a/lib/PaymentMethod/Card.php +++ b/lib/PaymentMethod/Card.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** @@ -51,6 +51,7 @@ class Card implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'channel_code' => '\Xendit\PaymentMethod\CardChannelCode', 'currency' => 'string', 'channel_properties' => '\Xendit\PaymentMethod\CardChannelProperties', 'card_information' => '\Xendit\PaymentMethod\TokenizedCardInformation', @@ -65,6 +66,7 @@ class Card implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'channel_code' => null, 'currency' => null, 'channel_properties' => null, 'card_information' => null, @@ -77,7 +79,8 @@ class Card implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'currency' => true, + 'channel_code' => false, + 'currency' => true, 'channel_properties' => true, 'card_information' => false, 'card_verification_results' => true @@ -169,6 +172,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'channel_code' => 'channel_code', 'currency' => 'currency', 'channel_properties' => 'channel_properties', 'card_information' => 'card_information', @@ -181,6 +185,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'channel_code' => 'setChannelCode', 'currency' => 'setCurrency', 'channel_properties' => 'setChannelProperties', 'card_information' => 'setCardInformation', @@ -193,6 +198,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'channel_code' => 'getChannelCode', 'currency' => 'getCurrency', 'channel_properties' => 'getChannelProperties', 'card_information' => 'getCardInformation', @@ -256,6 +262,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('channel_code', $data ?? [], null); $this->setIfExists('currency', $data ?? [], null); $this->setIfExists('channel_properties', $data ?? [], null); $this->setIfExists('card_information', $data ?? [], null); @@ -289,9 +296,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['currency'] === null) { - $invalidProperties[] = "'currency' can't be null"; - } if ($this->container['channel_properties'] === null) { $invalidProperties[] = "'channel_properties' can't be null"; } @@ -310,10 +314,37 @@ public function valid() } + /** + * Gets channel_code + * + * @return \PaymentMethod\CardChannelCode|null + */ + public function getChannelCode() + { + return $this->container['channel_code']; + } + + /** + * Sets channel_code + * + * @param \PaymentMethod\CardChannelCode|null $channel_code channel_code + * + * @return self + */ + public function setChannelCode($channel_code) + { + if (is_null($channel_code)) { + throw new \InvalidArgumentException('non-nullable channel_code cannot be null'); + } + $this->container['channel_code'] = $channel_code; + + return $this; + } + /** * Gets currency * - * @return string + * @return string|null */ public function getCurrency() { @@ -323,7 +354,7 @@ public function getCurrency() /** * Sets currency * - * @param string $currency currency + * @param string|null $currency currency * * @return self */ diff --git a/lib/PaymentMethod/CardChannelCode.php b/lib/PaymentMethod/CardChannelCode.php new file mode 100644 index 0000000..e482fb8 --- /dev/null +++ b/lib/PaymentMethod/CardChannelCode.php @@ -0,0 +1,78 @@ +value = $value; + } + + public function getValue() { + return $this->value; + } + + public function setValue($value) { + if (!self::isValid($value)) { + throw new \InvalidArgumentException(sprintf('Invalid value for enum CardChannelCode: %s', $value)); + } + $this->value = $value; + } + + public function __toString() { + return (string)$this->value; + } + + /** + * Gets allowable values of the enum + * @return string[] + */ + public static function getAllowableEnumValues() + { + return [ + self::GPN, + self::XENDIT_ENUM_DEFAULT_FALLBACK + ]; + } +} + + diff --git a/lib/PaymentMethod/CardChannelProperties.php b/lib/PaymentMethod/CardChannelProperties.php index 1df2749..22823d5 100644 --- a/lib/PaymentMethod/CardChannelProperties.php +++ b/lib/PaymentMethod/CardChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** @@ -54,7 +54,8 @@ class CardChannelProperties implements ModelInterface, ArrayAccess, \JsonSeriali 'skip_three_d_secure' => 'bool', 'success_return_url' => 'string', 'failure_return_url' => 'string', - 'cardonfile_type' => 'string' + 'cardonfile_type' => 'string', + 'expires_at' => '\DateTime' ]; /** @@ -68,7 +69,8 @@ class CardChannelProperties implements ModelInterface, ArrayAccess, \JsonSeriali 'skip_three_d_secure' => null, 'success_return_url' => null, 'failure_return_url' => null, - 'cardonfile_type' => null + 'cardonfile_type' => null, + 'expires_at' => 'date-time' ]; /** @@ -80,7 +82,8 @@ class CardChannelProperties implements ModelInterface, ArrayAccess, \JsonSeriali 'skip_three_d_secure' => true, 'success_return_url' => true, 'failure_return_url' => true, - 'cardonfile_type' => true + 'cardonfile_type' => true, + 'expires_at' => false ]; /** @@ -172,7 +175,8 @@ public function isNullableSetToNull(string $property): bool 'skip_three_d_secure' => 'skip_three_d_secure', 'success_return_url' => 'success_return_url', 'failure_return_url' => 'failure_return_url', - 'cardonfile_type' => 'cardonfile_type' + 'cardonfile_type' => 'cardonfile_type', + 'expires_at' => 'expires_at' ]; /** @@ -184,7 +188,8 @@ public function isNullableSetToNull(string $property): bool 'skip_three_d_secure' => 'setSkipThreeDSecure', 'success_return_url' => 'setSuccessReturnUrl', 'failure_return_url' => 'setFailureReturnUrl', - 'cardonfile_type' => 'setCardonfileType' + 'cardonfile_type' => 'setCardonfileType', + 'expires_at' => 'setExpiresAt' ]; /** @@ -196,7 +201,8 @@ public function isNullableSetToNull(string $property): bool 'skip_three_d_secure' => 'getSkipThreeDSecure', 'success_return_url' => 'getSuccessReturnUrl', 'failure_return_url' => 'getFailureReturnUrl', - 'cardonfile_type' => 'getCardonfileType' + 'cardonfile_type' => 'getCardonfileType', + 'expires_at' => 'getExpiresAt' ]; /** @@ -277,6 +283,7 @@ public function __construct(array $data = null) $this->setIfExists('success_return_url', $data ?? [], null); $this->setIfExists('failure_return_url', $data ?? [], null); $this->setIfExists('cardonfile_type', $data ?? [], null); + $this->setIfExists('expires_at', $data ?? [], null); } /** @@ -493,6 +500,33 @@ public function setCardonfileType($cardonfile_type) return $this; } + + /** + * Gets expires_at + * + * @return \DateTime|null + */ + public function getExpiresAt() + { + return $this->container['expires_at']; + } + + /** + * Sets expires_at + * + * @param \DateTime|null $expires_at expires_at + * + * @return self + */ + public function setExpiresAt($expires_at) + { + if (is_null($expires_at)) { + throw new \InvalidArgumentException('non-nullable expires_at cannot be null'); + } + $this->container['expires_at'] = $expires_at; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/PaymentMethod/CardParameters.php b/lib/PaymentMethod/CardParameters.php index e908b31..c52bdf1 100644 --- a/lib/PaymentMethod/CardParameters.php +++ b/lib/PaymentMethod/CardParameters.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/CardParametersCardInformation.php b/lib/PaymentMethod/CardParametersCardInformation.php index 1aa1231..d8c7d14 100644 --- a/lib/PaymentMethod/CardParametersCardInformation.php +++ b/lib/PaymentMethod/CardParametersCardInformation.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/CardVerificationResults.php b/lib/PaymentMethod/CardVerificationResults.php index 46135fc..6759523 100644 --- a/lib/PaymentMethod/CardVerificationResults.php +++ b/lib/PaymentMethod/CardVerificationResults.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/CardVerificationResultsThreeDSecure.php b/lib/PaymentMethod/CardVerificationResultsThreeDSecure.php index de576af..ae959a3 100644 --- a/lib/PaymentMethod/CardVerificationResultsThreeDSecure.php +++ b/lib/PaymentMethod/CardVerificationResultsThreeDSecure.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/CreatePaymentMethod409Response.php b/lib/PaymentMethod/CreatePaymentMethod409Response.php index a0f9c7a..5b8d7f7 100644 --- a/lib/PaymentMethod/CreatePaymentMethod409Response.php +++ b/lib/PaymentMethod/CreatePaymentMethod409Response.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/CreatePaymentMethod503Response.php b/lib/PaymentMethod/CreatePaymentMethod503Response.php index af39312..20b9ff7 100644 --- a/lib/PaymentMethod/CreatePaymentMethod503Response.php +++ b/lib/PaymentMethod/CreatePaymentMethod503Response.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/DirectDebit.php b/lib/PaymentMethod/DirectDebit.php index eb865bb..84e21bf 100644 --- a/lib/PaymentMethod/DirectDebit.php +++ b/lib/PaymentMethod/DirectDebit.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/DirectDebitAllOf.php b/lib/PaymentMethod/DirectDebitAllOf.php index 0daa1d1..4874aea 100644 --- a/lib/PaymentMethod/DirectDebitAllOf.php +++ b/lib/PaymentMethod/DirectDebitAllOf.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/DirectDebitBankAccount.php b/lib/PaymentMethod/DirectDebitBankAccount.php index 7702af3..f40ae70 100644 --- a/lib/PaymentMethod/DirectDebitBankAccount.php +++ b/lib/PaymentMethod/DirectDebitBankAccount.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/DirectDebitChannelCode.php b/lib/PaymentMethod/DirectDebitChannelCode.php index db81c7f..6a70dd4 100644 --- a/lib/PaymentMethod/DirectDebitChannelCode.php +++ b/lib/PaymentMethod/DirectDebitChannelCode.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** @@ -45,6 +45,10 @@ class DirectDebitChannelCode public const BPI = 'BPI'; + public const AUTODEBIT_BPI = 'AUTODEBIT_BPI'; + + public const BPI_RECURRING = 'BPI_RECURRING'; + public const BRI = 'BRI'; public const BNI = 'BNI'; @@ -83,6 +87,8 @@ class DirectDebitChannelCode public const AUTODEBIT_UBP = 'AUTODEBIT_UBP'; + public const UBP_DEBIT_PULL = 'UBP_DEBIT_PULL'; + public const AFFIN_FPX = 'AFFIN_FPX'; public const AGRO_FPX = 'AGRO_FPX'; @@ -197,6 +203,8 @@ public static function getAllowableEnumValues() self::BCA_ONEKLIK, self::BDO, self::BPI, + self::AUTODEBIT_BPI, + self::BPI_RECURRING, self::BRI, self::BNI, self::CHINABANK, @@ -216,6 +224,7 @@ public static function getAllowableEnumValues() self::SCB_MB, self::BDO_EPAY, self::AUTODEBIT_UBP, + self::UBP_DEBIT_PULL, self::AFFIN_FPX, self::AGRO_FPX, self::ALLIANCE_FPX, diff --git a/lib/PaymentMethod/DirectDebitChannelProperties.php b/lib/PaymentMethod/DirectDebitChannelProperties.php index 5b35fcf..68b375d 100644 --- a/lib/PaymentMethod/DirectDebitChannelProperties.php +++ b/lib/PaymentMethod/DirectDebitChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/DirectDebitDebitCard.php b/lib/PaymentMethod/DirectDebitDebitCard.php index 97c834b..3deba45 100644 --- a/lib/PaymentMethod/DirectDebitDebitCard.php +++ b/lib/PaymentMethod/DirectDebitDebitCard.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/DirectDebitParameters.php b/lib/PaymentMethod/DirectDebitParameters.php index 35bbf54..fbefc04 100644 --- a/lib/PaymentMethod/DirectDebitParameters.php +++ b/lib/PaymentMethod/DirectDebitParameters.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/DirectDebitType.php b/lib/PaymentMethod/DirectDebitType.php index eae2c3a..b66cecd 100644 --- a/lib/PaymentMethod/DirectDebitType.php +++ b/lib/PaymentMethod/DirectDebitType.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/EWallet.php b/lib/PaymentMethod/EWallet.php index c7864c9..33fd105 100644 --- a/lib/PaymentMethod/EWallet.php +++ b/lib/PaymentMethod/EWallet.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/EWalletAccount.php b/lib/PaymentMethod/EWalletAccount.php index ad95b2f..205f781 100644 --- a/lib/PaymentMethod/EWalletAccount.php +++ b/lib/PaymentMethod/EWalletAccount.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/EWalletChannelCode.php b/lib/PaymentMethod/EWalletChannelCode.php index 91e041f..7e9f948 100644 --- a/lib/PaymentMethod/EWalletChannelCode.php +++ b/lib/PaymentMethod/EWalletChannelCode.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** @@ -77,7 +77,7 @@ class EWalletChannelCode public const ALIPAY = 'ALIPAY'; - public const TOUCHANDGO = 'TOUCHANDGO'; + public const TOUCHNGO = 'TOUCHNGO'; public const XENDIT_ENUM_DEFAULT_FALLBACK = 'UNKNOWN_ENUM_VALUE'; @@ -129,7 +129,7 @@ public static function getAllowableEnumValues() self::LINEPAY, self::TRUEMONEY, self::ALIPAY, - self::TOUCHANDGO, + self::TOUCHNGO, self::XENDIT_ENUM_DEFAULT_FALLBACK ]; } diff --git a/lib/PaymentMethod/EWalletChannelProperties.php b/lib/PaymentMethod/EWalletChannelProperties.php index 0815a53..80047d4 100644 --- a/lib/PaymentMethod/EWalletChannelProperties.php +++ b/lib/PaymentMethod/EWalletChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** @@ -54,6 +54,7 @@ class EWalletChannelProperties implements ModelInterface, ArrayAccess, \JsonSeri 'success_return_url' => 'string', 'failure_return_url' => 'string', 'cancel_return_url' => 'string', + 'pending_return_url' => 'string', 'mobile_number' => 'string', 'redeem_points' => 'string', 'cashtag' => 'string' @@ -70,6 +71,7 @@ class EWalletChannelProperties implements ModelInterface, ArrayAccess, \JsonSeri 'success_return_url' => null, 'failure_return_url' => null, 'cancel_return_url' => null, + 'pending_return_url' => null, 'mobile_number' => null, 'redeem_points' => null, 'cashtag' => null @@ -84,6 +86,7 @@ class EWalletChannelProperties implements ModelInterface, ArrayAccess, \JsonSeri 'success_return_url' => false, 'failure_return_url' => false, 'cancel_return_url' => false, + 'pending_return_url' => false, 'mobile_number' => false, 'redeem_points' => false, 'cashtag' => false @@ -178,6 +181,7 @@ public function isNullableSetToNull(string $property): bool 'success_return_url' => 'success_return_url', 'failure_return_url' => 'failure_return_url', 'cancel_return_url' => 'cancel_return_url', + 'pending_return_url' => 'pending_return_url', 'mobile_number' => 'mobile_number', 'redeem_points' => 'redeem_points', 'cashtag' => 'cashtag' @@ -192,6 +196,7 @@ public function isNullableSetToNull(string $property): bool 'success_return_url' => 'setSuccessReturnUrl', 'failure_return_url' => 'setFailureReturnUrl', 'cancel_return_url' => 'setCancelReturnUrl', + 'pending_return_url' => 'setPendingReturnUrl', 'mobile_number' => 'setMobileNumber', 'redeem_points' => 'setRedeemPoints', 'cashtag' => 'setCashtag' @@ -206,6 +211,7 @@ public function isNullableSetToNull(string $property): bool 'success_return_url' => 'getSuccessReturnUrl', 'failure_return_url' => 'getFailureReturnUrl', 'cancel_return_url' => 'getCancelReturnUrl', + 'pending_return_url' => 'getPendingReturnUrl', 'mobile_number' => 'getMobileNumber', 'redeem_points' => 'getRedeemPoints', 'cashtag' => 'getCashtag' @@ -271,6 +277,7 @@ public function __construct(array $data = null) $this->setIfExists('success_return_url', $data ?? [], null); $this->setIfExists('failure_return_url', $data ?? [], null); $this->setIfExists('cancel_return_url', $data ?? [], null); + $this->setIfExists('pending_return_url', $data ?? [], null); $this->setIfExists('mobile_number', $data ?? [], null); $this->setIfExists('redeem_points', $data ?? [], null); $this->setIfExists('cashtag', $data ?? [], null); @@ -315,6 +322,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'cancel_return_url', must be conform to the pattern /^\\S{1,255}:\/\/\\S{0,1000}$/."; } + if (!is_null($this->container['pending_return_url']) && !preg_match("/^\\S{1,255}:\/\/\\S{0,1000}$/", $this->container['pending_return_url'])) { + $invalidProperties[] = "invalid value for 'pending_return_url', must be conform to the pattern /^\\S{1,255}:\/\/\\S{0,1000}$/."; + } + if (!is_null($this->container['cashtag']) && !preg_match("/^[$][a-zA-Z0-9_]{3,15}$/", $this->container['cashtag'])) { $invalidProperties[] = "invalid value for 'cashtag', must be conform to the pattern /^[$][a-zA-Z0-9_]{3,15}$/."; } @@ -430,6 +441,38 @@ public function setCancelReturnUrl($cancel_return_url) return $this; } + /** + * Gets pending_return_url + * + * @return string|null + */ + public function getPendingReturnUrl() + { + return $this->container['pending_return_url']; + } + + /** + * Sets pending_return_url + * + * @param string|null $pending_return_url URL where the end-customer is redirected if the authorization is pending + * + * @return self + */ + public function setPendingReturnUrl($pending_return_url) + { + if (is_null($pending_return_url)) { + throw new \InvalidArgumentException('non-nullable pending_return_url cannot be null'); + } + + if ((!preg_match("/^\\S{1,255}:\/\/\\S{0,1000}$/", $pending_return_url))) { + throw new \InvalidArgumentException("invalid value for \$pending_return_url when calling EWalletChannelProperties., must conform to the pattern /^\\S{1,255}:\/\/\\S{0,1000}$/."); + } + + $this->container['pending_return_url'] = $pending_return_url; + + return $this; + } + /** * Gets mobile_number * diff --git a/lib/PaymentMethod/EWalletParameters.php b/lib/PaymentMethod/EWalletParameters.php index 170ed80..4ed2f86 100644 --- a/lib/PaymentMethod/EWalletParameters.php +++ b/lib/PaymentMethod/EWalletParameters.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/GetAllPaymentMethods400Response.php b/lib/PaymentMethod/GetAllPaymentMethods400Response.php index 75f130b..0c9e24b 100644 --- a/lib/PaymentMethod/GetAllPaymentMethods400Response.php +++ b/lib/PaymentMethod/GetAllPaymentMethods400Response.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/GetAllPaymentMethods403Response.php b/lib/PaymentMethod/GetAllPaymentMethods403Response.php index 3797b3f..e452e46 100644 --- a/lib/PaymentMethod/GetAllPaymentMethods403Response.php +++ b/lib/PaymentMethod/GetAllPaymentMethods403Response.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/GetAllPaymentMethods404Response.php b/lib/PaymentMethod/GetAllPaymentMethods404Response.php index 32817d3..e065409 100644 --- a/lib/PaymentMethod/GetAllPaymentMethods404Response.php +++ b/lib/PaymentMethod/GetAllPaymentMethods404Response.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/GetAllPaymentMethodsDefaultResponse.php b/lib/PaymentMethod/GetAllPaymentMethodsDefaultResponse.php index d351ae8..6d23a15 100644 --- a/lib/PaymentMethod/GetAllPaymentMethodsDefaultResponse.php +++ b/lib/PaymentMethod/GetAllPaymentMethodsDefaultResponse.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/OverTheCounter.php b/lib/PaymentMethod/OverTheCounter.php index bd62866..605566a 100644 --- a/lib/PaymentMethod/OverTheCounter.php +++ b/lib/PaymentMethod/OverTheCounter.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/OverTheCounterChannelCode.php b/lib/PaymentMethod/OverTheCounterChannelCode.php index 6450f1c..2c53c88 100644 --- a/lib/PaymentMethod/OverTheCounterChannelCode.php +++ b/lib/PaymentMethod/OverTheCounterChannelCode.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/OverTheCounterChannelProperties.php b/lib/PaymentMethod/OverTheCounterChannelProperties.php index 0906f00..c691f48 100644 --- a/lib/PaymentMethod/OverTheCounterChannelProperties.php +++ b/lib/PaymentMethod/OverTheCounterChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/OverTheCounterChannelPropertiesUpdate.php b/lib/PaymentMethod/OverTheCounterChannelPropertiesUpdate.php index a9e6d35..c467d10 100644 --- a/lib/PaymentMethod/OverTheCounterChannelPropertiesUpdate.php +++ b/lib/PaymentMethod/OverTheCounterChannelPropertiesUpdate.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/OverTheCounterParameters.php b/lib/PaymentMethod/OverTheCounterParameters.php index fe3c01e..0bd2ff2 100644 --- a/lib/PaymentMethod/OverTheCounterParameters.php +++ b/lib/PaymentMethod/OverTheCounterParameters.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/OverTheCounterUpdateParameters.php b/lib/PaymentMethod/OverTheCounterUpdateParameters.php index e8eac82..7021f29 100644 --- a/lib/PaymentMethod/OverTheCounterUpdateParameters.php +++ b/lib/PaymentMethod/OverTheCounterUpdateParameters.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/PaymentMethod.php b/lib/PaymentMethod/PaymentMethod.php index a822a19..75659a0 100644 --- a/lib/PaymentMethod/PaymentMethod.php +++ b/lib/PaymentMethod/PaymentMethod.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/PaymentMethodAction.php b/lib/PaymentMethod/PaymentMethodAction.php index 3b4de9a..3a17bd7 100644 --- a/lib/PaymentMethod/PaymentMethodAction.php +++ b/lib/PaymentMethod/PaymentMethodAction.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/PaymentMethodApi.php b/lib/PaymentMethod/PaymentMethodApi.php index c89cd42..a9845c7 100644 --- a/lib/PaymentMethod/PaymentMethodApi.php +++ b/lib/PaymentMethod/PaymentMethodApi.php @@ -10,7 +10,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** @@ -371,7 +371,7 @@ public function createPaymentMethodRequest($for_user_id = null, $payment_method_ // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -630,7 +630,7 @@ public function getPaymentMethodByIDRequest($payment_method_id, $for_user_id = n // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1069,7 +1069,7 @@ public function getPaymentsByPaymentMethodIdRequest($payment_method_id, $for_use // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1341,7 +1341,7 @@ public function patchPaymentMethodRequest($payment_method_id, $for_user_id = nul // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1718,7 +1718,7 @@ public function getAllPaymentMethodsRequest($for_user_id = null, $id = null, $ty // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1990,7 +1990,7 @@ public function expirePaymentMethodRequest($payment_method_id, $for_user_id = nu // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2262,7 +2262,7 @@ public function authPaymentMethodRequest($payment_method_id, $for_user_id = null // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2497,7 +2497,7 @@ public function simulatePaymentRequest($payment_method_id, $simulate_payment_req // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/PaymentMethod/PaymentMethodAuthParameters.php b/lib/PaymentMethod/PaymentMethodAuthParameters.php index 17899f8..219cb38 100644 --- a/lib/PaymentMethod/PaymentMethodAuthParameters.php +++ b/lib/PaymentMethod/PaymentMethodAuthParameters.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/PaymentMethodCallback.php b/lib/PaymentMethod/PaymentMethodCallback.php index ffa66ce..044c790 100644 --- a/lib/PaymentMethod/PaymentMethodCallback.php +++ b/lib/PaymentMethod/PaymentMethodCallback.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/PaymentMethodCountry.php b/lib/PaymentMethod/PaymentMethodCountry.php index 18c37ed..53abaa4 100644 --- a/lib/PaymentMethod/PaymentMethodCountry.php +++ b/lib/PaymentMethod/PaymentMethodCountry.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/PaymentMethodExpireParameters.php b/lib/PaymentMethod/PaymentMethodExpireParameters.php index caedfd0..fe3f9c7 100644 --- a/lib/PaymentMethod/PaymentMethodExpireParameters.php +++ b/lib/PaymentMethod/PaymentMethodExpireParameters.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/PaymentMethodList.php b/lib/PaymentMethod/PaymentMethodList.php index 63f6a9f..da5db6c 100644 --- a/lib/PaymentMethod/PaymentMethodList.php +++ b/lib/PaymentMethod/PaymentMethodList.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/PaymentMethodParameters.php b/lib/PaymentMethod/PaymentMethodParameters.php index 1a8f5fd..2f4f0db 100644 --- a/lib/PaymentMethod/PaymentMethodParameters.php +++ b/lib/PaymentMethod/PaymentMethodParameters.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/PaymentMethodReusability.php b/lib/PaymentMethod/PaymentMethodReusability.php index 10db202..b37672e 100644 --- a/lib/PaymentMethod/PaymentMethodReusability.php +++ b/lib/PaymentMethod/PaymentMethodReusability.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/PaymentMethodStatus.php b/lib/PaymentMethod/PaymentMethodStatus.php index cbb7747..c65c83a 100644 --- a/lib/PaymentMethod/PaymentMethodStatus.php +++ b/lib/PaymentMethod/PaymentMethodStatus.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/PaymentMethodType.php b/lib/PaymentMethod/PaymentMethodType.php index a2e5c09..155a666 100644 --- a/lib/PaymentMethod/PaymentMethodType.php +++ b/lib/PaymentMethod/PaymentMethodType.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/PaymentMethodUpdateParameters.php b/lib/PaymentMethod/PaymentMethodUpdateParameters.php index a3ec3d4..7c5cb83 100644 --- a/lib/PaymentMethod/PaymentMethodUpdateParameters.php +++ b/lib/PaymentMethod/PaymentMethodUpdateParameters.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/QRCode.php b/lib/PaymentMethod/QRCode.php index 794d71c..d875286 100644 --- a/lib/PaymentMethod/QRCode.php +++ b/lib/PaymentMethod/QRCode.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/QRCodeChannelCode.php b/lib/PaymentMethod/QRCodeChannelCode.php index 74d7668..dfea7b9 100644 --- a/lib/PaymentMethod/QRCodeChannelCode.php +++ b/lib/PaymentMethod/QRCodeChannelCode.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** @@ -47,6 +47,8 @@ class QRCodeChannelCode public const LINKAJA = 'LINKAJA'; + public const XENDIT = 'XENDIT'; + public const XENDIT_ENUM_DEFAULT_FALLBACK = 'UNKNOWN_ENUM_VALUE'; private $value; @@ -82,6 +84,7 @@ public static function getAllowableEnumValues() self::RCBC, self::PROMPTPAY, self::LINKAJA, + self::XENDIT, self::XENDIT_ENUM_DEFAULT_FALLBACK ]; } diff --git a/lib/PaymentMethod/QRCodeChannelProperties.php b/lib/PaymentMethod/QRCodeChannelProperties.php index c067227..ebd489c 100644 --- a/lib/PaymentMethod/QRCodeChannelProperties.php +++ b/lib/PaymentMethod/QRCodeChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/QRCodeParameters.php b/lib/PaymentMethod/QRCodeParameters.php index 6a2e397..7ec5a51 100644 --- a/lib/PaymentMethod/QRCodeParameters.php +++ b/lib/PaymentMethod/QRCodeParameters.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/SimulatePaymentRequest.php b/lib/PaymentMethod/SimulatePaymentRequest.php index 930a3cb..0e4e26a 100644 --- a/lib/PaymentMethod/SimulatePaymentRequest.php +++ b/lib/PaymentMethod/SimulatePaymentRequest.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/TokenizedCardInformation.php b/lib/PaymentMethod/TokenizedCardInformation.php index 5e09fa0..4eb12a6 100644 --- a/lib/PaymentMethod/TokenizedCardInformation.php +++ b/lib/PaymentMethod/TokenizedCardInformation.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** @@ -60,7 +60,9 @@ class TokenizedCardInformation implements ModelInterface, ArrayAccess, \JsonSeri 'type' => 'string', 'network' => 'string', 'country' => 'string', - 'issuer' => 'string' + 'issuer' => 'string', + 'card_number' => 'string', + 'one_time_token' => 'string' ]; /** @@ -80,7 +82,9 @@ class TokenizedCardInformation implements ModelInterface, ArrayAccess, \JsonSeri 'type' => null, 'network' => null, 'country' => null, - 'issuer' => null + 'issuer' => null, + 'card_number' => null, + 'one_time_token' => null ]; /** @@ -98,7 +102,9 @@ class TokenizedCardInformation implements ModelInterface, ArrayAccess, \JsonSeri 'type' => false, 'network' => false, 'country' => false, - 'issuer' => false + 'issuer' => false, + 'card_number' => false, + 'one_time_token' => false ]; /** @@ -196,7 +202,9 @@ public function isNullableSetToNull(string $property): bool 'type' => 'type', 'network' => 'network', 'country' => 'country', - 'issuer' => 'issuer' + 'issuer' => 'issuer', + 'card_number' => 'card_number', + 'one_time_token' => 'one_time_token' ]; /** @@ -214,7 +222,9 @@ public function isNullableSetToNull(string $property): bool 'type' => 'setType', 'network' => 'setNetwork', 'country' => 'setCountry', - 'issuer' => 'setIssuer' + 'issuer' => 'setIssuer', + 'card_number' => 'setCardNumber', + 'one_time_token' => 'setOneTimeToken' ]; /** @@ -232,7 +242,9 @@ public function isNullableSetToNull(string $property): bool 'type' => 'getType', 'network' => 'getNetwork', 'country' => 'getCountry', - 'issuer' => 'getIssuer' + 'issuer' => 'getIssuer', + 'card_number' => 'getCardNumber', + 'one_time_token' => 'getOneTimeToken' ]; /** @@ -302,6 +314,8 @@ public function __construct(array $data = null) $this->setIfExists('network', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('card_number', $data ?? [], null); + $this->setIfExists('one_time_token', $data ?? [], null); } /** @@ -331,33 +345,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['token_id'] === null) { - $invalidProperties[] = "'token_id' can't be null"; - } - if ($this->container['masked_card_number'] === null) { - $invalidProperties[] = "'masked_card_number' can't be null"; - } - if ($this->container['expiry_month'] === null) { - $invalidProperties[] = "'expiry_month' can't be null"; - } - if ($this->container['expiry_year'] === null) { - $invalidProperties[] = "'expiry_year' can't be null"; - } - if ($this->container['fingerprint'] === null) { - $invalidProperties[] = "'fingerprint' can't be null"; - } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ($this->container['network'] === null) { - $invalidProperties[] = "'network' can't be null"; - } - if ($this->container['country'] === null) { - $invalidProperties[] = "'country' can't be null"; - } - if ($this->container['issuer'] === null) { - $invalidProperties[] = "'issuer' can't be null"; - } return $invalidProperties; } @@ -376,7 +363,7 @@ public function valid() /** * Gets token_id * - * @return string + * @return string|null */ public function getTokenId() { @@ -386,7 +373,7 @@ public function getTokenId() /** * Sets token_id * - * @param string $token_id token_id + * @param string|null $token_id token_id * * @return self */ @@ -403,7 +390,7 @@ public function setTokenId($token_id) /** * Gets masked_card_number * - * @return string + * @return string|null */ public function getMaskedCardNumber() { @@ -413,7 +400,7 @@ public function getMaskedCardNumber() /** * Sets masked_card_number * - * @param string $masked_card_number 1st 6 and last 4 digits of the card + * @param string|null $masked_card_number 1st 6 and last 4 digits of the card * * @return self */ @@ -464,7 +451,7 @@ public function setCardholderName($cardholder_name) /** * Gets expiry_month * - * @return string + * @return string|null */ public function getExpiryMonth() { @@ -474,7 +461,7 @@ public function getExpiryMonth() /** * Sets expiry_month * - * @param string $expiry_month Card expiry month in MM format + * @param string|null $expiry_month Card expiry month in MM format * * @return self */ @@ -491,7 +478,7 @@ public function setExpiryMonth($expiry_month) /** * Gets expiry_year * - * @return string + * @return string|null */ public function getExpiryYear() { @@ -501,7 +488,7 @@ public function getExpiryYear() /** * Sets expiry_year * - * @param string $expiry_year Card expiry month in YY format + * @param string|null $expiry_year Card expiry month in YY format * * @return self */ @@ -518,7 +505,7 @@ public function setExpiryYear($expiry_year) /** * Gets fingerprint * - * @return string + * @return string|null */ public function getFingerprint() { @@ -528,7 +515,7 @@ public function getFingerprint() /** * Sets fingerprint * - * @param string $fingerprint Xendit-generated identifier for the unique card number. Multiple payment method objects can be created for the same account - e.g. if the user first creates a one-time payment request, and then later on creates a multiple-use payment method using the same account. The fingerprint helps to identify the unique account being used. + * @param string|null $fingerprint Xendit-generated identifier for the unique card number. Multiple payment method objects can be created for the same account - e.g. if the user first creates a one-time payment request, and then later on creates a multiple-use payment method using the same account. The fingerprint helps to identify the unique account being used. * * @return self */ @@ -545,7 +532,7 @@ public function setFingerprint($fingerprint) /** * Gets type * - * @return string + * @return string|null */ public function getType() { @@ -555,7 +542,7 @@ public function getType() /** * Sets type * - * @param string $type Whether the card is a credit or debit card + * @param string|null $type Whether the card is a credit or debit card * * @return self */ @@ -572,7 +559,7 @@ public function setType($type) /** * Gets network * - * @return string + * @return string|null */ public function getNetwork() { @@ -582,7 +569,7 @@ public function getNetwork() /** * Sets network * - * @param string $network Card network - VISA, MASTERCARD, JCB, AMEX, DISCOVER, BCA + * @param string|null $network Card network - VISA, MASTERCARD, JCB, AMEX, DISCOVER, BCA * * @return self */ @@ -599,7 +586,7 @@ public function setNetwork($network) /** * Gets country * - * @return string + * @return string|null */ public function getCountry() { @@ -609,7 +596,7 @@ public function getCountry() /** * Sets country * - * @param string $country Country where the card was issued ISO 3166-1 Alpha-2 + * @param string|null $country Country where the card was issued ISO 3166-1 Alpha-2 * * @return self */ @@ -626,7 +613,7 @@ public function setCountry($country) /** * Gets issuer * - * @return string + * @return string|null */ public function getIssuer() { @@ -636,7 +623,7 @@ public function getIssuer() /** * Sets issuer * - * @param string $issuer Issuer of the card, most often an issuing bank For example, “BCA”, “MANDIRI” + * @param string|null $issuer Issuer of the card, most often an issuing bank For example, “BCA”, “MANDIRI” * * @return self */ @@ -649,6 +636,60 @@ public function setIssuer($issuer) return $this; } + + /** + * Gets card_number + * + * @return string|null + */ + public function getCardNumber() + { + return $this->container['card_number']; + } + + /** + * Sets card_number + * + * @param string|null $card_number card_number + * + * @return self + */ + public function setCardNumber($card_number) + { + if (is_null($card_number)) { + throw new \InvalidArgumentException('non-nullable card_number cannot be null'); + } + $this->container['card_number'] = $card_number; + + return $this; + } + + /** + * Gets one_time_token + * + * @return string|null + */ + public function getOneTimeToken() + { + return $this->container['one_time_token']; + } + + /** + * Sets one_time_token + * + * @param string|null $one_time_token one_time_token + * + * @return self + */ + public function setOneTimeToken($one_time_token) + { + if (is_null($one_time_token)) { + throw new \InvalidArgumentException('non-nullable one_time_token cannot be null'); + } + $this->container['one_time_token'] = $one_time_token; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/PaymentMethod/VirtualAccount.php b/lib/PaymentMethod/VirtualAccount.php index 325a7b4..6211696 100644 --- a/lib/PaymentMethod/VirtualAccount.php +++ b/lib/PaymentMethod/VirtualAccount.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/VirtualAccountAllOf.php b/lib/PaymentMethod/VirtualAccountAllOf.php index c5fa258..b9be2c4 100644 --- a/lib/PaymentMethod/VirtualAccountAllOf.php +++ b/lib/PaymentMethod/VirtualAccountAllOf.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/VirtualAccountAlternativeDisplay.php b/lib/PaymentMethod/VirtualAccountAlternativeDisplay.php index d53a07b..ec42a30 100644 --- a/lib/PaymentMethod/VirtualAccountAlternativeDisplay.php +++ b/lib/PaymentMethod/VirtualAccountAlternativeDisplay.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/VirtualAccountChannelCode.php b/lib/PaymentMethod/VirtualAccountChannelCode.php index 2eeb2f6..1c12eb9 100644 --- a/lib/PaymentMethod/VirtualAccountChannelCode.php +++ b/lib/PaymentMethod/VirtualAccountChannelCode.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** @@ -69,6 +69,12 @@ class VirtualAccountChannelCode public const AMBANK = 'AMBANK'; + public const BNC = 'BNC'; + + public const HANA = 'HANA'; + + public const MUAMALAT = 'MUAMALAT'; + public const XENDIT_ENUM_DEFAULT_FALLBACK = 'UNKNOWN_ENUM_VALUE'; private $value; @@ -115,6 +121,9 @@ public static function getAllowableEnumValues() self::MSB, self::STANDARD_CHARTERED, self::AMBANK, + self::BNC, + self::HANA, + self::MUAMALAT, self::XENDIT_ENUM_DEFAULT_FALLBACK ]; } diff --git a/lib/PaymentMethod/VirtualAccountChannelProperties.php b/lib/PaymentMethod/VirtualAccountChannelProperties.php index c52cf7e..59c01e5 100644 --- a/lib/PaymentMethod/VirtualAccountChannelProperties.php +++ b/lib/PaymentMethod/VirtualAccountChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/VirtualAccountChannelPropertiesPatch.php b/lib/PaymentMethod/VirtualAccountChannelPropertiesPatch.php index f48a507..cc52c3b 100644 --- a/lib/PaymentMethod/VirtualAccountChannelPropertiesPatch.php +++ b/lib/PaymentMethod/VirtualAccountChannelPropertiesPatch.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/VirtualAccountParameters.php b/lib/PaymentMethod/VirtualAccountParameters.php index f665974..37d7cfb 100644 --- a/lib/PaymentMethod/VirtualAccountParameters.php +++ b/lib/PaymentMethod/VirtualAccountParameters.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentMethod/VirtualAccountUpdateParameters.php b/lib/PaymentMethod/VirtualAccountUpdateParameters.php index 725a3aa..a1b7f84 100644 --- a/lib/PaymentMethod/VirtualAccountUpdateParameters.php +++ b/lib/PaymentMethod/VirtualAccountUpdateParameters.php @@ -11,7 +11,7 @@ /** * Payment Method Service v2 * - * The version of the OpenAPI document: 2.91.2 + * The version of the OpenAPI document: 2.99.0 */ /** diff --git a/lib/PaymentRequest/Capture.php b/lib/PaymentRequest/Capture.php index 1da918e..b26ee75 100644 --- a/lib/PaymentRequest/Capture.php +++ b/lib/PaymentRequest/Capture.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/CaptureListResponse.php b/lib/PaymentRequest/CaptureListResponse.php index a36ec01..9a83f47 100644 --- a/lib/PaymentRequest/CaptureListResponse.php +++ b/lib/PaymentRequest/CaptureListResponse.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/CaptureParameters.php b/lib/PaymentRequest/CaptureParameters.php index 437f299..3ea50f8 100644 --- a/lib/PaymentRequest/CaptureParameters.php +++ b/lib/PaymentRequest/CaptureParameters.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/Card.php b/lib/PaymentRequest/Card.php index 90dee59..7885bf6 100644 --- a/lib/PaymentRequest/Card.php +++ b/lib/PaymentRequest/Card.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -50,6 +50,7 @@ class Card implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'channel_code' => '\Xendit\PaymentRequest\CardChannelCode', 'currency' => '\Xendit\PaymentRequest\PaymentRequestCurrency', 'channel_properties' => '\Xendit\PaymentRequest\CardChannelProperties', 'card_information' => '\Xendit\PaymentRequest\CardInformation', @@ -64,6 +65,7 @@ class Card implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'channel_code' => null, 'currency' => null, 'channel_properties' => null, 'card_information' => null, @@ -76,7 +78,8 @@ class Card implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'currency' => false, + 'channel_code' => false, + 'currency' => false, 'channel_properties' => false, 'card_information' => false, 'card_verification_results' => true @@ -168,6 +171,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'channel_code' => 'channel_code', 'currency' => 'currency', 'channel_properties' => 'channel_properties', 'card_information' => 'card_information', @@ -180,6 +184,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'channel_code' => 'setChannelCode', 'currency' => 'setCurrency', 'channel_properties' => 'setChannelProperties', 'card_information' => 'setCardInformation', @@ -192,6 +197,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'channel_code' => 'getChannelCode', 'currency' => 'getCurrency', 'channel_properties' => 'getChannelProperties', 'card_information' => 'getCardInformation', @@ -255,6 +261,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('channel_code', $data ?? [], null); $this->setIfExists('currency', $data ?? [], null); $this->setIfExists('channel_properties', $data ?? [], null); $this->setIfExists('card_information', $data ?? [], null); @@ -288,15 +295,9 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['currency'] === null) { - $invalidProperties[] = "'currency' can't be null"; - } if ($this->container['channel_properties'] === null) { $invalidProperties[] = "'channel_properties' can't be null"; } - if ($this->container['card_information'] === null) { - $invalidProperties[] = "'card_information' can't be null"; - } return $invalidProperties; } @@ -312,10 +313,37 @@ public function valid() } + /** + * Gets channel_code + * + * @return \PaymentRequest\CardChannelCode|null + */ + public function getChannelCode() + { + return $this->container['channel_code']; + } + + /** + * Sets channel_code + * + * @param \PaymentRequest\CardChannelCode|null $channel_code channel_code + * + * @return self + */ + public function setChannelCode($channel_code) + { + if (is_null($channel_code)) { + throw new \InvalidArgumentException('non-nullable channel_code cannot be null'); + } + $this->container['channel_code'] = $channel_code; + + return $this; + } + /** * Gets currency * - * @return \PaymentRequest\PaymentRequestCurrency + * @return \PaymentRequest\PaymentRequestCurrency|null */ public function getCurrency() { @@ -325,7 +353,7 @@ public function getCurrency() /** * Sets currency * - * @param \PaymentRequest\PaymentRequestCurrency $currency currency + * @param \PaymentRequest\PaymentRequestCurrency|null $currency currency * * @return self */ @@ -369,7 +397,7 @@ public function setChannelProperties($channel_properties) /** * Gets card_information * - * @return \PaymentRequest\CardInformation + * @return \PaymentRequest\CardInformation|null */ public function getCardInformation() { @@ -379,7 +407,7 @@ public function getCardInformation() /** * Sets card_information * - * @param \PaymentRequest\CardInformation $card_information card_information + * @param \PaymentRequest\CardInformation|null $card_information card_information * * @return self */ diff --git a/lib/PaymentRequest/CardChannelCode.php b/lib/PaymentRequest/CardChannelCode.php new file mode 100644 index 0000000..d551586 --- /dev/null +++ b/lib/PaymentRequest/CardChannelCode.php @@ -0,0 +1,78 @@ +value = $value; + } + + public function getValue() { + return $this->value; + } + + public function setValue($value) { + if (!self::isValid($value)) { + throw new \InvalidArgumentException(sprintf('Invalid value for enum CardChannelCode: %s', $value)); + } + $this->value = $value; + } + + public function __toString() { + return (string)$this->value; + } + + /** + * Gets allowable values of the enum + * @return string[] + */ + public static function getAllowableEnumValues() + { + return [ + self::GPN, + self::XENDIT_ENUM_DEFAULT_FALLBACK + ]; + } +} + + diff --git a/lib/PaymentRequest/CardChannelProperties.php b/lib/PaymentRequest/CardChannelProperties.php index c2471ae..2587c88 100644 --- a/lib/PaymentRequest/CardChannelProperties.php +++ b/lib/PaymentRequest/CardChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -55,7 +55,8 @@ class CardChannelProperties implements ModelInterface, ArrayAccess, \JsonSeriali 'success_return_url' => 'string', 'failure_return_url' => 'string', 'cardonfile_type' => 'string', - 'merchant_id_tag' => 'string' + 'merchant_id_tag' => 'string', + 'expires_at' => '\DateTime' ]; /** @@ -70,7 +71,8 @@ class CardChannelProperties implements ModelInterface, ArrayAccess, \JsonSeriali 'success_return_url' => null, 'failure_return_url' => null, 'cardonfile_type' => null, - 'merchant_id_tag' => null + 'merchant_id_tag' => null, + 'expires_at' => 'date-time' ]; /** @@ -83,7 +85,8 @@ class CardChannelProperties implements ModelInterface, ArrayAccess, \JsonSeriali 'success_return_url' => true, 'failure_return_url' => true, 'cardonfile_type' => true, - 'merchant_id_tag' => false + 'merchant_id_tag' => false, + 'expires_at' => false ]; /** @@ -176,7 +179,8 @@ public function isNullableSetToNull(string $property): bool 'success_return_url' => 'success_return_url', 'failure_return_url' => 'failure_return_url', 'cardonfile_type' => 'cardonfile_type', - 'merchant_id_tag' => 'merchant_id_tag' + 'merchant_id_tag' => 'merchant_id_tag', + 'expires_at' => 'expires_at' ]; /** @@ -189,7 +193,8 @@ public function isNullableSetToNull(string $property): bool 'success_return_url' => 'setSuccessReturnUrl', 'failure_return_url' => 'setFailureReturnUrl', 'cardonfile_type' => 'setCardonfileType', - 'merchant_id_tag' => 'setMerchantIdTag' + 'merchant_id_tag' => 'setMerchantIdTag', + 'expires_at' => 'setExpiresAt' ]; /** @@ -202,7 +207,8 @@ public function isNullableSetToNull(string $property): bool 'success_return_url' => 'getSuccessReturnUrl', 'failure_return_url' => 'getFailureReturnUrl', 'cardonfile_type' => 'getCardonfileType', - 'merchant_id_tag' => 'getMerchantIdTag' + 'merchant_id_tag' => 'getMerchantIdTag', + 'expires_at' => 'getExpiresAt' ]; /** @@ -267,6 +273,7 @@ public function __construct(array $data = null) $this->setIfExists('failure_return_url', $data ?? [], null); $this->setIfExists('cardonfile_type', $data ?? [], null); $this->setIfExists('merchant_id_tag', $data ?? [], null); + $this->setIfExists('expires_at', $data ?? [], null); } /** @@ -491,6 +498,33 @@ public function setMerchantIdTag($merchant_id_tag) return $this; } + + /** + * Gets expires_at + * + * @return \DateTime|null + */ + public function getExpiresAt() + { + return $this->container['expires_at']; + } + + /** + * Sets expires_at + * + * @param \DateTime|null $expires_at expires_at + * + * @return self + */ + public function setExpiresAt($expires_at) + { + if (is_null($expires_at)) { + throw new \InvalidArgumentException('non-nullable expires_at cannot be null'); + } + $this->container['expires_at'] = $expires_at; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/PaymentRequest/CardInformation.php b/lib/PaymentRequest/CardInformation.php index 1dcb073..da15647 100644 --- a/lib/PaymentRequest/CardInformation.php +++ b/lib/PaymentRequest/CardInformation.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -60,7 +60,9 @@ class CardInformation implements ModelInterface, ArrayAccess, \JsonSerializable 'type' => 'string', 'network' => 'string', 'country' => 'string', - 'issuer' => 'string' + 'issuer' => 'string', + 'card_number' => 'string', + 'one_time_token' => 'string' ]; /** @@ -80,7 +82,9 @@ class CardInformation implements ModelInterface, ArrayAccess, \JsonSerializable 'type' => null, 'network' => null, 'country' => null, - 'issuer' => null + 'issuer' => null, + 'card_number' => null, + 'one_time_token' => null ]; /** @@ -98,7 +102,9 @@ class CardInformation implements ModelInterface, ArrayAccess, \JsonSerializable 'type' => false, 'network' => false, 'country' => false, - 'issuer' => false + 'issuer' => false, + 'card_number' => false, + 'one_time_token' => false ]; /** @@ -196,7 +202,9 @@ public function isNullableSetToNull(string $property): bool 'type' => 'type', 'network' => 'network', 'country' => 'country', - 'issuer' => 'issuer' + 'issuer' => 'issuer', + 'card_number' => 'card_number', + 'one_time_token' => 'one_time_token' ]; /** @@ -214,7 +222,9 @@ public function isNullableSetToNull(string $property): bool 'type' => 'setType', 'network' => 'setNetwork', 'country' => 'setCountry', - 'issuer' => 'setIssuer' + 'issuer' => 'setIssuer', + 'card_number' => 'setCardNumber', + 'one_time_token' => 'setOneTimeToken' ]; /** @@ -232,7 +242,9 @@ public function isNullableSetToNull(string $property): bool 'type' => 'getType', 'network' => 'getNetwork', 'country' => 'getCountry', - 'issuer' => 'getIssuer' + 'issuer' => 'getIssuer', + 'card_number' => 'getCardNumber', + 'one_time_token' => 'getOneTimeToken' ]; /** @@ -323,6 +335,8 @@ public function __construct(array $data = null) $this->setIfExists('network', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('issuer', $data ?? [], null); + $this->setIfExists('card_number', $data ?? [], null); + $this->setIfExists('one_time_token', $data ?? [], null); } /** @@ -352,18 +366,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['token_id'] === null) { - $invalidProperties[] = "'token_id' can't be null"; - } - if ($this->container['masked_card_number'] === null) { - $invalidProperties[] = "'masked_card_number' can't be null"; - } - if ($this->container['expiry_month'] === null) { - $invalidProperties[] = "'expiry_month' can't be null"; - } - if ($this->container['expiry_year'] === null) { - $invalidProperties[] = "'expiry_year' can't be null"; - } $allowedValues = $this->getNetworkAllowableValues(); if (!is_null($this->container['network']) && !in_array($this->container['network'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -391,7 +393,7 @@ public function valid() /** * Gets token_id * - * @return string + * @return string|null */ public function getTokenId() { @@ -401,7 +403,7 @@ public function getTokenId() /** * Sets token_id * - * @param string $token_id token_id + * @param string|null $token_id token_id * * @return self */ @@ -418,7 +420,7 @@ public function setTokenId($token_id) /** * Gets masked_card_number * - * @return string + * @return string|null */ public function getMaskedCardNumber() { @@ -428,7 +430,7 @@ public function getMaskedCardNumber() /** * Sets masked_card_number * - * @param string $masked_card_number 1st 6 and last 4 digits of the card + * @param string|null $masked_card_number 1st 6 and last 4 digits of the card * * @return self */ @@ -445,7 +447,7 @@ public function setMaskedCardNumber($masked_card_number) /** * Gets expiry_month * - * @return string + * @return string|null */ public function getExpiryMonth() { @@ -455,7 +457,7 @@ public function getExpiryMonth() /** * Sets expiry_month * - * @param string $expiry_month Card expiry month in MM format + * @param string|null $expiry_month Card expiry month in MM format * * @return self */ @@ -472,7 +474,7 @@ public function setExpiryMonth($expiry_month) /** * Gets expiry_year * - * @return string + * @return string|null */ public function getExpiryYear() { @@ -482,7 +484,7 @@ public function getExpiryYear() /** * Sets expiry_year * - * @param string $expiry_year Card expiry month in YY format + * @param string|null $expiry_year Card expiry month in YY format * * @return self */ @@ -674,6 +676,60 @@ public function setIssuer($issuer) return $this; } + + /** + * Gets card_number + * + * @return string|null + */ + public function getCardNumber() + { + return $this->container['card_number']; + } + + /** + * Sets card_number + * + * @param string|null $card_number card_number + * + * @return self + */ + public function setCardNumber($card_number) + { + if (is_null($card_number)) { + throw new \InvalidArgumentException('non-nullable card_number cannot be null'); + } + $this->container['card_number'] = $card_number; + + return $this; + } + + /** + * Gets one_time_token + * + * @return string|null + */ + public function getOneTimeToken() + { + return $this->container['one_time_token']; + } + + /** + * Sets one_time_token + * + * @param string|null $one_time_token one_time_token + * + * @return self + */ + public function setOneTimeToken($one_time_token) + { + if (is_null($one_time_token)) { + throw new \InvalidArgumentException('non-nullable one_time_token cannot be null'); + } + $this->container['one_time_token'] = $one_time_token; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/PaymentRequest/CardParameters.php b/lib/PaymentRequest/CardParameters.php new file mode 100644 index 0000000..f3bc400 --- /dev/null +++ b/lib/PaymentRequest/CardParameters.php @@ -0,0 +1,439 @@ + + */ +class CardParameters implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CardParameters'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'channel_properties' => '\Xendit\PaymentRequest\CardChannelProperties', + 'card_information' => '\Xendit\PaymentRequest\CardInformation' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'channel_properties' => null, + 'card_information' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'channel_properties' => false, + 'card_information' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'channel_properties' => 'channel_properties', + 'card_information' => 'card_information' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'channel_properties' => 'setChannelProperties', + 'card_information' => 'setCardInformation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'channel_properties' => 'getChannelProperties', + 'card_information' => 'getCardInformation' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('channel_properties', $data ?? [], null); + $this->setIfExists('card_information', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['channel_properties'] === null) { + $invalidProperties[] = "'channel_properties' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets channel_properties + * + * @return \PaymentRequest\CardChannelProperties + */ + public function getChannelProperties() + { + return $this->container['channel_properties']; + } + + /** + * Sets channel_properties + * + * @param \PaymentRequest\CardChannelProperties $channel_properties channel_properties + * + * @return self + */ + public function setChannelProperties($channel_properties) + { + if (is_null($channel_properties)) { + throw new \InvalidArgumentException('non-nullable channel_properties cannot be null'); + } + $this->container['channel_properties'] = $channel_properties; + + return $this; + } + + /** + * Gets card_information + * + * @return \PaymentRequest\CardInformation|null + */ + public function getCardInformation() + { + return $this->container['card_information']; + } + + /** + * Sets card_information + * + * @param \PaymentRequest\CardInformation|null $card_information card_information + * + * @return self + */ + public function setCardInformation($card_information) + { + if (is_null($card_information)) { + throw new \InvalidArgumentException('non-nullable card_information cannot be null'); + } + $this->container['card_information'] = $card_information; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/PaymentRequest/CardVerificationResults.php b/lib/PaymentRequest/CardVerificationResults.php index f2f7904..65d228a 100644 --- a/lib/PaymentRequest/CardVerificationResults.php +++ b/lib/PaymentRequest/CardVerificationResults.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/CardVerificationResultsThreeDSecure.php b/lib/PaymentRequest/CardVerificationResultsThreeDSecure.php index 50d7df1..5579204 100644 --- a/lib/PaymentRequest/CardVerificationResultsThreeDSecure.php +++ b/lib/PaymentRequest/CardVerificationResultsThreeDSecure.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/DirectDebit.php b/lib/PaymentRequest/DirectDebit.php index fc45b9d..3ab22d2 100644 --- a/lib/PaymentRequest/DirectDebit.php +++ b/lib/PaymentRequest/DirectDebit.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/DirectDebitAllOf.php b/lib/PaymentRequest/DirectDebitAllOf.php index f51eeb9..2f90464 100644 --- a/lib/PaymentRequest/DirectDebitAllOf.php +++ b/lib/PaymentRequest/DirectDebitAllOf.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/DirectDebitBankAccount.php b/lib/PaymentRequest/DirectDebitBankAccount.php index 0819a16..1c3d4a5 100644 --- a/lib/PaymentRequest/DirectDebitBankAccount.php +++ b/lib/PaymentRequest/DirectDebitBankAccount.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/DirectDebitChannelCode.php b/lib/PaymentRequest/DirectDebitChannelCode.php index 0b1b3a7..7d203bf 100644 --- a/lib/PaymentRequest/DirectDebitChannelCode.php +++ b/lib/PaymentRequest/DirectDebitChannelCode.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -49,6 +49,8 @@ class DirectDebitChannelCode public const BPI = 'BPI'; + public const BPI_RECURRING = 'BPI_RECURRING'; + public const BDO = 'BDO'; public const CIMBNIAGA = 'CIMBNIAGA'; @@ -59,7 +61,9 @@ class DirectDebitChannelCode public const UBP = 'UBP'; - public const AUTODEBIT_UBP = 'AUTODEBIT_UBP'; + public const UBP_EADA = 'UBP_EADA'; + + public const UBP_DEBIT_PULL = 'UBP_DEBIT_PULL'; public const CHINABANK = 'CHINABANK'; @@ -163,6 +167,36 @@ class DirectDebitChannelCode public const UOB_FPX_BUSINESS = 'UOB_FPX_BUSINESS'; + public const BDO_ONLINE_BANKING = 'BDO_ONLINE_BANKING'; + + public const BPI_ONLINE_BANKING = 'BPI_ONLINE_BANKING'; + + public const UNIONBANK_ONLINE_BANKING = 'UNIONBANK_ONLINE_BANKING'; + + public const BOC_ONLINE_BANKING = 'BOC_ONLINE_BANKING'; + + public const CHINABANK_ONLINE_BANKING = 'CHINABANK_ONLINE_BANKING'; + + public const INSTAPAY_ONLINE_BANKING = 'INSTAPAY_ONLINE_BANKING'; + + public const LANDBANK_ONLINE_BANKING = 'LANDBANK_ONLINE_BANKING'; + + public const MAYBANK_ONLINE_BANKING = 'MAYBANK_ONLINE_BANKING'; + + public const METROBANK_ONLINE_BANKING = 'METROBANK_ONLINE_BANKING'; + + public const PNB_ONLINE_BANKING = 'PNB_ONLINE_BANKING'; + + public const PSBANK_ONLINE_BANKING = 'PSBANK_ONLINE_BANKING'; + + public const PESONET_ONLINE_BANKING = 'PESONET_ONLINE_BANKING'; + + public const RCBC_ONLINE_BANKING = 'RCBC_ONLINE_BANKING'; + + public const ROBINSONS_BANK_ONLINE_BANKING = 'ROBINSONS_BANK_ONLINE_BANKING'; + + public const SECURITY_BANK_ONLINE_BANKING = 'SECURITY_BANK_ONLINE_BANKING'; + public const XENDIT_ENUM_DEFAULT_FALLBACK = 'UNKNOWN_ENUM_VALUE'; private $value; @@ -199,12 +233,14 @@ public static function getAllowableEnumValues() self::BNI, self::MANDIRI, self::BPI, + self::BPI_RECURRING, self::BDO, self::CIMBNIAGA, self::MTB, self::RCBC, self::UBP, - self::AUTODEBIT_UBP, + self::UBP_EADA, + self::UBP_DEBIT_PULL, self::CHINABANK, self::BAY, self::KTB, @@ -256,6 +292,21 @@ public static function getAllowableEnumValues() self::RHB_FPX_BUSINESS, self::SCH_FPX_BUSINESS, self::UOB_FPX_BUSINESS, + self::BDO_ONLINE_BANKING, + self::BPI_ONLINE_BANKING, + self::UNIONBANK_ONLINE_BANKING, + self::BOC_ONLINE_BANKING, + self::CHINABANK_ONLINE_BANKING, + self::INSTAPAY_ONLINE_BANKING, + self::LANDBANK_ONLINE_BANKING, + self::MAYBANK_ONLINE_BANKING, + self::METROBANK_ONLINE_BANKING, + self::PNB_ONLINE_BANKING, + self::PSBANK_ONLINE_BANKING, + self::PESONET_ONLINE_BANKING, + self::RCBC_ONLINE_BANKING, + self::ROBINSONS_BANK_ONLINE_BANKING, + self::SECURITY_BANK_ONLINE_BANKING, self::XENDIT_ENUM_DEFAULT_FALLBACK ]; } diff --git a/lib/PaymentRequest/DirectDebitChannelProperties.php b/lib/PaymentRequest/DirectDebitChannelProperties.php index d321c39..5ba15be 100644 --- a/lib/PaymentRequest/DirectDebitChannelProperties.php +++ b/lib/PaymentRequest/DirectDebitChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -50,14 +50,14 @@ class DirectDebitChannelProperties implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ + 'email' => 'string', 'mobile_number' => 'string', 'success_return_url' => 'string', 'failure_return_url' => 'string', 'identity_document_number' => 'string', 'account_number' => 'string', 'card_last_four' => 'string', - 'card_expiry' => 'string', - 'email' => 'string' + 'card_expiry' => 'string' ]; /** @@ -68,14 +68,14 @@ class DirectDebitChannelProperties implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ + 'email' => null, 'mobile_number' => null, 'success_return_url' => 'uri', 'failure_return_url' => 'uri', 'identity_document_number' => null, 'account_number' => null, 'card_last_four' => null, - 'card_expiry' => null, - 'email' => null + 'card_expiry' => null ]; /** @@ -84,14 +84,14 @@ class DirectDebitChannelProperties implements ModelInterface, ArrayAccess, \Json * @var boolean[] */ protected static array $openAPINullables = [ - 'mobile_number' => false, + 'email' => false, + 'mobile_number' => false, 'success_return_url' => false, 'failure_return_url' => false, 'identity_document_number' => false, 'account_number' => false, 'card_last_four' => false, - 'card_expiry' => false, - 'email' => false + 'card_expiry' => false ]; /** @@ -180,14 +180,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'email' => 'email', 'mobile_number' => 'mobile_number', 'success_return_url' => 'success_return_url', 'failure_return_url' => 'failure_return_url', 'identity_document_number' => 'identity_document_number', 'account_number' => 'account_number', 'card_last_four' => 'card_last_four', - 'card_expiry' => 'card_expiry', - 'email' => 'email' + 'card_expiry' => 'card_expiry' ]; /** @@ -196,14 +196,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'email' => 'setEmail', 'mobile_number' => 'setMobileNumber', 'success_return_url' => 'setSuccessReturnUrl', 'failure_return_url' => 'setFailureReturnUrl', 'identity_document_number' => 'setIdentityDocumentNumber', 'account_number' => 'setAccountNumber', 'card_last_four' => 'setCardLastFour', - 'card_expiry' => 'setCardExpiry', - 'email' => 'setEmail' + 'card_expiry' => 'setCardExpiry' ]; /** @@ -212,14 +212,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'email' => 'getEmail', 'mobile_number' => 'getMobileNumber', 'success_return_url' => 'getSuccessReturnUrl', 'failure_return_url' => 'getFailureReturnUrl', 'identity_document_number' => 'getIdentityDocumentNumber', 'account_number' => 'getAccountNumber', 'card_last_four' => 'getCardLastFour', - 'card_expiry' => 'getCardExpiry', - 'email' => 'getEmail' + 'card_expiry' => 'getCardExpiry' ]; /** @@ -279,6 +279,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('email', $data ?? [], null); $this->setIfExists('mobile_number', $data ?? [], null); $this->setIfExists('success_return_url', $data ?? [], null); $this->setIfExists('failure_return_url', $data ?? [], null); @@ -286,7 +287,6 @@ public function __construct(array $data = null) $this->setIfExists('account_number', $data ?? [], null); $this->setIfExists('card_last_four', $data ?? [], null); $this->setIfExists('card_expiry', $data ?? [], null); - $this->setIfExists('email', $data ?? [], null); } /** @@ -331,6 +331,33 @@ public function valid() } + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email Email address of the customer that is registered to the partner channel + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + /** * Gets mobile_number * @@ -519,33 +546,6 @@ public function setCardExpiry($card_expiry) return $this; } - - /** - * Gets email - * - * @return string|null - */ - public function getEmail() - { - return $this->container['email']; - } - - /** - * Sets email - * - * @param string|null $email Email address of the customer that is registered to the partner channel - * - * @return self - */ - public function setEmail($email) - { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); - } - $this->container['email'] = $email; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/PaymentRequest/DirectDebitChannelPropertiesBankAccount.php b/lib/PaymentRequest/DirectDebitChannelPropertiesBankAccount.php index 3e6d0de..7b0b555 100644 --- a/lib/PaymentRequest/DirectDebitChannelPropertiesBankAccount.php +++ b/lib/PaymentRequest/DirectDebitChannelPropertiesBankAccount.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/DirectDebitChannelPropertiesBankRedirect.php b/lib/PaymentRequest/DirectDebitChannelPropertiesBankRedirect.php index c284ab3..f937983 100644 --- a/lib/PaymentRequest/DirectDebitChannelPropertiesBankRedirect.php +++ b/lib/PaymentRequest/DirectDebitChannelPropertiesBankRedirect.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -51,6 +51,7 @@ class DirectDebitChannelPropertiesBankRedirect implements ModelInterface, ArrayA * @var string[] */ protected static $openAPITypes = [ + 'email' => 'string', 'mobile_number' => 'string', 'success_return_url' => 'string', 'failure_return_url' => 'string' @@ -64,6 +65,7 @@ class DirectDebitChannelPropertiesBankRedirect implements ModelInterface, ArrayA * @psalm-var array */ protected static $openAPIFormats = [ + 'email' => null, 'mobile_number' => null, 'success_return_url' => 'uri', 'failure_return_url' => 'uri' @@ -75,7 +77,8 @@ class DirectDebitChannelPropertiesBankRedirect implements ModelInterface, ArrayA * @var boolean[] */ protected static array $openAPINullables = [ - 'mobile_number' => false, + 'email' => false, + 'mobile_number' => false, 'success_return_url' => false, 'failure_return_url' => false ]; @@ -166,6 +169,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'email' => 'email', 'mobile_number' => 'mobile_number', 'success_return_url' => 'success_return_url', 'failure_return_url' => 'failure_return_url' @@ -177,6 +181,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'email' => 'setEmail', 'mobile_number' => 'setMobileNumber', 'success_return_url' => 'setSuccessReturnUrl', 'failure_return_url' => 'setFailureReturnUrl' @@ -188,6 +193,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'email' => 'getEmail', 'mobile_number' => 'getMobileNumber', 'success_return_url' => 'getSuccessReturnUrl', 'failure_return_url' => 'getFailureReturnUrl' @@ -250,6 +256,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('email', $data ?? [], null); $this->setIfExists('mobile_number', $data ?? [], null); $this->setIfExists('success_return_url', $data ?? [], null); $this->setIfExists('failure_return_url', $data ?? [], null); @@ -297,6 +304,33 @@ public function valid() } + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + /** * Gets mobile_number * diff --git a/lib/PaymentRequest/DirectDebitChannelPropertiesDebitCard.php b/lib/PaymentRequest/DirectDebitChannelPropertiesDebitCard.php index 694e874..3920627 100644 --- a/lib/PaymentRequest/DirectDebitChannelPropertiesDebitCard.php +++ b/lib/PaymentRequest/DirectDebitChannelPropertiesDebitCard.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/DirectDebitDebitCard.php b/lib/PaymentRequest/DirectDebitDebitCard.php index 4fcdd90..5353776 100644 --- a/lib/PaymentRequest/DirectDebitDebitCard.php +++ b/lib/PaymentRequest/DirectDebitDebitCard.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/DirectDebitParameters.php b/lib/PaymentRequest/DirectDebitParameters.php index e6cabf0..3a2bc72 100644 --- a/lib/PaymentRequest/DirectDebitParameters.php +++ b/lib/PaymentRequest/DirectDebitParameters.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/DirectDebitType.php b/lib/PaymentRequest/DirectDebitType.php index 8e7ad36..2f95631 100644 --- a/lib/PaymentRequest/DirectDebitType.php +++ b/lib/PaymentRequest/DirectDebitType.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/EWallet.php b/lib/PaymentRequest/EWallet.php index 320e8e3..f419d55 100644 --- a/lib/PaymentRequest/EWallet.php +++ b/lib/PaymentRequest/EWallet.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/EWalletAccount.php b/lib/PaymentRequest/EWalletAccount.php index 757d02e..c539b4a 100644 --- a/lib/PaymentRequest/EWalletAccount.php +++ b/lib/PaymentRequest/EWalletAccount.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/EWalletAllOf.php b/lib/PaymentRequest/EWalletAllOf.php index e536caf..d7e6aba 100644 --- a/lib/PaymentRequest/EWalletAllOf.php +++ b/lib/PaymentRequest/EWalletAllOf.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/EWalletChannelCode.php b/lib/PaymentRequest/EWalletChannelCode.php index 543b6cf..2036152 100644 --- a/lib/PaymentRequest/EWalletChannelCode.php +++ b/lib/PaymentRequest/EWalletChannelCode.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -75,7 +75,7 @@ class EWalletChannelCode public const ALIPAY = 'ALIPAY'; - public const TOUCHANDGO = 'TOUCHANDGO'; + public const TOUCHNGO = 'TOUCHNGO'; public const XENDIT_ENUM_DEFAULT_FALLBACK = 'UNKNOWN_ENUM_VALUE'; @@ -126,7 +126,7 @@ public static function getAllowableEnumValues() self::LINEPAY, self::TRUEMONEY, self::ALIPAY, - self::TOUCHANDGO, + self::TOUCHNGO, self::XENDIT_ENUM_DEFAULT_FALLBACK ]; } diff --git a/lib/PaymentRequest/EWalletChannelProperties.php b/lib/PaymentRequest/EWalletChannelProperties.php index 3594e7c..d2b2041 100644 --- a/lib/PaymentRequest/EWalletChannelProperties.php +++ b/lib/PaymentRequest/EWalletChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -52,11 +52,13 @@ class EWalletChannelProperties implements ModelInterface, ArrayAccess, \JsonSeri */ protected static $openAPITypes = [ 'success_return_url' => 'string', + 'pending_return_url' => 'string', 'failure_return_url' => 'string', 'cancel_return_url' => 'string', 'redeem_points' => 'string', 'mobile_number' => 'string', - 'cashtag' => 'string' + 'cashtag' => 'string', + 'promotion_label' => 'string' ]; /** @@ -68,11 +70,13 @@ class EWalletChannelProperties implements ModelInterface, ArrayAccess, \JsonSeri */ protected static $openAPIFormats = [ 'success_return_url' => null, + 'pending_return_url' => null, 'failure_return_url' => null, 'cancel_return_url' => null, 'redeem_points' => null, 'mobile_number' => null, - 'cashtag' => null + 'cashtag' => null, + 'promotion_label' => null ]; /** @@ -82,11 +86,13 @@ class EWalletChannelProperties implements ModelInterface, ArrayAccess, \JsonSeri */ protected static array $openAPINullables = [ 'success_return_url' => false, + 'pending_return_url' => false, 'failure_return_url' => false, 'cancel_return_url' => false, 'redeem_points' => false, 'mobile_number' => false, - 'cashtag' => false + 'cashtag' => false, + 'promotion_label' => false ]; /** @@ -176,11 +182,13 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'success_return_url' => 'success_return_url', + 'pending_return_url' => 'pending_return_url', 'failure_return_url' => 'failure_return_url', 'cancel_return_url' => 'cancel_return_url', 'redeem_points' => 'redeem_points', 'mobile_number' => 'mobile_number', - 'cashtag' => 'cashtag' + 'cashtag' => 'cashtag', + 'promotion_label' => 'promotion_label' ]; /** @@ -190,11 +198,13 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'success_return_url' => 'setSuccessReturnUrl', + 'pending_return_url' => 'setPendingReturnUrl', 'failure_return_url' => 'setFailureReturnUrl', 'cancel_return_url' => 'setCancelReturnUrl', 'redeem_points' => 'setRedeemPoints', 'mobile_number' => 'setMobileNumber', - 'cashtag' => 'setCashtag' + 'cashtag' => 'setCashtag', + 'promotion_label' => 'setPromotionLabel' ]; /** @@ -204,11 +214,13 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'success_return_url' => 'getSuccessReturnUrl', + 'pending_return_url' => 'getPendingReturnUrl', 'failure_return_url' => 'getFailureReturnUrl', 'cancel_return_url' => 'getCancelReturnUrl', 'redeem_points' => 'getRedeemPoints', 'mobile_number' => 'getMobileNumber', - 'cashtag' => 'getCashtag' + 'cashtag' => 'getCashtag', + 'promotion_label' => 'getPromotionLabel' ]; /** @@ -269,11 +281,13 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('success_return_url', $data ?? [], null); + $this->setIfExists('pending_return_url', $data ?? [], null); $this->setIfExists('failure_return_url', $data ?? [], null); $this->setIfExists('cancel_return_url', $data ?? [], null); $this->setIfExists('redeem_points', $data ?? [], null); $this->setIfExists('mobile_number', $data ?? [], null); $this->setIfExists('cashtag', $data ?? [], null); + $this->setIfExists('promotion_label', $data ?? [], null); } /** @@ -307,6 +321,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'success_return_url', must be conform to the pattern /^\\S{1,255}:\/\/\\S{0,1000}$/."; } + if (!is_null($this->container['pending_return_url']) && !preg_match("/^\\S{1,255}:\/\/\\S{0,1000}$/", $this->container['pending_return_url'])) { + $invalidProperties[] = "invalid value for 'pending_return_url', must be conform to the pattern /^\\S{1,255}:\/\/\\S{0,1000}$/."; + } + if (!is_null($this->container['failure_return_url']) && !preg_match("/^\\S{1,255}:\/\/\\S{0,1000}$/", $this->container['failure_return_url'])) { $invalidProperties[] = "invalid value for 'failure_return_url', must be conform to the pattern /^\\S{1,255}:\/\/\\S{0,1000}$/."; } @@ -362,6 +380,38 @@ public function setSuccessReturnUrl($success_return_url) return $this; } + /** + * Gets pending_return_url + * + * @return string|null + */ + public function getPendingReturnUrl() + { + return $this->container['pending_return_url']; + } + + /** + * Sets pending_return_url + * + * @param string|null $pending_return_url URL where the end-customer is redirected if the authorization is successful + * + * @return self + */ + public function setPendingReturnUrl($pending_return_url) + { + if (is_null($pending_return_url)) { + throw new \InvalidArgumentException('non-nullable pending_return_url cannot be null'); + } + + if ((!preg_match("/^\\S{1,255}:\/\/\\S{0,1000}$/", $pending_return_url))) { + throw new \InvalidArgumentException("invalid value for \$pending_return_url when calling EWalletChannelProperties., must conform to the pattern /^\\S{1,255}:\/\/\\S{0,1000}$/."); + } + + $this->container['pending_return_url'] = $pending_return_url; + + return $this; + } + /** * Gets failure_return_url * @@ -506,6 +556,33 @@ public function setCashtag($cashtag) return $this; } + + /** + * Gets promotion_label + * + * @return string|null + */ + public function getPromotionLabel() + { + return $this->container['promotion_label']; + } + + /** + * Sets promotion_label + * + * @param string|null $promotion_label promotion_label + * + * @return self + */ + public function setPromotionLabel($promotion_label) + { + if (is_null($promotion_label)) { + throw new \InvalidArgumentException('non-nullable promotion_label cannot be null'); + } + $this->container['promotion_label'] = $promotion_label; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/PaymentRequest/EWalletParameters.php b/lib/PaymentRequest/EWalletParameters.php index 295b9c8..975b302 100644 --- a/lib/PaymentRequest/EWalletParameters.php +++ b/lib/PaymentRequest/EWalletParameters.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/Error.php b/lib/PaymentRequest/Error.php index 257f63f..5e9b79c 100644 --- a/lib/PaymentRequest/Error.php +++ b/lib/PaymentRequest/Error.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/InvoicePartnerMetadata.php b/lib/PaymentRequest/InvoicePartnerMetadata.php index 56b33ce..7938d52 100644 --- a/lib/PaymentRequest/InvoicePartnerMetadata.php +++ b/lib/PaymentRequest/InvoicePartnerMetadata.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/OverTheCounter.php b/lib/PaymentRequest/OverTheCounter.php index 8c42f84..62f86c3 100644 --- a/lib/PaymentRequest/OverTheCounter.php +++ b/lib/PaymentRequest/OverTheCounter.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/OverTheCounterChannelCode.php b/lib/PaymentRequest/OverTheCounterChannelCode.php index e1b4e62..dba9898 100644 --- a/lib/PaymentRequest/OverTheCounterChannelCode.php +++ b/lib/PaymentRequest/OverTheCounterChannelCode.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/OverTheCounterChannelProperties.php b/lib/PaymentRequest/OverTheCounterChannelProperties.php index 0e47cbd..93da8be 100644 --- a/lib/PaymentRequest/OverTheCounterChannelProperties.php +++ b/lib/PaymentRequest/OverTheCounterChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/OverTheCounterParameters.php b/lib/PaymentRequest/OverTheCounterParameters.php index b40ca23..d134c2d 100644 --- a/lib/PaymentRequest/OverTheCounterParameters.php +++ b/lib/PaymentRequest/OverTheCounterParameters.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentCallback.php b/lib/PaymentRequest/PaymentCallback.php index 6e64211..5a2bb07 100644 --- a/lib/PaymentRequest/PaymentCallback.php +++ b/lib/PaymentRequest/PaymentCallback.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentCallbackData.php b/lib/PaymentRequest/PaymentCallbackData.php index 6797d4c..6a21c8d 100644 --- a/lib/PaymentRequest/PaymentCallbackData.php +++ b/lib/PaymentRequest/PaymentCallbackData.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentMethod.php b/lib/PaymentRequest/PaymentMethod.php index 7625818..8bd071b 100644 --- a/lib/PaymentRequest/PaymentMethod.php +++ b/lib/PaymentRequest/PaymentMethod.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentMethodParameters.php b/lib/PaymentRequest/PaymentMethodParameters.php index 72e3a81..161c48c 100644 --- a/lib/PaymentRequest/PaymentMethodParameters.php +++ b/lib/PaymentRequest/PaymentMethodParameters.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -54,6 +54,7 @@ class PaymentMethodParameters implements ModelInterface, ArrayAccess, \JsonSeria 'reusability' => '\Xendit\PaymentRequest\PaymentMethodReusability', 'description' => 'string', 'reference_id' => 'string', + 'card' => '\Xendit\PaymentRequest\CardParameters', 'direct_debit' => '\Xendit\PaymentRequest\DirectDebitParameters', 'ewallet' => '\Xendit\PaymentRequest\EWalletParameters', 'over_the_counter' => '\Xendit\PaymentRequest\OverTheCounterParameters', @@ -73,6 +74,7 @@ class PaymentMethodParameters implements ModelInterface, ArrayAccess, \JsonSeria 'reusability' => null, 'description' => null, 'reference_id' => null, + 'card' => null, 'direct_debit' => null, 'ewallet' => null, 'over_the_counter' => null, @@ -90,6 +92,7 @@ class PaymentMethodParameters implements ModelInterface, ArrayAccess, \JsonSeria 'reusability' => false, 'description' => true, 'reference_id' => false, + 'card' => true, 'direct_debit' => true, 'ewallet' => true, 'over_the_counter' => true, @@ -187,6 +190,7 @@ public function isNullableSetToNull(string $property): bool 'reusability' => 'reusability', 'description' => 'description', 'reference_id' => 'reference_id', + 'card' => 'card', 'direct_debit' => 'direct_debit', 'ewallet' => 'ewallet', 'over_the_counter' => 'over_the_counter', @@ -204,6 +208,7 @@ public function isNullableSetToNull(string $property): bool 'reusability' => 'setReusability', 'description' => 'setDescription', 'reference_id' => 'setReferenceId', + 'card' => 'setCard', 'direct_debit' => 'setDirectDebit', 'ewallet' => 'setEwallet', 'over_the_counter' => 'setOverTheCounter', @@ -221,6 +226,7 @@ public function isNullableSetToNull(string $property): bool 'reusability' => 'getReusability', 'description' => 'getDescription', 'reference_id' => 'getReferenceId', + 'card' => 'getCard', 'direct_debit' => 'getDirectDebit', 'ewallet' => 'getEwallet', 'over_the_counter' => 'getOverTheCounter', @@ -289,6 +295,7 @@ public function __construct(array $data = null) $this->setIfExists('reusability', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('reference_id', $data ?? [], null); + $this->setIfExists('card', $data ?? [], null); $this->setIfExists('direct_debit', $data ?? [], null); $this->setIfExists('ewallet', $data ?? [], null); $this->setIfExists('over_the_counter', $data ?? [], null); @@ -459,6 +466,40 @@ public function setReferenceId($reference_id) return $this; } + /** + * Gets card + * + * @return \PaymentRequest\CardParameters|null + */ + public function getCard() + { + return $this->container['card']; + } + + /** + * Sets card + * + * @param \PaymentRequest\CardParameters|null $card card + * + * @return self + */ + public function setCard($card) + { + if (is_null($card)) { + array_push($this->openAPINullablesSetToNull, 'card'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('card', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['card'] = $card; + + return $this; + } + /** * Gets direct_debit * diff --git a/lib/PaymentRequest/PaymentMethodReusability.php b/lib/PaymentRequest/PaymentMethodReusability.php index 2135bf6..4b6c1c2 100644 --- a/lib/PaymentRequest/PaymentMethodReusability.php +++ b/lib/PaymentRequest/PaymentMethodReusability.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentMethodStatus.php b/lib/PaymentRequest/PaymentMethodStatus.php index 3a39251..bd3ff05 100644 --- a/lib/PaymentRequest/PaymentMethodStatus.php +++ b/lib/PaymentRequest/PaymentMethodStatus.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentMethodType.php b/lib/PaymentRequest/PaymentMethodType.php index ec80436..889aecc 100644 --- a/lib/PaymentRequest/PaymentMethodType.php +++ b/lib/PaymentRequest/PaymentMethodType.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequest.php b/lib/PaymentRequest/PaymentRequest.php index 77ea012..87f765c 100644 --- a/lib/PaymentRequest/PaymentRequest.php +++ b/lib/PaymentRequest/PaymentRequest.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestAction.php b/lib/PaymentRequest/PaymentRequestAction.php index 7d0e468..7f6ec49 100644 --- a/lib/PaymentRequest/PaymentRequestAction.php +++ b/lib/PaymentRequest/PaymentRequestAction.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestApi.php b/lib/PaymentRequest/PaymentRequestApi.php index 142fcd5..b5f3903 100644 --- a/lib/PaymentRequest/PaymentRequestApi.php +++ b/lib/PaymentRequest/PaymentRequestApi.php @@ -10,7 +10,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -84,6 +84,9 @@ class PaymentRequestApi 'resendPaymentRequestAuth' => [ 'application/json', ], + 'simulatePaymentRequestPayment' => [ + 'application/json', + ], ]; /** @@ -378,7 +381,7 @@ public function createPaymentRequestRequest($idempotency_key = null, $for_user_i // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -637,7 +640,7 @@ public function getPaymentRequestByIDRequest($payment_request_id, $for_user_id = // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -911,7 +914,7 @@ public function getPaymentRequestCapturesRequest($payment_request_id, $for_user_ // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1240,7 +1243,7 @@ public function getAllPaymentRequestsRequest($for_user_id = null, $reference_id // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1512,7 +1515,7 @@ public function capturePaymentRequestRequest($payment_request_id, $for_user_id = // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1784,7 +1787,7 @@ public function authorizePaymentRequestRequest($payment_request_id, $for_user_id // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2043,7 +2046,256 @@ public function resendPaymentRequestAuthRequest($payment_request_id, $for_user_i // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; + + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation simulatePaymentRequestPayment + * + * Payment Request Simulate Payment + * + * @param string $payment_request_id payment_request_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulatePaymentRequestPayment'] to see the possible values for this operation + * + * @throws \Xendit\XenditSdkException on non-2xx response + * @throws \InvalidArgumentException + * @return \Xendit\PaymentRequest\PaymentSimulation + */ + public function simulatePaymentRequestPayment($payment_request_id, string $contentType = self::contentTypes['simulatePaymentRequestPayment'][0]) + { + list($response) = $this->simulatePaymentRequestPaymentWithHttpInfo($payment_request_id, $contentType); + return $response; + } + + /** + * Operation simulatePaymentRequestPaymentWithHttpInfo + * + * Payment Request Simulate Payment + * + * @param string $payment_request_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulatePaymentRequestPayment'] to see the possible values for this operation + * + * @throws \Xendit\XenditSdkException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Xendit\PaymentRequest\PaymentSimulation, HTTP status code, HTTP response headers (array of strings) + */ + public function simulatePaymentRequestPaymentWithHttpInfo($payment_request_id, string $contentType = self::contentTypes['simulatePaymentRequestPayment'][0]) + { + $request = $this->simulatePaymentRequestPaymentRequest($payment_request_id, $contentType); + + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new XenditSdkException( + $e->getResponse() && $e->getResponse()->getBody() ? json_decode((string) $e->getResponse()->getBody()) : null, + (string) $e->getCode(), + $e->getMessage() ? $e->getMessage() : sprintf('Error connecting to the API (%s)', "simulatePaymentRequestPaymentRequest") + ); + } catch (ConnectException $e) { + throw new XenditSdkException( + null, + (string) $e->getCode(), + $e->getMessage() ? $e->getMessage() : sprintf('Error connecting to the API (%s)', "simulatePaymentRequestPaymentRequest") + ); + } catch (GuzzleException $e) { + throw new XenditSdkException( + null, + (string) $e->getCode(), + $e->getMessage() ? $e->getMessage() : sprintf('Error instantiating client for API (%s)', "simulatePaymentRequestPaymentRequest") + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + $errBodyContent = $response->getBody() ? json_decode((string) $response->getBody()) : null; + + throw new XenditSdkException( + $errBodyContent, + (string) $statusCode, + $response->getReasonPhrase() + ); + } + $returnType = '\Xendit\PaymentRequest\PaymentSimulation'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + /** + * Operation simulatePaymentRequestPaymentAsync + * + * Payment Request Simulate Payment + * + * @param string $payment_request_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulatePaymentRequestPayment'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function simulatePaymentRequestPaymentAsync($payment_request_id, string $contentType = self::contentTypes['simulatePaymentRequestPayment'][0]) + { + return $this->simulatePaymentRequestPaymentAsyncWithHttpInfo($payment_request_id, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation simulatePaymentRequestPaymentAsyncWithHttpInfo + * + * Payment Request Simulate Payment + * + * @param string $payment_request_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulatePaymentRequestPayment'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function simulatePaymentRequestPaymentAsyncWithHttpInfo($payment_request_id, string $contentType = self::contentTypes['simulatePaymentRequestPayment'][0]) + { + $returnType = '\Xendit\PaymentRequest\PaymentSimulation'; + $request = $this->simulatePaymentRequestPaymentRequest($payment_request_id, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($e) { + throw new XenditSdkException( + $e->getResponse() && $e->getResponse()->getBody() ? json_decode((string) $e->getResponse()->getBody()) : null, + (string) $e->getCode(), + $e->getMessage() ? $e->getMessage() : sprintf('Error connecting to the API (%s)', "simulatePaymentRequestPaymentRequest") + ); + } + ); + } + + /** + * Create request for operation 'simulatePaymentRequestPayment' + * + * @param string $payment_request_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['simulatePaymentRequestPayment'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function simulatePaymentRequestPaymentRequest($payment_request_id, string $contentType = self::contentTypes['simulatePaymentRequestPayment'][0]) + { + + // verify the required parameter 'payment_request_id' is set + if ($payment_request_id === null || (is_array($payment_request_id) && count($payment_request_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $payment_request_id when calling simulatePaymentRequestPayment' + ); + } + + + $resourcePath = '/payment_requests/{paymentRequestId}/payments/simulate'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($payment_request_id !== null) { + $resourcePath = str_replace( + '{' . 'paymentRequestId' . '}', + ObjectSerializer::toPathValue($payment_request_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getApiKey() . ":"); + + $defaultHeaders = []; + + // Xendit's custom headers + $defaultHeaders['xendit-lib'] = 'php'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/PaymentRequest/PaymentRequestAuthParameters.php b/lib/PaymentRequest/PaymentRequestAuthParameters.php index 750b1ce..4bc4883 100644 --- a/lib/PaymentRequest/PaymentRequestAuthParameters.php +++ b/lib/PaymentRequest/PaymentRequestAuthParameters.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestBasketItem.php b/lib/PaymentRequest/PaymentRequestBasketItem.php index 5e1eaa2..2ebdfb4 100644 --- a/lib/PaymentRequest/PaymentRequestBasketItem.php +++ b/lib/PaymentRequest/PaymentRequestBasketItem.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestCaptureMethod.php b/lib/PaymentRequest/PaymentRequestCaptureMethod.php index b2abc89..a415bd8 100644 --- a/lib/PaymentRequest/PaymentRequestCaptureMethod.php +++ b/lib/PaymentRequest/PaymentRequestCaptureMethod.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestCardVerificationResults.php b/lib/PaymentRequest/PaymentRequestCardVerificationResults.php index 6d9ced4..bcc2152 100644 --- a/lib/PaymentRequest/PaymentRequestCardVerificationResults.php +++ b/lib/PaymentRequest/PaymentRequestCardVerificationResults.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestCardVerificationResultsThreeDeeSecure.php b/lib/PaymentRequest/PaymentRequestCardVerificationResultsThreeDeeSecure.php index 316f0cf..0049390 100644 --- a/lib/PaymentRequest/PaymentRequestCardVerificationResultsThreeDeeSecure.php +++ b/lib/PaymentRequest/PaymentRequestCardVerificationResultsThreeDeeSecure.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestChannelProperties.php b/lib/PaymentRequest/PaymentRequestChannelProperties.php index dc14834..539a7f1 100644 --- a/lib/PaymentRequest/PaymentRequestChannelProperties.php +++ b/lib/PaymentRequest/PaymentRequestChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestCountry.php b/lib/PaymentRequest/PaymentRequestCountry.php index edcba9b..44d98a9 100644 --- a/lib/PaymentRequest/PaymentRequestCountry.php +++ b/lib/PaymentRequest/PaymentRequestCountry.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestCurrency.php b/lib/PaymentRequest/PaymentRequestCurrency.php index 0f08d80..3691625 100644 --- a/lib/PaymentRequest/PaymentRequestCurrency.php +++ b/lib/PaymentRequest/PaymentRequestCurrency.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestInitiator.php b/lib/PaymentRequest/PaymentRequestInitiator.php index d34a849..10b7451 100644 --- a/lib/PaymentRequest/PaymentRequestInitiator.php +++ b/lib/PaymentRequest/PaymentRequestInitiator.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestListResponse.php b/lib/PaymentRequest/PaymentRequestListResponse.php index 38ee52a..30ba6e3 100644 --- a/lib/PaymentRequest/PaymentRequestListResponse.php +++ b/lib/PaymentRequest/PaymentRequestListResponse.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestParameters.php b/lib/PaymentRequest/PaymentRequestParameters.php index 45039b4..2790ba4 100644 --- a/lib/PaymentRequest/PaymentRequestParameters.php +++ b/lib/PaymentRequest/PaymentRequestParameters.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestParametersChannelProperties.php b/lib/PaymentRequest/PaymentRequestParametersChannelProperties.php index 7fba753..3d89cdf 100644 --- a/lib/PaymentRequest/PaymentRequestParametersChannelProperties.php +++ b/lib/PaymentRequest/PaymentRequestParametersChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestParametersChannelPropertiesAllOf.php b/lib/PaymentRequest/PaymentRequestParametersChannelPropertiesAllOf.php index 7e792d2..5c51969 100644 --- a/lib/PaymentRequest/PaymentRequestParametersChannelPropertiesAllOf.php +++ b/lib/PaymentRequest/PaymentRequestParametersChannelPropertiesAllOf.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestShippingInformation.php b/lib/PaymentRequest/PaymentRequestShippingInformation.php index 2c56b24..6aef2fa 100644 --- a/lib/PaymentRequest/PaymentRequestShippingInformation.php +++ b/lib/PaymentRequest/PaymentRequestShippingInformation.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/PaymentRequestStatus.php b/lib/PaymentRequest/PaymentRequestStatus.php index 5b422d1..b3fe541 100644 --- a/lib/PaymentRequest/PaymentRequestStatus.php +++ b/lib/PaymentRequest/PaymentRequestStatus.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -52,6 +52,8 @@ class PaymentRequestStatus public const AWAITING_CAPTURE = 'AWAITING_CAPTURE'; + public const EXPIRED = 'EXPIRED'; + public const XENDIT_ENUM_DEFAULT_FALLBACK = 'UNKNOWN_ENUM_VALUE'; private $value; @@ -90,6 +92,7 @@ public static function getAllowableEnumValues() self::VOIDED, self::UNKNOWN, self::AWAITING_CAPTURE, + self::EXPIRED, self::XENDIT_ENUM_DEFAULT_FALLBACK ]; } diff --git a/lib/PaymentRequest/PaymentSimulation.php b/lib/PaymentRequest/PaymentSimulation.php new file mode 100644 index 0000000..f4d155b --- /dev/null +++ b/lib/PaymentRequest/PaymentSimulation.php @@ -0,0 +1,436 @@ + + */ +class PaymentSimulation implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaymentSimulation'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'status' => 'string', + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'status' => null, + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'status' => false, + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'status' => 'status', + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'status' => 'setStatus', + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'status' => 'getStatus', + 'message' => 'getMessage' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message message + * + * @return self + */ + public function setMessage($message) + { + if (is_null($message)) { + throw new \InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/PaymentRequest/QRCode.php b/lib/PaymentRequest/QRCode.php index 11b5ce7..799537f 100644 --- a/lib/PaymentRequest/QRCode.php +++ b/lib/PaymentRequest/QRCode.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/QRCodeChannelCode.php b/lib/PaymentRequest/QRCodeChannelCode.php index 2c5404c..a85bc39 100644 --- a/lib/PaymentRequest/QRCodeChannelCode.php +++ b/lib/PaymentRequest/QRCodeChannelCode.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -47,6 +47,10 @@ class QRCodeChannelCode public const PROMPTPAY = 'PROMPTPAY'; + public const XENDIT = 'XENDIT'; + + public const QRPH = 'QRPH'; + public const XENDIT_ENUM_DEFAULT_FALLBACK = 'UNKNOWN_ENUM_VALUE'; private $value; @@ -82,6 +86,8 @@ public static function getAllowableEnumValues() self::RCBC, self::LINKAJA, self::PROMPTPAY, + self::XENDIT, + self::QRPH, self::XENDIT_ENUM_DEFAULT_FALLBACK ]; } diff --git a/lib/PaymentRequest/QRCodeChannelProperties.php b/lib/PaymentRequest/QRCodeChannelProperties.php index 10a1757..cc5cafa 100644 --- a/lib/PaymentRequest/QRCodeChannelProperties.php +++ b/lib/PaymentRequest/QRCodeChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/QRCodeParameters.php b/lib/PaymentRequest/QRCodeParameters.php index ce8499f..cae2859 100644 --- a/lib/PaymentRequest/QRCodeParameters.php +++ b/lib/PaymentRequest/QRCodeParameters.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/VirtualAccount.php b/lib/PaymentRequest/VirtualAccount.php index 8369f79..ac5551f 100644 --- a/lib/PaymentRequest/VirtualAccount.php +++ b/lib/PaymentRequest/VirtualAccount.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/VirtualAccountAllOf.php b/lib/PaymentRequest/VirtualAccountAllOf.php index 2b1aaf8..3528b84 100644 --- a/lib/PaymentRequest/VirtualAccountAllOf.php +++ b/lib/PaymentRequest/VirtualAccountAllOf.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/VirtualAccountAlternativeDisplay.php b/lib/PaymentRequest/VirtualAccountAlternativeDisplay.php index 30e1028..120d4b1 100644 --- a/lib/PaymentRequest/VirtualAccountAlternativeDisplay.php +++ b/lib/PaymentRequest/VirtualAccountAlternativeDisplay.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/VirtualAccountChannelCode.php b/lib/PaymentRequest/VirtualAccountChannelCode.php index 4d30625..5adb544 100644 --- a/lib/PaymentRequest/VirtualAccountChannelCode.php +++ b/lib/PaymentRequest/VirtualAccountChannelCode.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** @@ -75,6 +75,8 @@ class VirtualAccountChannelCode public const MUAMALAT = 'MUAMALAT'; + public const BANK_TRANSFER = 'BANK_TRANSFER'; + public const XENDIT_ENUM_DEFAULT_FALLBACK = 'UNKNOWN_ENUM_VALUE'; private $value; @@ -124,6 +126,7 @@ public static function getAllowableEnumValues() self::BNC, self::HANA, self::MUAMALAT, + self::BANK_TRANSFER, self::XENDIT_ENUM_DEFAULT_FALLBACK ]; } diff --git a/lib/PaymentRequest/VirtualAccountChannelProperties.php b/lib/PaymentRequest/VirtualAccountChannelProperties.php index da89613..2d1e6d3 100644 --- a/lib/PaymentRequest/VirtualAccountChannelProperties.php +++ b/lib/PaymentRequest/VirtualAccountChannelProperties.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/PaymentRequest/VirtualAccountParameters.php b/lib/PaymentRequest/VirtualAccountParameters.php index 39ac0ff..9484130 100644 --- a/lib/PaymentRequest/VirtualAccountParameters.php +++ b/lib/PaymentRequest/VirtualAccountParameters.php @@ -11,7 +11,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /** diff --git a/lib/Payout/PayoutApi.php b/lib/Payout/PayoutApi.php index ce27bd2..5f89955 100644 --- a/lib/Payout/PayoutApi.php +++ b/lib/Payout/PayoutApi.php @@ -378,7 +378,7 @@ public function createPayoutRequest($idempotency_key, $for_user_id = null, $crea // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -637,7 +637,7 @@ public function getPayoutByIdRequest($id, $for_user_id = null, string $contentTy // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -921,7 +921,7 @@ public function getPayoutChannelsRequest($currency = null, $channel_category = n // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1226,7 +1226,7 @@ public function getPayoutsRequest($reference_id, $limit = null, $after_id = null // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1485,7 +1485,7 @@ public function cancelPayoutRequest($id, $for_user_id = null, string $contentTyp // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/Refund/RefundApi.php b/lib/Refund/RefundApi.php index 601ec3a..9d4355f 100644 --- a/lib/Refund/RefundApi.php +++ b/lib/Refund/RefundApi.php @@ -361,7 +361,7 @@ public function createRefundRequest($idempotency_key = null, $for_user_id = null // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -622,7 +622,7 @@ public function getRefundRequest($refund_id, $idempotency_key = null, $for_user_ // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -958,7 +958,7 @@ public function getAllRefundsRequest($for_user_id = null, $payment_request_id = // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1219,7 +1219,7 @@ public function cancelRefundRequest($refund_id, $idempotency_key = null, $for_us // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.3.0'; + $defaultHeaders['xendit-lib-ver'] = '5.0.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/XenditSdkException.php b/lib/XenditSdkException.php index 23eeb9c..601719d 100644 --- a/lib/XenditSdkException.php +++ b/lib/XenditSdkException.php @@ -10,7 +10,7 @@ /** * Payment Requests * - * The version of the OpenAPI document: 1.45.2 + * The version of the OpenAPI document: 1.59.0 */ /**