From 8456fbea0c7203b98f36e822a7e3a2d6aa40e529 Mon Sep 17 00:00:00 2001 From: SDK Distribution Bot Date: Thu, 8 Jan 2026 07:24:24 +0000 Subject: [PATCH] fix: Update SDK from generator (2026-01-08 07:24:08 UTC) --- README.md | 3 + docs/Api/BalancesApi.md | 8 +- docs/Api/EventsApi.md | 12 +- docs/Api/PaymentTransactionsApi.md | 4 +- docs/Api/PricesApi.md | 4 +- docs/Api/StatementsApi.md | 4 +- docs/Api/TermsApi.md | 8 +- docs/Model/BalanceResponse.md | 14 +- docs/Model/BalanceURLResponse.md | 4 +- docs/Model/BankInfoResponse.md | 2 +- docs/Model/CheckoutSessionCreateRequest.md | 28 +- ...utSessionCustomerDetailsAddressResponse.md | 14 + .../CheckoutSessionCustomerDetailsResponse.md | 12 + docs/Model/CheckoutSessionDetailsResponse.md | 15 +- ...tSessionPaymentMethodOptionsCardRequest.md | 4 +- docs/Model/CheckoutSessionUpdateRequest.md | 2 +- docs/Model/CustomerCreateRequest.md | 8 +- docs/Model/CustomerResponse.md | 2 +- docs/Model/CustomerUpdateRequest.md | 6 +- docs/Model/DisplayPreferenceRequest.md | 2 +- docs/Model/EventResponse.md | 8 +- docs/Model/LineItemRequest.md | 4 +- docs/Model/PaymentFlowCancelRequest.md | 2 +- docs/Model/PaymentFlowCancellationReason.md | 8 + docs/Model/PaymentFlowCaptureRequest.md | 2 +- docs/Model/PaymentFlowConfirmRequest.md | 10 +- docs/Model/PaymentFlowCreateRequest.md | 16 +- docs/Model/PaymentFlowDataRequest.md | 4 +- ...mentFlowPaymentMethodOptionsCardRequest.md | 4 +- docs/Model/PaymentFlowResponse.md | 18 +- docs/Model/PaymentFlowUpdateRequest.md | 12 +- .../PaymentMethodApplePayCreateRequest.md | 8 +- .../PaymentMethodApplePayUpdateRequest.md | 4 +- docs/Model/PaymentMethodAttachRequest.md | 2 +- docs/Model/PaymentMethodCardCreateRequest.md | 4 +- .../Model/PaymentMethodCardDetailsResponse.md | 2 +- docs/Model/PaymentMethodCardResponse.md | 4 +- docs/Model/PaymentMethodCardUpdateRequest.md | 2 +- ...ymentMethodConfigurationDetailsResponse.md | 6 +- ...entMethodConfigurationDisplayPreference.md | 4 +- ...ymentMethodConfigurationSettingResponse.md | 2 +- docs/Model/PaymentMethodCreateRequest.md | 6 +- .../Model/PaymentMethodPayPayCreateRequest.md | 6 +- docs/Model/PaymentMethodPayPayResponse.md | 4 +- .../Model/PaymentMethodPayPayUpdateRequest.md | 4 +- docs/Model/PaymentMethodResponse.md | 4 +- docs/Model/PaymentMethodUpdateRequest.md | 2 +- docs/Model/PaymentRefundCreateRequest.md | 6 +- docs/Model/PaymentRefundResponse.md | 10 +- docs/Model/PaymentRefundUpdateRequest.md | 2 +- docs/Model/PaymentTransactionListResponse.md | 2 +- docs/Model/PaymentTransactionResponse.md | 12 +- docs/Model/PriceCreateRequest.md | 14 +- docs/Model/PriceDetailsResponse.md | 18 +- docs/Model/PriceUpdateRequest.md | 8 +- docs/Model/ProductCreateRequest.md | 13 +- docs/Model/ProductDeletedResponse.md | 4 +- docs/Model/ProductDetailsResponse.md | 6 +- docs/Model/ProductUpdateRequest.md | 12 +- docs/Model/SetupFlowCancelRequest.md | 2 +- docs/Model/SetupFlowCreateRequest.md | 10 +- docs/Model/SetupFlowDataRequest.md | 2 +- ...etupFlowPaymentMethodOptionsCardRequest.md | 2 +- docs/Model/SetupFlowResponse.md | 13 +- docs/Model/SetupFlowUpdateRequest.md | 8 +- docs/Model/StatementResponse.md | 10 +- docs/Model/StatementURLResponse.md | 4 +- docs/Model/TaxRateCreateRequest.md | 6 +- docs/Model/TaxRateDetailsResponse.md | 6 +- docs/Model/TaxRateUpdateRequest.md | 4 +- docs/Model/TermResponse.md | 6 +- lib/Api/BalancesApi.php | 20 +- lib/Api/CheckoutSessionsApi.php | 19 +- lib/Api/CustomersApi.php | 19 +- lib/Api/EventsApi.php | 30 +- lib/Api/PaymentMethodsApi.php | 19 +- lib/Api/PaymentRefundsApi.php | 19 +- lib/Api/PaymentTransactionsApi.php | 10 +- lib/Api/PricesApi.php | 63 +- lib/Api/ProductsApi.php | 106 ++- lib/Api/StatementsApi.php | 10 +- lib/Api/TaxRatesApi.php | 34 +- lib/Api/TermsApi.php | 20 +- lib/Model/BalanceResponse.php | 174 ++--- lib/Model/BalanceURLResponse.php | 4 +- lib/Model/BankInfoResponse.php | 2 +- lib/Model/CheckoutSessionCreateRequest.php | 225 +++--- ...tSessionCustomerDetailsAddressResponse.php | 640 ++++++++++++++++++ ...CheckoutSessionCustomerDetailsResponse.php | 552 +++++++++++++++ lib/Model/CheckoutSessionDetailsResponse.php | 423 ++++++------ ...SessionPaymentMethodOptionsCardRequest.php | 4 +- lib/Model/CheckoutSessionUpdateRequest.php | 2 +- lib/Model/CustomerCreateRequest.php | 160 ++--- lib/Model/CustomerResponse.php | 82 +-- lib/Model/CustomerUpdateRequest.php | 86 +-- lib/Model/DisplayPreferenceRequest.php | 2 +- lib/Model/EventResponse.php | 208 +++--- lib/Model/LineItemRequest.php | 4 +- lib/Model/PaymentFlowCancelRequest.php | 2 +- lib/Model/PaymentFlowCancellationReason.php | 59 ++ lib/Model/PaymentFlowCaptureRequest.php | 2 +- lib/Model/PaymentFlowConfirmRequest.php | 10 +- lib/Model/PaymentFlowCreateRequest.php | 16 +- lib/Model/PaymentFlowDataRequest.php | 4 +- ...entFlowPaymentMethodOptionsCardRequest.php | 4 +- lib/Model/PaymentFlowResponse.php | 384 +++++++---- lib/Model/PaymentFlowUpdateRequest.php | 12 +- .../PaymentMethodApplePayCreateRequest.php | 8 +- .../PaymentMethodApplePayUpdateRequest.php | 4 +- lib/Model/PaymentMethodAttachRequest.php | 2 +- lib/Model/PaymentMethodCardCreateRequest.php | 4 +- .../PaymentMethodCardDetailsResponse.php | 2 +- lib/Model/PaymentMethodCardResponse.php | 124 ++-- lib/Model/PaymentMethodCardUpdateRequest.php | 2 +- ...mentMethodConfigurationDetailsResponse.php | 126 ++-- ...ntMethodConfigurationDisplayPreference.php | 4 +- ...mentMethodConfigurationSettingResponse.php | 2 +- lib/Model/PaymentMethodCreateRequest.php | 6 +- .../PaymentMethodPayPayCreateRequest.php | 6 +- lib/Model/PaymentMethodPayPayResponse.php | 124 ++-- .../PaymentMethodPayPayUpdateRequest.php | 4 +- lib/Model/PaymentMethodResponse.php | 124 ++-- lib/Model/PaymentMethodUpdateRequest.php | 2 +- lib/Model/PaymentRefundCreateRequest.php | 56 +- lib/Model/PaymentRefundResponse.php | 276 ++++---- lib/Model/PaymentRefundUpdateRequest.php | 2 +- lib/Model/PaymentTransactionListResponse.php | 2 +- lib/Model/PaymentTransactionResponse.php | 212 +++--- lib/Model/PriceCreateRequest.php | 253 +++---- lib/Model/PriceDetailsResponse.php | 362 +++++----- lib/Model/PriceUpdateRequest.php | 74 +- lib/Model/ProductCreateRequest.php | 196 +++--- lib/Model/ProductDeletedResponse.php | 95 ++- lib/Model/ProductDetailsResponse.php | 86 +-- lib/Model/ProductUpdateRequest.php | 140 ++-- lib/Model/SetupFlowCancelRequest.php | 2 +- lib/Model/SetupFlowCreateRequest.php | 144 ++-- lib/Model/SetupFlowDataRequest.php | 2 +- ...tupFlowPaymentMethodOptionsCardRequest.php | 2 +- lib/Model/SetupFlowResponse.php | 256 ++++--- lib/Model/SetupFlowUpdateRequest.php | 8 +- lib/Model/StatementResponse.php | 170 ++--- lib/Model/StatementURLResponse.php | 4 +- lib/Model/TaxRateCreateRequest.php | 6 +- lib/Model/TaxRateDetailsResponse.php | 6 +- lib/Model/TaxRateUpdateRequest.php | 4 +- lib/Model/TermResponse.php | 86 +-- test/Model/BalanceResponseTest.php | 36 +- .../CheckoutSessionCreateRequestTest.php | 34 +- ...sionCustomerDetailsAddressResponseTest.php | 135 ++++ ...koutSessionCustomerDetailsResponseTest.php | 117 ++++ .../CheckoutSessionDetailsResponseTest.php | 53 +- test/Model/CustomerCreateRequestTest.php | 20 +- test/Model/CustomerResponseTest.php | 8 +- test/Model/CustomerUpdateRequestTest.php | 16 +- test/Model/EventResponseTest.php | 32 +- .../PaymentFlowCancellationReasonTest.php | 81 +++ test/Model/PaymentFlowResponseTest.php | 76 ++- test/Model/PaymentMethodCardResponseTest.php | 22 +- ...MethodConfigurationDetailsResponseTest.php | 16 +- .../Model/PaymentMethodPayPayResponseTest.php | 22 +- test/Model/PaymentMethodResponseTest.php | 22 +- test/Model/PaymentRefundCreateRequestTest.php | 8 +- test/Model/PaymentRefundResponseTest.php | 40 +- test/Model/PaymentTransactionResponseTest.php | 40 +- test/Model/PriceCreateRequestTest.php | 28 +- test/Model/PriceDetailsResponseTest.php | 40 +- test/Model/PriceUpdateRequestTest.php | 16 +- test/Model/ProductCreateRequestTest.php | 33 +- test/Model/ProductDeletedResponseTest.php | 8 +- test/Model/ProductDetailsResponseTest.php | 8 +- test/Model/ProductUpdateRequestTest.php | 24 +- test/Model/SetupFlowCreateRequestTest.php | 20 +- test/Model/SetupFlowResponseTest.php | 49 +- test/Model/StatementResponseTest.php | 24 +- test/Model/TermResponseTest.php | 8 +- 176 files changed, 4975 insertions(+), 2967 deletions(-) create mode 100644 docs/Model/CheckoutSessionCustomerDetailsAddressResponse.md create mode 100644 docs/Model/CheckoutSessionCustomerDetailsResponse.md create mode 100644 docs/Model/PaymentFlowCancellationReason.md create mode 100644 lib/Model/CheckoutSessionCustomerDetailsAddressResponse.php create mode 100644 lib/Model/CheckoutSessionCustomerDetailsResponse.php create mode 100644 lib/Model/PaymentFlowCancellationReason.php create mode 100644 test/Model/CheckoutSessionCustomerDetailsAddressResponseTest.php create mode 100644 test/Model/CheckoutSessionCustomerDetailsResponseTest.php create mode 100644 test/Model/PaymentFlowCancellationReasonTest.php diff --git a/README.md b/README.md index c98d930..57ad3d3 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,8 @@ Class | Method | HTTP request | Description - [CaptureMethod](docs/Model/CaptureMethod.md) - [CardConfigRequest](docs/Model/CardConfigRequest.md) - [CheckoutSessionCreateRequest](docs/Model/CheckoutSessionCreateRequest.md) +- [CheckoutSessionCustomerDetailsAddressResponse](docs/Model/CheckoutSessionCustomerDetailsAddressResponse.md) +- [CheckoutSessionCustomerDetailsResponse](docs/Model/CheckoutSessionCustomerDetailsResponse.md) - [CheckoutSessionDetailsResponse](docs/Model/CheckoutSessionDetailsResponse.md) - [CheckoutSessionLineItemDataResponse](docs/Model/CheckoutSessionLineItemDataResponse.md) - [CheckoutSessionLineItemListResponse](docs/Model/CheckoutSessionLineItemListResponse.md) @@ -179,6 +181,7 @@ Class | Method | HTTP request | Description - [MetadataValue](docs/Model/MetadataValue.md) - [PayPayConfigRequest](docs/Model/PayPayConfigRequest.md) - [PaymentFlowCancelRequest](docs/Model/PaymentFlowCancelRequest.md) +- [PaymentFlowCancellationReason](docs/Model/PaymentFlowCancellationReason.md) - [PaymentFlowCaptureRequest](docs/Model/PaymentFlowCaptureRequest.md) - [PaymentFlowConfirmRequest](docs/Model/PaymentFlowConfirmRequest.md) - [PaymentFlowCreateRequest](docs/Model/PaymentFlowCreateRequest.md) diff --git a/docs/Api/BalancesApi.md b/docs/Api/BalancesApi.md index 1c5d62d..379ef77 100644 --- a/docs/Api/BalancesApi.md +++ b/docs/Api/BalancesApi.md @@ -107,8 +107,8 @@ $until = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | 指定した $limit = 10; // int | 取得するデータの最大件数 $startingAfter = 'startingAfter_example'; // string | このIDより後のデータを取得 $endingBefore = 'endingBefore_example'; // string | このIDより前のデータを取得 -$state = new \PAYJPV2\Model\\PAYJPV2\Model\BalanceState(); // \PAYJPV2\Model\BalanceState | stateが指定した値であるオブジェクトに限定 -$closed = True; // bool | closedが指定した値であるオブジェクトに限定 +$state = new \PAYJPV2\Model\\PAYJPV2\Model\BalanceState(); // \PAYJPV2\Model\BalanceState | state が指定した値であるオブジェクトに限定 +$closed = True; // bool | closed が指定した値であるオブジェクトに限定 $sinceDueDate = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | 入金予定日/振込期限日が指定した日時以降のデータのみ取得 $untilDueDate = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | 入金予定日/振込期限日が指定した日時以前のデータのみ取得 @@ -129,8 +129,8 @@ try { | **limit** | **int**| 取得するデータの最大件数 | [optional] [default to 10] | | **startingAfter** | **string**| このIDより後のデータを取得 | [optional] | | **endingBefore** | **string**| このIDより前のデータを取得 | [optional] | -| **state** | [**\PAYJPV2\Model\BalanceState**](../Model/.md)| stateが指定した値であるオブジェクトに限定 | [optional] | -| **closed** | **bool**| closedが指定した値であるオブジェクトに限定 | [optional] | +| **state** | [**\PAYJPV2\Model\BalanceState**](../Model/.md)| state が指定した値であるオブジェクトに限定 | [optional] | +| **closed** | **bool**| closed が指定した値であるオブジェクトに限定 | [optional] | | **sinceDueDate** | **\DateTime**| 入金予定日/振込期限日が指定した日時以降のデータのみ取得 | [optional] | | **untilDueDate** | **\DateTime**| 入金予定日/振込期限日が指定した日時以前のデータのみ取得 | [optional] | diff --git a/docs/Api/EventsApi.md b/docs/Api/EventsApi.md index f0db73d..a4ec011 100644 --- a/docs/Api/EventsApi.md +++ b/docs/Api/EventsApi.md @@ -41,9 +41,9 @@ $apiInstance = new PAYJPV2\Api\EventsApi( $limit = 10; // int | 取得するデータの最大件数 $startingAfter = 'startingAfter_example'; // string | このIDより後のデータを取得 $endingBefore = 'endingBefore_example'; // string | このIDより前のデータを取得 -$resourceId = 'resourceId_example'; // string | 取得するeventに紐づくAPIリソースのID (e.g. customer.id) -$object = 'object_example'; // string | 取得するeventに紐づくAPIリソースのobject。値はリソース名(e.g. customer, payment_flow) -$type = 'type_example'; // string | 取得するeventのtype +$resourceId = 'resourceId_example'; // string | 取得する event に紐づく API リソースの ID +$object = 'object_example'; // string | 取得する event に紐づく API リソースの object。値はリソース名 (e.g. customer, payment_flow) +$type = 'type_example'; // string | 取得する event の type try { $result = $apiInstance->getAllEvents($limit, $startingAfter, $endingBefore, $resourceId, $object, $type); @@ -60,9 +60,9 @@ try { | **limit** | **int**| 取得するデータの最大件数 | [optional] [default to 10] | | **startingAfter** | **string**| このIDより後のデータを取得 | [optional] | | **endingBefore** | **string**| このIDより前のデータを取得 | [optional] | -| **resourceId** | **string**| 取得するeventに紐づくAPIリソースのID (e.g. customer.id) | [optional] | -| **object** | **string**| 取得するeventに紐づくAPIリソースのobject。値はリソース名(e.g. customer, payment_flow) | [optional] | -| **type** | **string**| 取得するeventのtype | [optional] | +| **resourceId** | **string**| 取得する event に紐づく API リソースの ID | [optional] | +| **object** | **string**| 取得する event に紐づく API リソースの object。値はリソース名 (e.g. customer, payment_flow) | [optional] | +| **type** | **string**| 取得する event の type | [optional] | ### Return type diff --git a/docs/Api/PaymentTransactionsApi.md b/docs/Api/PaymentTransactionsApi.md index 261cd49..fb097a4 100644 --- a/docs/Api/PaymentTransactionsApi.md +++ b/docs/Api/PaymentTransactionsApi.md @@ -41,7 +41,7 @@ $apiInstance = new PAYJPV2\Api\PaymentTransactionsApi( $limit = 10; // int | 取得するデータの最大件数 $startingAfter = 'startingAfter_example'; // string | このIDより後のデータを取得 $endingBefore = 'endingBefore_example'; // string | このIDより前のデータを取得 -$termId = 'termId_example'; // string | term ID +$termId = 'termId_example'; // string | 集計区間 ID $type = 'type_example'; // string | 取引タイプ $paymentMethodType = 'paymentMethodType_example'; // string | 支払い方法タイプ @@ -60,7 +60,7 @@ try { | **limit** | **int**| 取得するデータの最大件数 | [optional] [default to 10] | | **startingAfter** | **string**| このIDより後のデータを取得 | [optional] | | **endingBefore** | **string**| このIDより前のデータを取得 | [optional] | -| **termId** | **string**| term ID | [optional] | +| **termId** | **string**| 集計区間 ID | [optional] | | **type** | **string**| 取引タイプ | [optional] | | **paymentMethodType** | **string**| 支払い方法タイプ | [optional] | diff --git a/docs/Api/PricesApi.md b/docs/Api/PricesApi.md index 8012439..be10670 100644 --- a/docs/Api/PricesApi.md +++ b/docs/Api/PricesApi.md @@ -106,7 +106,7 @@ $apiInstance = new PAYJPV2\Api\PricesApi( $limit = 10; // int | 取得するデータの最大件数 $startingAfter = 'startingAfter_example'; // string | このIDより後のデータを取得 $endingBefore = 'endingBefore_example'; // string | このIDより前のデータを取得 -$lookupKeys = array('lookupKeys_example'); // string[] | 価格を動的に取得するために使用される検索キー。 +$lookupKeys = array('lookupKeys_example'); // string[] | 価格を動的に取得するために使用される検索キー try { $result = $apiInstance->getAllPrices($limit, $startingAfter, $endingBefore, $lookupKeys); @@ -123,7 +123,7 @@ try { | **limit** | **int**| 取得するデータの最大件数 | [optional] [default to 10] | | **startingAfter** | **string**| このIDより後のデータを取得 | [optional] | | **endingBefore** | **string**| このIDより前のデータを取得 | [optional] | -| **lookupKeys** | [**string[]**](../Model/string.md)| 価格を動的に取得するために使用される検索キー。 | [optional] | +| **lookupKeys** | [**string[]**](../Model/string.md)| 価格を動的に取得するために使用される検索キー | [optional] | ### Return type diff --git a/docs/Api/StatementsApi.md b/docs/Api/StatementsApi.md index 25644a6..31c8870 100644 --- a/docs/Api/StatementsApi.md +++ b/docs/Api/StatementsApi.md @@ -108,7 +108,7 @@ $limit = 10; // int | 取得するデータの最大件数 $startingAfter = 'startingAfter_example'; // string | このIDより後のデータを取得 $endingBefore = 'endingBefore_example'; // string | このIDより前のデータを取得 $type = new \PAYJPV2\Model\\PAYJPV2\Model\StatementType(); // \PAYJPV2\Model\StatementType | 明細タイプでフィルタ -$termId = 'termId_example'; // string | 期間IDでフィルタ +$termId = 'termId_example'; // string | 集計区間 ID でフィルタ try { $result = $apiInstance->getAllStatements($since, $until, $limit, $startingAfter, $endingBefore, $type, $termId); @@ -128,7 +128,7 @@ try { | **startingAfter** | **string**| このIDより後のデータを取得 | [optional] | | **endingBefore** | **string**| このIDより前のデータを取得 | [optional] | | **type** | [**\PAYJPV2\Model\StatementType**](../Model/.md)| 明細タイプでフィルタ | [optional] | -| **termId** | **string**| 期間IDでフィルタ | [optional] | +| **termId** | **string**| 集計区間 ID でフィルタ | [optional] | ### Return type diff --git a/docs/Api/TermsApi.md b/docs/Api/TermsApi.md index d913339..4a55e42 100644 --- a/docs/Api/TermsApi.md +++ b/docs/Api/TermsApi.md @@ -41,8 +41,8 @@ $apiInstance = new PAYJPV2\Api\TermsApi( $limit = 10; // int | 取得するデータの最大件数 $startingAfter = 'startingAfter_example'; // string | このIDより後のデータを取得 $endingBefore = 'endingBefore_example'; // string | このIDより前のデータを取得 -$sinceStartAt = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | start_atが指定した日付以降のデータを取得 -$untilStartAt = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | start_atが指定した日付以前のデータを取得 +$sinceStartAt = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | start_at が指定した日付以降のデータを取得 +$untilStartAt = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | start_at が指定した日付以前のデータを取得 try { $result = $apiInstance->getAllTerms($limit, $startingAfter, $endingBefore, $sinceStartAt, $untilStartAt); @@ -59,8 +59,8 @@ try { | **limit** | **int**| 取得するデータの最大件数 | [optional] [default to 10] | | **startingAfter** | **string**| このIDより後のデータを取得 | [optional] | | **endingBefore** | **string**| このIDより前のデータを取得 | [optional] | -| **sinceStartAt** | **\DateTime**| start_atが指定した日付以降のデータを取得 | [optional] | -| **untilStartAt** | **\DateTime**| start_atが指定した日付以前のデータを取得 | [optional] | +| **sinceStartAt** | **\DateTime**| start_at が指定した日付以降のデータを取得 | [optional] | +| **untilStartAt** | **\DateTime**| start_at が指定した日付以前のデータを取得 | [optional] | ### Return type diff --git a/docs/Model/BalanceResponse.md b/docs/Model/BalanceResponse.md index 981092d..b46621a 100644 --- a/docs/Model/BalanceResponse.md +++ b/docs/Model/BalanceResponse.md @@ -5,16 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **string** | | [optional] [default to 'balance'] -**id** | **string** | 残高ID | +**id** | **string** | 残高 ID | **livemode** | **bool** | 本番環境かどうか | -**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | -**updatedAt** | **\DateTime** | 更新時の日時 (UTC, ISO 8601 形式) | -**state** | [**\PAYJPV2\Model\BalanceState**](BalanceState.md) | Balanceの状態 | 指定できる値 | |:---| | **collecting**: 集計中 | | **transfer**: 入金 | | **claim**: 請求 | | -**statements** | [**\PAYJPV2\Model\StatementResponse[]**](StatementResponse.md) | 関連付けられているStatementオブジェクトのリスト | -**closed** | **bool** | このBalanceの清算が終了していればtrue state=transferであれば加盟店口座への入金作業完了、state=claimであればPAY.JPで請求額の振込が確認できたことを表します。 | +**state** | [**\PAYJPV2\Model\BalanceState**](BalanceState.md) | Balance の状態 | 値 | |:---| | **collecting**: 集計中 | | **transfer**: 入金 | | **claim**: 請求 | | +**statements** | [**\PAYJPV2\Model\StatementResponse[]**](StatementResponse.md) | 関連付けられている Statement オブジェクトのリスト | +**closed** | **bool** | この Balance の清算が終了していれば true state=transfer であれば加盟店口座への入金作業完了、state=claim であれば PAY.JP で請求額の振込が確認できたことを表します。 | **closedDate** | **\DateTime** | | **dueDate** | **\DateTime** | | -**net** | **int** | 関連付けられているStatementの総額 | +**net** | **int** | 関連付けられている Statement の総額 | **bankInfo** | [**\PAYJPV2\Model\BankInfoResponse**](BankInfoResponse.md) | | +**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | +**updatedAt** | **\DateTime** | 更新時の日時 (UTC, ISO 8601 形式) | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BalanceURLResponse.md b/docs/Model/BalanceURLResponse.md index b5c4e10..cffa392 100644 --- a/docs/Model/BalanceURLResponse.md +++ b/docs/Model/BalanceURLResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **string** | | [optional] [default to 'balance_url'] -**url** | **string** | 残高明細書ダウンロードURL | -**expires** | **\DateTime** | 有効期限の日付。 有効期限は発行から1時間です。 | +**url** | **string** | 残高明細書ダウンロード URL | +**expires** | **\DateTime** | 有効期限の日付 有効期限は発行から1時間です。 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BankInfoResponse.md b/docs/Model/BankInfoResponse.md index edc65af..621b58a 100644 --- a/docs/Model/BankInfoResponse.md +++ b/docs/Model/BankInfoResponse.md @@ -9,6 +9,6 @@ Name | Type | Description | Notes **bankAccountType** | **string** | 口座種別 | **bankAccountNumber** | **string** | 口座番号 | **bankAccountHolderName** | **string** | 口座名義 | -**bankAccountStatus** | **string** | 最新振込結果 | 指定できる値 | |:---| | **success**: 成功 | | **failed**: 失敗 | | **pending**: 初回振込み前 | | +**bankAccountStatus** | **string** | 最新振込結果 | 値 | |:---| | **success**: 成功 | | **failed**: 失敗 | | **pending**: 初回振込み前 | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CheckoutSessionCreateRequest.md b/docs/Model/CheckoutSessionCreateRequest.md index d982449..419568a 100644 --- a/docs/Model/CheckoutSessionCreateRequest.md +++ b/docs/Model/CheckoutSessionCreateRequest.md @@ -4,23 +4,23 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**mode** | [**\PAYJPV2\Model\CheckoutSessionMode**](CheckoutSessionMode.md) | Checkout Session のモード | 指定できる値 | |:---| | **payment**: 支払いモードで Checkout Session を作成します。 | | **setup**: セットアップモードで Checkout Session を作成します。 | | **clientReferenceId** | **string** | ID | [optional] -**customerId** | **string** | 顧客ID | [optional] -**customerEmail** | **string** | 顧客オブジェクトを作成する時に使われます。指定されていない場合、顧客にメールアドレスの入力を求めます。すでに顧客のメールアドレスを持っている場合は、このパラメータを使ってあらかじめ情報を入力しておくことが可能です。支払いが完了した後に顧客情報を取得したい場合は、customer属性を使用します。 | [optional] -**customerCreation** | [**\PAYJPV2\Model\CustomerCreation**](CustomerCreation.md) | Checkout Session の確定時に Customer を作成するかどうかを指定します。<br> Customer が作成されない場合でも `customer_details` で Checkout に入力されたメールアドレス、住所、その他の顧客データを取得できます。<br> Customer を作成しない Session は、ダッシュボードでゲスト顧客としてグループ化されます。<br> `payment` および `setup` モードでのみ設定可能です。 | [optional] -**lineItems** | [**\PAYJPV2\Model\LineItemRequest[]**](LineItemRequest.md) | 顧客が購入する商品のリストです。このパラメーターを使用して、1回限りまたは定期的な料金を渡します。 `payment` モードの場合、最大100個のラインアイテムを使用できます。 <!-- `subscription` モードの場合、定期的な料金のラインアイテムは最大20個、1回限りの料金のラインアイテムは最大20個です。1回限りの料金のラインアイテムは、最初の請求書にのみ記載されます。 --> | [optional] -**mode** | [**\PAYJPV2\Model\CheckoutSessionMode**](CheckoutSessionMode.md) | Checkout Session のモード | 指定できる値 | |:---| | **payment**: 支払いモードでCheckout Sessionを作成します。 | | **setup**: セットアップモードでCheckout Sessionを作成します。 | | -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] -**successUrl** | **string** | 支払いや設定が完了した際に、PAY.JP が顧客をリダイレクトするURL。成功したCheckout Sessionからの情報をページで使用したい場合は、成功ページのカスタマイズに関するガイドをお読みください。 | [optional] -**cancelUrl** | **string** | キャンセル時のリダイレクトURL | [optional] +**customerId** | **string** | 顧客 ID | [optional] +**customerEmail** | **string** | 顧客オブジェクトを作成する時に使われます。指定されていない場合、顧客にメールアドレスの入力を求めます。すでに顧客のメールアドレスを持っている場合は、このパラメータを使ってあらかじめ情報を入力しておくことが可能です。 | [optional] +**customerCreation** | [**\PAYJPV2\Model\CustomerCreation**](CustomerCreation.md) | Checkout Session の確定時に Customer を作成するかどうかを指定します。<br> `payment` および `setup` モードでのみ設定可能です。 | [optional] +**lineItems** | [**\PAYJPV2\Model\LineItemRequest[]**](LineItemRequest.md) | 顧客が購入する商品のリストです。このパラメーターを使用して、1回限りまたは定期的な料金を渡します。 `payment` モードの場合、最大100個のラインアイテムを使用できます。 | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**successUrl** | **string** | 支払いや設定が完了した際に、PAY.JP が顧客をリダイレクトする URL。成功した Checkout Session からの情報をページで使用したい場合は、成功ページのカスタマイズに関するガイドをお読みください。 | [optional] +**cancelUrl** | **string** | キャンセル時のリダイレクト URL | [optional] **currency** | [**\PAYJPV2\Model\Currency**](Currency.md) | 価格の通貨。現在は `jpy` のみサポートしています。 | [optional] -**expiresAt** | **\DateTime** | Checkout Session の有効期限が失効する日時。 | [optional] +**expiresAt** | **\DateTime** | Checkout Session の有効期限が失効する日時 | [optional] **locale** | [**\PAYJPV2\Model\Locale**](Locale.md) | Checkout 画面の表示言語を指定します。 | 指定できる値 | |:---| | **ja**: 日本語で表示します。 | | [optional] -**paymentFlowData** | [**\PAYJPV2\Model\PaymentFlowDataRequest**](PaymentFlowDataRequest.md) | `payment` モード指定時に PaymentFlow 作成に使用するパラメーター。 | [optional] -**paymentMethodOptions** | [**\PAYJPV2\Model\CheckoutSessionPaymentMethodOptionsRequest**](CheckoutSessionPaymentMethodOptionsRequest.md) | この PaymentFlow の支払い方法の個別設定。 | [optional] -**paymentMethodTypes** | [**\PAYJPV2\Model\PaymentMethodTypes[]**](PaymentMethodTypes.md) | この PaymentFlow で使用できる支払い方法の種類(カードなど)のリストです。 指定しない場合、ダッシュボードで利用可能な状態にしている支払い方法を自動的に表示します。 | [optional] -**setupFlowData** | [**\PAYJPV2\Model\SetupFlowDataRequest**](SetupFlowDataRequest.md) | `setup` モードの Checkout Session を作成する際、SetupFlow の作成に渡されるパラメーター | [optional] +**paymentMethodTypes** | [**\PAYJPV2\Model\PaymentMethodTypes[]**](PaymentMethodTypes.md) | この PaymentFlow で使用できる支払い方法の種類(カードなど)のリストです。指定しない場合、管理画面で利用可能な状態にしている支払い方法を自動的に表示します。 | [optional] +**paymentMethodOptions** | [**\PAYJPV2\Model\CheckoutSessionPaymentMethodOptionsRequest**](CheckoutSessionPaymentMethodOptionsRequest.md) | この PaymentFlow の支払い方法の個別設定 | [optional] +**paymentFlowData** | [**\PAYJPV2\Model\PaymentFlowDataRequest**](PaymentFlowDataRequest.md) | `payment` モード指定時に PaymentFlow 作成に使用するパラメーター | [optional] **submitType** | [**\PAYJPV2\Model\CheckoutSessionSubmitType**](CheckoutSessionSubmitType.md) | Checkout の画面上に表示される送信ボタンなど、ページ上の関連テキストをカスタマイズするために使用されます。<br> `submit_type` は、`payment` モードの Checkout Session でのみ指定できます。未指定時、あるいは `auto` の場合、`pay` が使用されます。 | 指定できる値 | |:---| | **auto**: `pay` が使用されます。 | | **pay**: 「支払う」(デフォルト) | | **book**: 「予約する」 | | **donate**: 「寄付する」 | | [optional] -**uiMode** | [**\PAYJPV2\Model\CheckoutSessionUIMode**](CheckoutSessionUIMode.md) | Checkout Session の UI モード。デフォルトは `hosted` です。<br> | 指定できる値 | |:---| | **hosted**: PAY.JPでホスティングしている画面を使用します。 | | [optional] +**setupFlowData** | [**\PAYJPV2\Model\SetupFlowDataRequest**](SetupFlowDataRequest.md) | `setup` モードの Checkout Session を作成する際、SetupFlow の作成に渡されるパラメーター | [optional] +**uiMode** | [**\PAYJPV2\Model\CheckoutSessionUIMode**](CheckoutSessionUIMode.md) | Checkout Session の UI モード。デフォルトは `hosted` です。 | 指定できる値 | |:---| | **hosted**: PAY.JP でホスティングしている画面を使用します。 | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CheckoutSessionCustomerDetailsAddressResponse.md b/docs/Model/CheckoutSessionCustomerDetailsAddressResponse.md new file mode 100644 index 0000000..05aad85 --- /dev/null +++ b/docs/Model/CheckoutSessionCustomerDetailsAddressResponse.md @@ -0,0 +1,14 @@ +# # CheckoutSessionCustomerDetailsAddressResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country** | **string** | | +**zip** | **string** | | +**state** | **string** | | +**city** | **string** | | +**line1** | **string** | | +**line2** | **string** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CheckoutSessionCustomerDetailsResponse.md b/docs/Model/CheckoutSessionCustomerDetailsResponse.md new file mode 100644 index 0000000..44828d1 --- /dev/null +++ b/docs/Model/CheckoutSessionCustomerDetailsResponse.md @@ -0,0 +1,12 @@ +# # CheckoutSessionCustomerDetailsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | | +**email** | **string** | | +**phone** | **string** | | +**address** | [**\PAYJPV2\Model\CheckoutSessionCustomerDetailsAddressResponse**](CheckoutSessionCustomerDetailsAddressResponse.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CheckoutSessionDetailsResponse.md b/docs/Model/CheckoutSessionDetailsResponse.md index 8752cf8..aedc225 100644 --- a/docs/Model/CheckoutSessionDetailsResponse.md +++ b/docs/Model/CheckoutSessionDetailsResponse.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | ID | **object** | **string** | | [optional] [default to 'checkout.session'] +**id** | **string** | Checkout Session ID | **livemode** | **bool** | 本番環境かどうか | **amountSubtotal** | **int** | | **amountTotal** | **int** | | -**cancelUrl** | **string** | | **customerId** | **string** | | **customerEmail** | **string** | | +**customerDetails** | [**\PAYJPV2\Model\CheckoutSessionCustomerDetailsResponse**](CheckoutSessionCustomerDetailsResponse.md) | | [optional] **expiresAt** | **\DateTime** | | **currency** | [**\PAYJPV2\Model\Currency**](Currency.md) | 価格の通貨。現在は `jpy` のみサポートしています。 | **locale** | [**\PAYJPV2\Model\Locale**](Locale.md) | | @@ -20,13 +20,14 @@ Name | Type | Description | Notes **paymentMethodOptions** | **array** | | **setupFlowId** | **string** | | [optional] **submitType** | [**\PAYJPV2\Model\CheckoutSessionSubmitType**](CheckoutSessionSubmitType.md) | | -**mode** | [**\PAYJPV2\Model\CheckoutSessionMode**](CheckoutSessionMode.md) | Checkout Session のモード | 指定できる値 | |:---| | **payment**: 支払いモードでCheckout Sessionを作成します。 | | **setup**: セットアップモードでCheckout Sessionを作成します。 | | -**uiMode** | [**\PAYJPV2\Model\CheckoutSessionUIMode**](CheckoutSessionUIMode.md) | Checkout Session の UI モード。デフォルトは `hosted` です。<br> | 指定できる値 | |:---| | **hosted**: PAY.JPでホスティングしている画面を使用します。 | | -**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | -**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | -**metadata** | [**array**](MetadataValue.md) | メタデータ | +**mode** | [**\PAYJPV2\Model\CheckoutSessionMode**](CheckoutSessionMode.md) | Checkout Session のモード | 値 | |:---| | **payment**: 支払いモード | | **setup**: セットアップモード | | +**uiMode** | [**\PAYJPV2\Model\CheckoutSessionUIMode**](CheckoutSessionUIMode.md) | Checkout Session の UI モード | 値 | |:---| | **hosted**: PAY.JP でホスティングしている画面を使用します。 | | **status** | [**\PAYJPV2\Model\CheckoutSessionStatus**](CheckoutSessionStatus.md) | チェックアウトセッションのステータス | **successUrl** | **string** | | +**cancelUrl** | **string** | | **url** | **string** | URL | +**metadata** | [**array**](MetadataValue.md) | メタデータ | +**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | +**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CheckoutSessionPaymentMethodOptionsCardRequest.md b/docs/Model/CheckoutSessionPaymentMethodOptionsCardRequest.md index 8bd9808..39d57ff 100644 --- a/docs/Model/CheckoutSessionPaymentMethodOptionsCardRequest.md +++ b/docs/Model/CheckoutSessionPaymentMethodOptionsCardRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**requestExtendedAuthorization** | **string** | オーソリ期間の延長要求。 | 指定できる値 | |:---| | **if_available**: オーソリ期間の延長が可能な場合に延長要求を行います。 | | **never**: オーソリ期間の延長要求を行いません。 | | [optional] -**requestThreeDSecure** | **string** | 3Dセキュア認証の要求方法。 | 指定できる値 | |:---| | **any**: 3Dセキュア認証を要求します。 | | **automatic**: 必要な場合にのみ3Dセキュア認証を要求します。 | | [optional] +**requestExtendedAuthorization** | **string** | オーソリ期間の延長要求 | 指定できる値 | |:---| | **if_available**: オーソリ期間の延長が可能な場合に延長要求を行います。 | | **never**: オーソリ期間の延長要求を行いません。 | | [optional] +**requestThreeDSecure** | **string** | 3D セキュア認証の要求方法 | 指定できる値 | |:---| | **any**: 3D セキュア認証を要求します。 | | **automatic**: 必要な場合にのみ 3D セキュア認証を要求します。 | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CheckoutSessionUpdateRequest.md b/docs/Model/CheckoutSessionUpdateRequest.md index f5049b3..cb88fa2 100644 --- a/docs/Model/CheckoutSessionUpdateRequest.md +++ b/docs/Model/CheckoutSessionUpdateRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CustomerCreateRequest.md b/docs/Model/CustomerCreateRequest.md index 5d363dc..ced6f9a 100644 --- a/docs/Model/CustomerCreateRequest.md +++ b/docs/Model/CustomerCreateRequest.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **string** | 顧客 ID。100桁までの一意な文字列を指定できます。使える文字は半角英数字、ハイフン(-)、アンダースコア(_)です。未指定時は `cus_` で始まる一意な文字列が自動生成されます。 | [optional] +**paymentMethodId** | **string** | 顧客に紐づける支払い方法 ID。同時にデフォルトの支払い方法として登録されます。 | [optional] **email** | **string** | 顧客のメールアドレス。メールアドレスの形式が正しいかどうかは検証されます。 | [optional] -**description** | **string** | 顧客オブジェクトに付加できる任意の文字列です。これは、ダッシュボードで顧客と一緒に表示されます。 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] -**id** | **string** | 顧客ID。100桁までの一意な文字列を指定できます。使える文字は半角英数字、ハイフン(-)、アンダースコア(_)です。未指定時は `cus_` で始まる32桁までの一意な文字列が自動生成されます。 | [optional] -**paymentMethodId** | **string** | 顧客に紐づける支払い方法ID | [optional] +**description** | **string** | 顧客オブジェクトに付加できる任意の文字列です。管理画面で顧客と一緒に表示されます。 | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CustomerResponse.md b/docs/Model/CustomerResponse.md index 1b690fe..5b8ebd3 100644 --- a/docs/Model/CustomerResponse.md +++ b/docs/Model/CustomerResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | 顧客ID | **object** | **string** | | [optional] [default to 'customer'] +**id** | **string** | 顧客 ID | **livemode** | **bool** | 本番環境かどうか | **email** | **string** | | **description** | **string** | | diff --git a/docs/Model/CustomerUpdateRequest.md b/docs/Model/CustomerUpdateRequest.md index 1a39646..399e74f 100644 --- a/docs/Model/CustomerUpdateRequest.md +++ b/docs/Model/CustomerUpdateRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**email** | **string** | 顧客のメールアドレス。メールアドレスの形式が正しいかどうかは検証されます。 | [optional] -**description** | **string** | 顧客オブジェクトに付加できる任意の文字列です。これは、ダッシュボードで顧客と一緒に表示されます。 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] **defaultPaymentMethodId** | **string** | | [optional] +**email** | **string** | 顧客のメールアドレス。メールアドレスの形式が正しいかどうかは検証されます。 | [optional] +**description** | **string** | 顧客オブジェクトに付加できる任意の文字列です。管理画面で顧客と一緒に表示されます。 | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DisplayPreferenceRequest.md b/docs/Model/DisplayPreferenceRequest.md index 12207ee..61032f9 100644 --- a/docs/Model/DisplayPreferenceRequest.md +++ b/docs/Model/DisplayPreferenceRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**preference** | **string** | この支払い方法がアカウントで有効になっているかどうか。 | 指定できる値 | |:---| | **on**: この決済手段を決済画面に表示する | | **off**: この決済手段を決済画面に表示しない | | **none**: デフォルト設定を使用 | | +**preference** | **string** | この支払い方法がアカウントで有効になっているかどうか | 値 | |:---| | **on**: この決済手段を決済画面に表示する | | **off**: この決済手段を決済画面に表示しない | | **none**: デフォルト設定を使用 | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EventResponse.md b/docs/Model/EventResponse.md index 7529adc..6a00be8 100644 --- a/docs/Model/EventResponse.md +++ b/docs/Model/EventResponse.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | イベントID | **object** | **string** | | [optional] [default to 'event'] -**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | -**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | +**id** | **string** | イベント ID | **livemode** | **bool** | 本番環境かどうか | **type** | **string** | イベントの種類 | -**pendingWebhooks** | **int** | 設定されたURLへの通知が完了していない(2xxのレスポンスが得られていない)webhookの数 | +**pendingWebhooks** | **int** | 設定された URL への通知が完了していない (2xx のレスポンスが得られていない) webhook の数 | **data** | **array** | このイベントに関連したリソースオブジェクト | +**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | +**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LineItemRequest.md b/docs/Model/LineItemRequest.md index 699b513..8c6c7a6 100644 --- a/docs/Model/LineItemRequest.md +++ b/docs/Model/LineItemRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**priceId** | **string** | 料金ID | +**priceId** | **string** | 料金 ID | **quantity** | **int** | 購入する商品の数量 | -**taxRates** | **string[]** | 税率ID | [optional] +**taxRates** | **string[]** | 税率 ID | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentFlowCancelRequest.md b/docs/Model/PaymentFlowCancelRequest.md index 33dda16..a1215af 100644 --- a/docs/Model/PaymentFlowCancelRequest.md +++ b/docs/Model/PaymentFlowCancelRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**cancellationReason** | **string** | この PaymentFlow のキャンセル理由 | 指定できる値 | |:---| | **duplicate**: 重複した支払いである場合。 | | **fraudulent**: 不正な利用だと考えられる場合。 | | **requested_by_customer**: 顧客がキャンセルを要求した場合。 | | **abandoned**: 顧客が支払いを完了しなかった場合。 | | [optional] +**cancellationReason** | **string** | この PaymentFlow のキャンセル理由 | 値 | |:---| | **duplicate**: 重複した支払いである場合。 | | **fraudulent**: 不正な利用だと考えられる場合。 | | **requested_by_customer**: 顧客がキャンセルを要求した場合。 | | **abondoned**: 顧客が支払いを完了しなかった場合。 | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentFlowCancellationReason.md b/docs/Model/PaymentFlowCancellationReason.md new file mode 100644 index 0000000..400ee6f --- /dev/null +++ b/docs/Model/PaymentFlowCancellationReason.md @@ -0,0 +1,8 @@ +# # PaymentFlowCancellationReason + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentFlowCaptureRequest.md b/docs/Model/PaymentFlowCaptureRequest.md index 66bc39f..6341652 100644 --- a/docs/Model/PaymentFlowCaptureRequest.md +++ b/docs/Model/PaymentFlowCaptureRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**amountToCapture** | **int** | PaymentFlowから確定させる金額は、元の金額以下で指定します。指定されていない場合は、全額(`amount_capturable`)がデフォルトになります。 | [optional] +**amountToCapture** | **int** | PaymentFlow から確定させる金額は、元の金額以下で指定します。指定されていない場合は、全額(`amount_capturable`)がデフォルトになります。 | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentFlowConfirmRequest.md b/docs/Model/PaymentFlowConfirmRequest.md index 887c6e0..d340142 100644 --- a/docs/Model/PaymentFlowConfirmRequest.md +++ b/docs/Model/PaymentFlowConfirmRequest.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**paymentMethodId** | **string** | 支払い方法ID。customer_idの指定が必須です。Customerが所持するPaymentMethodのみ指定できます。payment_method_idを指定せず、Customerにdefault_payment_method_idが設定されている場合はそちらが自動でセットされます。 | [optional] -**paymentMethodOptions** | [**\PAYJPV2\Model\PaymentFlowPaymentMethodOptionsRequest**](PaymentFlowPaymentMethodOptionsRequest.md) | このPaymentFlow固有の支払い方法の設定 | [optional] -**paymentMethodTypes** | [**\PAYJPV2\Model\PaymentMethodTypes[]**](PaymentMethodTypes.md) | このPaymentFlowで使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JPは支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] -**captureMethod** | [**\PAYJPV2\Model\CaptureMethod**](CaptureMethod.md) | 支払いの確定方法を指定します。 | 指定できる値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | [optional] -**returnUrl** | **string** | 顧客が支払いを完了後かキャンセルした後にリダイレクトされるURL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。 | [optional] +**paymentMethodId** | **string** | 支払い方法 ID。customer_id の指定が必須です。Customer が所持する PaymentMethod のみ指定できます。payment_method_id を指定せず、Customer に default_payment_method_id が設定されている場合はそちらが自動でセットされます。 | [optional] +**paymentMethodOptions** | [**\PAYJPV2\Model\PaymentFlowPaymentMethodOptionsRequest**](PaymentFlowPaymentMethodOptionsRequest.md) | この PaymentFlow 固有の支払い方法の設定 | [optional] +**paymentMethodTypes** | [**\PAYJPV2\Model\PaymentMethodTypes[]**](PaymentMethodTypes.md) | この PaymentFlow で使用できる支払い方法の種類のリスト。指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] +**captureMethod** | [**\PAYJPV2\Model\CaptureMethod**](CaptureMethod.md) | 支払いの確定方法を指定します。 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | [optional] +**returnUrl** | **string** | 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。 | [optional] **description** | **string** | オブジェクトにセットする任意の文字列。ユーザーには表示されません。 | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentFlowCreateRequest.md b/docs/Model/PaymentFlowCreateRequest.md index 520ebcd..763d4d4 100644 --- a/docs/Model/PaymentFlowCreateRequest.md +++ b/docs/Model/PaymentFlowCreateRequest.md @@ -5,15 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | 支払い予定の金額。50円以上9,999,999円以下である必要があります。 | -**customerId** | **string** | このPaymentFlowに関連付ける顧客のID | [optional] -**paymentMethodId** | **string** | 支払い方法ID。customer_idの指定が必須です。Customerが所持するPaymentMethodのみ指定できます。payment_method_idを指定せず、Customerにdefault_payment_method_idが設定されている場合はそちらが自動でセットされます。 | [optional] -**paymentMethodOptions** | [**\PAYJPV2\Model\PaymentFlowPaymentMethodOptionsRequest**](PaymentFlowPaymentMethodOptionsRequest.md) | このPaymentFlow固有の支払い方法の設定 | [optional] -**paymentMethodTypes** | [**\PAYJPV2\Model\PaymentMethodTypes[]**](PaymentMethodTypes.md) | このPaymentFlowで使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JPは支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] +**customerId** | **string** | この PaymentFlow に関連付ける顧客の ID | [optional] +**paymentMethodId** | **string** | 支払い方法 ID。customer_id の指定が必須です。Customer が所持する PaymentMethod のみ指定できます。payment_method_id を指定せず、Customer に default_payment_method_id が設定されている場合はそちらが自動でセットされます。 | [optional] +**paymentMethodOptions** | [**\PAYJPV2\Model\PaymentFlowPaymentMethodOptionsRequest**](PaymentFlowPaymentMethodOptionsRequest.md) | この PaymentFlow 固有の支払い方法の設定 | [optional] +**paymentMethodTypes** | [**\PAYJPV2\Model\PaymentMethodTypes[]**](PaymentMethodTypes.md) | この PaymentFlow で使用できる支払い方法の種類のリスト。指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] **currency** | [**\PAYJPV2\Model\Currency**](Currency.md) | 価格の通貨。現在は `jpy` のみサポートしています。 | -**captureMethod** | [**\PAYJPV2\Model\CaptureMethod**](CaptureMethod.md) | 支払いの確定方法を指定します。 | 指定できる値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | [optional] -**confirm** | **bool** | 「true」に設定すると、このPaymentFlowを直ちに確定しようと試みます。 | [optional] [default to false] -**returnUrl** | **string** | 顧客が支払いを完了後かキャンセルした後にリダイレクトされるURL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。confirm=trueの場合のみ指定できます。 | [optional] +**captureMethod** | [**\PAYJPV2\Model\CaptureMethod**](CaptureMethod.md) | 支払いの確定方法を指定します。 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | [optional] +**confirm** | **bool** | 「true」に設定すると、この PaymentFlow を直ちに確定しようと試みます。 | [optional] [default to false] +**returnUrl** | **string** | 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。confirm=true の場合のみ指定できます。 | [optional] **description** | **string** | オブジェクトにセットする任意の文字列。ユーザーには表示されません。 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentFlowDataRequest.md b/docs/Model/PaymentFlowDataRequest.md index 4601e47..b8ed4c8 100644 --- a/docs/Model/PaymentFlowDataRequest.md +++ b/docs/Model/PaymentFlowDataRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**captureMethod** | [**\PAYJPV2\Model\CaptureMethod**](CaptureMethod.md) | 支払いの確定方法を指定します。 | 指定できる値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると自動的に確定します。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**captureMethod** | [**\PAYJPV2\Model\CaptureMethod**](CaptureMethod.md) | 支払いの確定方法を指定します。 | 指定できる値 | |:---| | **automatic**: 顧客が支払いを承認すると自動的に確定します。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentFlowPaymentMethodOptionsCardRequest.md b/docs/Model/PaymentFlowPaymentMethodOptionsCardRequest.md index af7737b..f2aa033 100644 --- a/docs/Model/PaymentFlowPaymentMethodOptionsCardRequest.md +++ b/docs/Model/PaymentFlowPaymentMethodOptionsCardRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**requestExtendedAuthorization** | **string** | オーソリ期間の延長要求 | 指定できる値 | |:---| | **if_available**: オーソリ期間の延長が可能な場合に延長要求を行います。 | | **never**: オーソリ期間の延長要求を行いません。 | | [optional] -**requestThreeDSecure** | **string** | 3Dセキュア認証の要求方法。 | 指定できる値 | |:---| | **any**: 3Dセキュア認証を要求します。 | | **automatic**: 必要な場合にのみ3Dセキュア認証を要求します。 | | [optional] +**requestExtendedAuthorization** | **string** | オーソリ期間の延長要求 | 値 | |:---| | **if_available**: オーソリ期間の延長が可能な場合に延長要求を行います。 | | **never**: オーソリ期間の延長要求を行いません。 | | [optional] +**requestThreeDSecure** | **string** | 3D セキュア認証の要求方法。 | 値 | |:---| | **any**: 3D セキュア認証を要求します。 | | **automatic**: 必要な場合にのみ 3D セキュア認証を要求します。 | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentFlowResponse.md b/docs/Model/PaymentFlowResponse.md index 3f7cb09..9dd2592 100644 --- a/docs/Model/PaymentFlowResponse.md +++ b/docs/Model/PaymentFlowResponse.md @@ -4,26 +4,28 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | 支払いフローID | **object** | **string** | | [optional] [default to 'payment_flow'] -**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | -**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | +**id** | **string** | 支払いフロー ID | **livemode** | **bool** | 本番環境かどうか | **amount** | **int** | 支払い予定の金額 | **currency** | [**\PAYJPV2\Model\Currency**](Currency.md) | 価格の通貨。現在は `jpy` のみサポートしています。 | **amountCapturable** | **int** | | **amountReceived** | **int** | | -**clientSecret** | **string** | このPaymentFlowのクライアントシークレットです。フロントエンドで公開APIキーと合わせて使用しPaymentFlowの情報を取得や支払い処理を行います。**この値はこのPaymentFlowの支払いを行う顧客以外へ公開しないでください。**また保存やログへの記録なども行わないでください。 | +**clientSecret** | **string** | この PaymentFlow のクライアントシークレットです。フロントエンドで公開 API キーと合わせて使用し PaymentFlow の情報を取得や支払い処理を行います。**この値はこの PaymentFlow の支払いを行う顧客以外へ公開しないでください。**また保存やログへの記録なども行わないでください。 | **customerId** | **string** | | **description** | **string** | | -**metadata** | [**array**](MetadataValue.md) | メタデータ | **paymentMethodId** | **string** | | **paymentMethodOptions** | **array** | | -**paymentMethodTypes** | [**\PAYJPV2\Model\PaymentMethodTypes[]**](PaymentMethodTypes.md) | このPaymentFlowで使用できる支払い方法の種類のリスト | -**status** | [**\PAYJPV2\Model\PaymentFlowStatus**](PaymentFlowStatus.md) | このPaymentFlowのステータス。<a href=\"https://docs.pay.jp/v2/payment_flows#status\" target=\"_blank\">ステータスの詳細についてはこちらをご覧ください。</a> | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **requires_capture**: 確定が必要です。 | | **canceled**: キャンセルされました。 | | **succeeded**: 成功しました。 | | +**paymentMethodTypes** | [**\PAYJPV2\Model\PaymentMethodTypes[]**](PaymentMethodTypes.md) | この PaymentFlow で使用できる支払い方法の種類のリスト | +**status** | [**\PAYJPV2\Model\PaymentFlowStatus**](PaymentFlowStatus.md) | この PaymentFlow のステータス。<a href=\"https://docs.pay.jp/v2/payment_flows#status\" target=\"_blank\">ステータスの詳細についてはこちらをご覧ください。</a> | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **requires_capture**: 確定が必要です。 | | **canceled**: キャンセルされました。 | | **succeeded**: 成功しました。 | | **nextAction** | **array** | | **returnUrl** | **string** | | -**captureMethod** | [**\PAYJPV2\Model\CaptureMethod**](CaptureMethod.md) | 支払いの確定方法 | 指定できる値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | +**captureMethod** | [**\PAYJPV2\Model\CaptureMethod**](CaptureMethod.md) | 支払いの確定方法 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | **lastPaymentError** | **array** | | +**cancellationReason** | [**\PAYJPV2\Model\PaymentFlowCancellationReason**](PaymentFlowCancellationReason.md) | | +**canceledAt** | **\DateTime** | | +**metadata** | [**array**](MetadataValue.md) | メタデータ | +**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | +**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentFlowUpdateRequest.md b/docs/Model/PaymentFlowUpdateRequest.md index ec6771b..4b364f2 100644 --- a/docs/Model/PaymentFlowUpdateRequest.md +++ b/docs/Model/PaymentFlowUpdateRequest.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | 支払い予定の金額。50円以上9,999,999円以下である必要があります。 | [optional] -**customerId** | **string** | このPaymentFlowに関連付ける顧客のID | [optional] -**paymentMethodId** | **string** | 支払い方法ID。customer_idの指定が必須です。Customerが所持するPaymentMethodのみ指定できます。payment_method_idを指定せず、Customerにdefault_payment_method_idが設定されている場合はそちらが自動でセットされます。 | [optional] -**paymentMethodOptions** | [**\PAYJPV2\Model\PaymentFlowPaymentMethodOptionsRequest**](PaymentFlowPaymentMethodOptionsRequest.md) | このPaymentFlow固有の支払い方法の設定 | [optional] -**paymentMethodTypes** | [**\PAYJPV2\Model\PaymentMethodTypes[]**](PaymentMethodTypes.md) | このPaymentFlowで使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JPは支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] -**returnUrl** | **string** | 顧客が支払いを完了後かキャンセルした後にリダイレクトされるURL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。 | [optional] +**customerId** | **string** | この PaymentFlow に関連付ける顧客の ID | [optional] +**paymentMethodId** | **string** | 支払い方法 ID。customer_id の指定が必須です。Customer が所持する PaymentMethod のみ指定できます。payment_method_id を指定せず、Customer に default_payment_method_id が設定されている場合はそちらが自動でセットされます。 | [optional] +**paymentMethodOptions** | [**\PAYJPV2\Model\PaymentFlowPaymentMethodOptionsRequest**](PaymentFlowPaymentMethodOptionsRequest.md) | この PaymentFlow 固有の支払い方法の設定 | [optional] +**paymentMethodTypes** | [**\PAYJPV2\Model\PaymentMethodTypes[]**](PaymentMethodTypes.md) | この PaymentFlow で使用できる支払い方法の種類のリスト。指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] +**returnUrl** | **string** | 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。 | [optional] **description** | **string** | オブジェクトにセットする任意の文字列。ユーザーには表示されません。 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodApplePayCreateRequest.md b/docs/Model/PaymentMethodApplePayCreateRequest.md index fb03a64..db9d879 100644 --- a/docs/Model/PaymentMethodApplePayCreateRequest.md +++ b/docs/Model/PaymentMethodApplePayCreateRequest.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**customerId** | **string** | 顧客ID | [optional] +**customerId** | **string** | 顧客 ID | [optional] **billingDetails** | [**\PAYJPV2\Model\PaymentMethodBillingDetailsRequest**](PaymentMethodBillingDetailsRequest.md) | 請求先情報 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] -**type** | **string** | Apple Pay決済の場合は `apple_pay` を指定します。 | -**token** | **string** | Apple Payのトークン | +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**type** | **string** | Apple Pay 決済の場合は `apple_pay` を指定します。 | +**token** | **string** | Apple Pay のトークン | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodApplePayUpdateRequest.md b/docs/Model/PaymentMethodApplePayUpdateRequest.md index c9766d5..a53f554 100644 --- a/docs/Model/PaymentMethodApplePayUpdateRequest.md +++ b/docs/Model/PaymentMethodApplePayUpdateRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **billingDetails** | [**\PAYJPV2\Model\PaymentMethodBillingDetailsRequest**](PaymentMethodBillingDetailsRequest.md) | 請求先情報 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] -**type** | **string** | Apple Pay決済の場合は `apple_pay` を指定します。 | +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**type** | **string** | Apple Pay 決済の場合は `apple_pay` を指定します。 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodAttachRequest.md b/docs/Model/PaymentMethodAttachRequest.md index b5edaeb..96b8b65 100644 --- a/docs/Model/PaymentMethodAttachRequest.md +++ b/docs/Model/PaymentMethodAttachRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**customerId** | **string** | 顧客ID | +**customerId** | **string** | 顧客 ID | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodCardCreateRequest.md b/docs/Model/PaymentMethodCardCreateRequest.md index 2ccb4c2..b05b58b 100644 --- a/docs/Model/PaymentMethodCardCreateRequest.md +++ b/docs/Model/PaymentMethodCardCreateRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**customerId** | **string** | 顧客ID | [optional] +**customerId** | **string** | 顧客 ID | [optional] **billingDetails** | [**\PAYJPV2\Model\PaymentMethodCardBillingDetailsRequest**](PaymentMethodCardBillingDetailsRequest.md) | 請求先情報 | -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] **type** | **string** | クレジットカード決済の場合は `card` を指定します。 | **card** | [**\PAYJPV2\Model\PaymentMethodCreateCardDetailsRequest**](PaymentMethodCreateCardDetailsRequest.md) | カード情報 | diff --git a/docs/Model/PaymentMethodCardDetailsResponse.md b/docs/Model/PaymentMethodCardDetailsResponse.md index e2586d5..be1b5be 100644 --- a/docs/Model/PaymentMethodCardDetailsResponse.md +++ b/docs/Model/PaymentMethodCardDetailsResponse.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **brand** | **string** | カードのブランド | **expMonth** | **int** | カードの有効期限(月) | **expYear** | **int** | カードの有効期限(年) | -**fingerprint** | **string** | fingerprint | +**fingerprint** | **string** | このクレジットカード番号に紐づく値。同一番号のカードからは同一の値が生成されることが保証されています。 | **country** | **string** | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodCardResponse.md b/docs/Model/PaymentMethodCardResponse.md index a696e44..b47cb16 100644 --- a/docs/Model/PaymentMethodCardResponse.md +++ b/docs/Model/PaymentMethodCardResponse.md @@ -6,13 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **string** | | [optional] [default to 'payment_method'] **id** | **string** | ID | +**livemode** | **bool** | 本番環境かどうか | **type** | **string** | | **customerId** | **string** | | **detachedAt** | **\DateTime** | | -**livemode** | **bool** | 本番環境かどうか | +**metadata** | [**array**](MetadataValue.md) | メタデータ | **createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | **updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | -**metadata** | [**array**](MetadataValue.md) | メタデータ | **billingDetails** | [**\PAYJPV2\Model\PaymentMethodBillingDetailsResponse**](PaymentMethodBillingDetailsResponse.md) | 請求先情報 | **card** | [**\PAYJPV2\Model\PaymentMethodCardDetailsResponse**](PaymentMethodCardDetailsResponse.md) | カード情報 | diff --git a/docs/Model/PaymentMethodCardUpdateRequest.md b/docs/Model/PaymentMethodCardUpdateRequest.md index f5a9671..b063ecd 100644 --- a/docs/Model/PaymentMethodCardUpdateRequest.md +++ b/docs/Model/PaymentMethodCardUpdateRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **billingDetails** | [**\PAYJPV2\Model\PaymentMethodBillingDetailsRequest**](PaymentMethodBillingDetailsRequest.md) | 請求先情報 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] **type** | **string** | クレジットカード決済の場合は `card` を指定します。 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodConfigurationDetailsResponse.md b/docs/Model/PaymentMethodConfigurationDetailsResponse.md index 4bdfd65..92980a5 100644 --- a/docs/Model/PaymentMethodConfigurationDetailsResponse.md +++ b/docs/Model/PaymentMethodConfigurationDetailsResponse.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | ID | **object** | **string** | | [optional] [default to 'payment_method_configuration'] -**active** | **bool** | 設定が有効かどうか。 | +**id** | **string** | 支払い方法設定 ID | **livemode** | **bool** | 本番環境かどうか | +**active** | **bool** | 設定が有効かどうか | **name** | **string** | | -**paypay** | [**\PAYJPV2\Model\PaymentMethodConfigurationSettingResponse**](PaymentMethodConfigurationSettingResponse.md) | PayPayの設定 | +**paypay** | [**\PAYJPV2\Model\PaymentMethodConfigurationSettingResponse**](PaymentMethodConfigurationSettingResponse.md) | PayPay の設定 | **card** | [**\PAYJPV2\Model\PaymentMethodConfigurationSettingResponse**](PaymentMethodConfigurationSettingResponse.md) | カードの設定 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodConfigurationDisplayPreference.md b/docs/Model/PaymentMethodConfigurationDisplayPreference.md index 5bf07c2..e355248 100644 --- a/docs/Model/PaymentMethodConfigurationDisplayPreference.md +++ b/docs/Model/PaymentMethodConfigurationDisplayPreference.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**preference** | **string** | この支払い方法がアカウントで有効になっているかどうか。 | 指定できる値 | |:---| | **on**: この決済手段を決済画面に表示する | | **off**: この決済手段を決済画面に表示しない | | **none**: デフォルト設定を使用 | | [optional] -**value** | **string** | この支払い方法を決済画面に表示するかどうか。 | 指定できる値 | |:---| | **on**: この決済手段を決済画面に表示する | | **off**: この決済手段を決済画面に表示しない | | [optional] +**preference** | **string** | この支払い方法がアカウントで有効になっているかどうか | 値 | |:---| | **on**: この決済手段を決済画面に表示する | | **off**: この決済手段を決済画面に表示しない | | **none**: デフォルト設定を使用 | | [optional] +**value** | **string** | この支払い方法を決済画面に表示するかどうか。 | 値 | |:---| | **on**: この決済手段を決済画面に表示する | | **off**: この決済手段を決済画面に表示しない | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodConfigurationSettingResponse.md b/docs/Model/PaymentMethodConfigurationSettingResponse.md index d252549..9dfa79e 100644 --- a/docs/Model/PaymentMethodConfigurationSettingResponse.md +++ b/docs/Model/PaymentMethodConfigurationSettingResponse.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **available** | **bool** | この支払い方法が決済画面に表示されるかどうか。`display_preference.preference` と `display_preference.value` の両方が `on` の場合に決済画面に表示されます。 | [optional] -**displayPreference** | [**\PAYJPV2\Model\PaymentMethodConfigurationDisplayPreference**](PaymentMethodConfigurationDisplayPreference.md) | 支払い方法の表示設定。 | [optional] +**displayPreference** | [**\PAYJPV2\Model\PaymentMethodConfigurationDisplayPreference**](PaymentMethodConfigurationDisplayPreference.md) | 支払い方法の表示設定 | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodCreateRequest.md b/docs/Model/PaymentMethodCreateRequest.md index 0325ef2..d4d80de 100644 --- a/docs/Model/PaymentMethodCreateRequest.md +++ b/docs/Model/PaymentMethodCreateRequest.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**customerId** | **string** | 顧客ID | [optional] +**customerId** | **string** | 顧客 ID | [optional] **billingDetails** | [**\PAYJPV2\Model\PaymentMethodBillingDetailsRequest**](PaymentMethodBillingDetailsRequest.md) | 請求先情報 | -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] **type** | **string** | クレジットカード決済の場合は `card` を指定します。 | **card** | [**\PAYJPV2\Model\PaymentMethodCreateCardDetailsRequest**](PaymentMethodCreateCardDetailsRequest.md) | カード情報 | -**token** | **string** | Apple Payのトークン | +**token** | **string** | Apple Pay のトークン | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodPayPayCreateRequest.md b/docs/Model/PaymentMethodPayPayCreateRequest.md index 017569b..b21a87d 100644 --- a/docs/Model/PaymentMethodPayPayCreateRequest.md +++ b/docs/Model/PaymentMethodPayPayCreateRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**customerId** | **string** | 顧客ID | [optional] +**customerId** | **string** | 顧客 ID | [optional] **billingDetails** | [**\PAYJPV2\Model\PaymentMethodBillingDetailsRequest**](PaymentMethodBillingDetailsRequest.md) | 請求先情報 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] -**type** | **string** | PayPay決済の場合は `paypay` を指定します。 | +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**type** | **string** | PayPay 決済の場合は `paypay` を指定します。 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodPayPayResponse.md b/docs/Model/PaymentMethodPayPayResponse.md index cde10d1..448cc3d 100644 --- a/docs/Model/PaymentMethodPayPayResponse.md +++ b/docs/Model/PaymentMethodPayPayResponse.md @@ -6,13 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **string** | | [optional] [default to 'payment_method'] **id** | **string** | ID | +**livemode** | **bool** | 本番環境かどうか | **type** | **string** | | **customerId** | **string** | | **detachedAt** | **\DateTime** | | -**livemode** | **bool** | 本番環境かどうか | +**metadata** | [**array**](MetadataValue.md) | メタデータ | **createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | **updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | -**metadata** | [**array**](MetadataValue.md) | メタデータ | **billingDetails** | [**\PAYJPV2\Model\PaymentMethodBillingDetailsResponse**](PaymentMethodBillingDetailsResponse.md) | 請求先情報 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodPayPayUpdateRequest.md b/docs/Model/PaymentMethodPayPayUpdateRequest.md index 6f006d1..0131dc1 100644 --- a/docs/Model/PaymentMethodPayPayUpdateRequest.md +++ b/docs/Model/PaymentMethodPayPayUpdateRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **billingDetails** | [**\PAYJPV2\Model\PaymentMethodBillingDetailsRequest**](PaymentMethodBillingDetailsRequest.md) | 請求先情報 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] -**type** | **string** | PayPay決済の場合は `paypay` を指定します。 | +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**type** | **string** | PayPay 決済の場合は `paypay` を指定します。 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentMethodResponse.md b/docs/Model/PaymentMethodResponse.md index 872e8db..6a87708 100644 --- a/docs/Model/PaymentMethodResponse.md +++ b/docs/Model/PaymentMethodResponse.md @@ -6,13 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **string** | | [optional] [default to 'payment_method'] **id** | **string** | ID | +**livemode** | **bool** | 本番環境かどうか | **type** | **string** | | **customerId** | **string** | | **detachedAt** | **\DateTime** | | -**livemode** | **bool** | 本番環境かどうか | +**metadata** | [**array**](MetadataValue.md) | メタデータ | **createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | **updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | -**metadata** | [**array**](MetadataValue.md) | メタデータ | **billingDetails** | [**\PAYJPV2\Model\PaymentMethodBillingDetailsResponse**](PaymentMethodBillingDetailsResponse.md) | 請求先情報 | **card** | [**\PAYJPV2\Model\PaymentMethodCardDetailsResponse**](PaymentMethodCardDetailsResponse.md) | カード情報 | diff --git a/docs/Model/PaymentMethodUpdateRequest.md b/docs/Model/PaymentMethodUpdateRequest.md index 33fff18..3924e57 100644 --- a/docs/Model/PaymentMethodUpdateRequest.md +++ b/docs/Model/PaymentMethodUpdateRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **billingDetails** | [**\PAYJPV2\Model\PaymentMethodBillingDetailsRequest**](PaymentMethodBillingDetailsRequest.md) | 請求先情報 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] **type** | **string** | クレジットカード決済の場合は `card` を指定します。 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentRefundCreateRequest.md b/docs/Model/PaymentRefundCreateRequest.md index 4c2f9e7..3705f33 100644 --- a/docs/Model/PaymentRefundCreateRequest.md +++ b/docs/Model/PaymentRefundCreateRequest.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **paymentFlowId** | **string** | 返金対象となる PaymentFlow の ID | -**amount** | **int** | 返金金額 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] -**reason** | [**\PAYJPV2\Model\PaymentRefundReason**](PaymentRefundReason.md) | 返金理由 | 指定できる値 | |:---| | **duplicate**: 重複した支払い | | **fraudulent**: 不正な支払い | | **requested_by_customer**: 顧客の要求 | | [optional] +**amount** | **int** | 返金金額。省略すると全額返金となります。 | [optional] +**reason** | [**\PAYJPV2\Model\PaymentRefundReason**](PaymentRefundReason.md) | 返金理由 | 値 | |:---| | **duplicate**: 重複した支払い | | **fraudulent**: 不正な支払い | | **requested_by_customer**: 顧客の要求 | | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentRefundResponse.md b/docs/Model/PaymentRefundResponse.md index af85fae..38f3f3e 100644 --- a/docs/Model/PaymentRefundResponse.md +++ b/docs/Model/PaymentRefundResponse.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | 返金対象となる PaymentFlow の ID | **object** | **string** | | [optional] [default to 'payment_refund'] -**createdAt** | **\DateTime** | 作成時の日時 (UTC, ISO 8601 形式) | -**updatedAt** | **\DateTime** | 更新時の日時 (UTC, ISO 8601 形式) | +**id** | **string** | 返金 ID | **livemode** | **bool** | 本番環境かどうか | -**amount** | **int** | 返金金額 | -**status** | [**\PAYJPV2\Model\PaymentRefundStatus**](PaymentRefundStatus.md) | 返金ステータス <a href=\"https://docs.pay.jp/v2/payment_refunds#refund_status\" target=\"_blank\">返金ステータスの詳細についてはこちらを参照してください。</a> | 指定できる値 | |:---| | **succeeded**: 成功 | | **failed**: 失敗 | | **pending**: 保留中 | | **canceled**: キャンセル | | **paymentFlowId** | **string** | 返金対象となる PaymentFlow の ID | +**amount** | **int** | 返金金額 | +**status** | [**\PAYJPV2\Model\PaymentRefundStatus**](PaymentRefundStatus.md) | 返金ステータス <a href=\"https://docs.pay.jp/v2/guide/status-management/refund#%E8%BF%94%E9%87%91%E3%82%B9%E3%83%86%E3%83%BC%E3%82%BF%E3%82%B9%E3%81%AE%E7%9B%A3%E8%A6%96\" target=\"_blank\">返金ステータスの詳細についてはこちらを参照してください。</a> | 値 | |:---| | **succeeded**: 返金が成功しました | | **failed**: 返金が失敗しました | | **pending**: 返金処理中です | | **canceled**: 返金がキャンセルされました | | **requires_action**: 追加のアクションが必要です | | **reason** | [**\PAYJPV2\Model\PaymentRefundReason**](PaymentRefundReason.md) | | **metadata** | [**array**](MetadataValue.md) | メタデータ | +**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | +**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentRefundUpdateRequest.md b/docs/Model/PaymentRefundUpdateRequest.md index 5fb240a..cb56444 100644 --- a/docs/Model/PaymentRefundUpdateRequest.md +++ b/docs/Model/PaymentRefundUpdateRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentTransactionListResponse.md b/docs/Model/PaymentTransactionListResponse.md index 1f46f27..efda9b6 100644 --- a/docs/Model/PaymentTransactionListResponse.md +++ b/docs/Model/PaymentTransactionListResponse.md @@ -7,6 +7,6 @@ Name | Type | Description | Notes **object** | **string** | | [optional] [default to 'list'] **url** | **string** | リスト取得URL | **hasMore** | **bool** | 次のページがあるかどうか | -**data** | [**\PAYJPV2\Model\PaymentTransactionResponse[]**](PaymentTransactionResponse.md) | PaymentTransaction一覧 | +**data** | [**\PAYJPV2\Model\PaymentTransactionResponse[]**](PaymentTransactionResponse.md) | PaymentTransaction 一覧 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaymentTransactionResponse.md b/docs/Model/PaymentTransactionResponse.md index c1e96ac..f3db634 100644 --- a/docs/Model/PaymentTransactionResponse.md +++ b/docs/Model/PaymentTransactionResponse.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | ID | **object** | **string** | | [optional] [default to 'payment_transaction'] -**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | -**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | +**id** | **string** | 決済トランザクション ID | **livemode** | **bool** | 本番環境かどうか | -**resourceId** | **string** | PaymentTransaction生成の元になったリソースのID | +**resourceId** | **string** | PaymentTransaction 生成の元になったリソースの ID | **amount** | **int** | 金額 | **currency** | [**\PAYJPV2\Model\Currency**](Currency.md) | 通貨 | **feeRate** | **string** | 手数料率 | **fee** | **int** | 手数料 | -**type** | [**\PAYJPV2\Model\PaymentTransactionType**](PaymentTransactionType.md) | PaymentTransactionの種類 | +**type** | [**\PAYJPV2\Model\PaymentTransactionType**](PaymentTransactionType.md) | PaymentTransaction の種類 | 値 | |:---| | **payment**: 支払い | | **refund**: 返金 | | **chargeback**: チャージバック | | **chargeback_cancel**: チャージバックのキャンセル | | **paymentMethodType** | [**\PAYJPV2\Model\PaymentMethodTypes**](PaymentMethodTypes.md) | 支払い方法の種類 | -**termId** | **string** | 期間ID | +**termId** | **string** | 集計区間 ID | +**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | +**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PriceCreateRequest.md b/docs/Model/PriceCreateRequest.md index 8d657ca..70fec04 100644 --- a/docs/Model/PriceCreateRequest.md +++ b/docs/Model/PriceCreateRequest.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nickname** | **string** | 価格の名称。PAY.JP のダッシュボードで識別するためのもので、顧客には表示されません。 | [optional] -**lookupKey** | **string** | この価格を検索するためのキー。 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] -**id** | **string** | 料金ID | [optional] +**productId** | **string** | この価格が紐付く商品の ID | +**unitAmount** | **int** | 価格の単価 | **currency** | [**\PAYJPV2\Model\Currency**](Currency.md) | 価格の通貨。現在は `jpy` のみサポートしています。 | -**active** | **bool** | 価格が有効かどうか。デフォルトは `true`。 | [optional] [default to true] -**productId** | **string** | この価格が紐付く商品のID。 | -**unitAmount** | **int** | 価格の単価。0以上の整数となります。 | +**id** | **string** | 料金 ID | [optional] +**active** | **bool** | 価格が有効かどうか | [optional] [default to true] +**nickname** | **string** | 価格の名称。PAY.JP の管理画面で識別するためのもので、顧客には表示されません。 | [optional] +**lookupKey** | **string** | この価格を検索するためのキー | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PriceDetailsResponse.md b/docs/Model/PriceDetailsResponse.md index 4da67d4..5480b84 100644 --- a/docs/Model/PriceDetailsResponse.md +++ b/docs/Model/PriceDetailsResponse.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | 料金ID | **object** | **string** | | [optional] [default to 'price'] +**id** | **string** | 料金 ID | **livemode** | **bool** | 本番環境かどうか | -**active** | **bool** | 価格が有効かどうか。デフォルトは `true`。 | -**metadata** | [**array**](MetadataValue.md) | メタデータ | +**productId** | **string** | この価格が紐付く商品の ID | +**unitAmount** | **int** | 価格の単価 | +**currency** | [**\PAYJPV2\Model\Currency**](Currency.md) | 価格の通貨。現在は `jpy` のみサポートしています。 | +**active** | **bool** | 価格が有効かどうか | **nickname** | **string** | | -**type** | [**\PAYJPV2\Model\PriceType**](PriceType.md) | 価格が一度限りの購入か、継続的な(サブスクリプション)購入かに応じて、`one_time` または `recurring` のいずれかとなります。 | 指定できる値 | |:---| | **one_time**: 1回限りの価格。 | | **recurring**: 継続的な価格。 | | +**type** | [**\PAYJPV2\Model\PriceType**](PriceType.md) | 一度限りの購入を表す `one_time` が入ります。 | **lookupKey** | **string** | | -**currency** | [**\PAYJPV2\Model\Currency**](Currency.md) | 価格の通貨。現在は `jpy` のみサポートしています。 | -**productId** | **string** | この価格が紐付く商品のID。 | -**unitAmount** | **int** | 価格の単価。0以上の整数となります。 | -**createdAt** | **\DateTime** | 支払い方法作成時の日時 (UTC, ISO 8601 形式) | -**updatedAt** | **\DateTime** | 支払い方法更新時の日時 (UTC, ISO 8601 形式) | +**metadata** | [**array**](MetadataValue.md) | メタデータ | +**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | +**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PriceUpdateRequest.md b/docs/Model/PriceUpdateRequest.md index 94b5eba..f0fb303 100644 --- a/docs/Model/PriceUpdateRequest.md +++ b/docs/Model/PriceUpdateRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nickname** | **string** | 価格の名称。PAY.JP のダッシュボードで識別するためのもので、顧客には表示されません。 | [optional] -**lookupKey** | **string** | この価格を検索するためのキー。 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] -**active** | **bool** | 価格が有効かどうか。デフォルトは `true`。 | [optional] +**active** | **bool** | 価格が有効かどうか | [optional] +**nickname** | **string** | 価格の名称。PAY.JP の管理画面で識別するためのもので、顧客には表示されません。 | [optional] +**lookupKey** | **string** | この価格を検索するためのキー | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProductCreateRequest.md b/docs/Model/ProductCreateRequest.md index 865ff07..aaf02aa 100644 --- a/docs/Model/ProductCreateRequest.md +++ b/docs/Model/ProductCreateRequest.md @@ -4,12 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**defaultPriceId** | **string** | この商品のデフォルト価格である価格オブジェクトのID。 | [optional] -**description** | **string** | Checkoutなどで顧客に表示される商品説明。 | [optional] -**unitLabel** | **string** | この製品の単位を表すラベル。設定すると、Checkoutや請求書などに表示されます。(例:「個」、「ライセンス」、「時間」、「回」など) | [optional] -**url** | **string** | この製品の公開されているウェブページのURL。 | [optional] -**id** | **string** | 商品ID | [optional] -**name** | **string** | Checkoutなどで顧客に表示される商品名。 | -**active** | **bool** | 商品が購入可能かどうか。デフォルトは `true`。 | [optional] [default to true] +**name** | **string** | Checkout などで顧客に表示される商品名 | +**id** | **string** | 商品 ID | [optional] +**active** | **bool** | 商品が購入可能かどうか | [optional] [default to true] +**description** | **string** | Checkout などで顧客に表示される商品説明 | [optional] +**unitLabel** | **string** | この製品の単位を表すラベル。設定すると、Checkout などに表示されます。(例:「個」、「ライセンス」、「時間」、「回」など) | [optional] +**url** | **string** | この製品の公開されているウェブページの URL | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProductDeletedResponse.md b/docs/Model/ProductDeletedResponse.md index 029df5b..8d4d9d2 100644 --- a/docs/Model/ProductDeletedResponse.md +++ b/docs/Model/ProductDeletedResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | 商品ID | **object** | **string** | | [optional] [default to 'product'] -**deleted** | **bool** | 削除されたかどうか | [readonly] +**id** | **string** | 商品 ID | +**deleted** | **bool** | 削除されたかどうか | [optional] [default to true] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProductDetailsResponse.md b/docs/Model/ProductDetailsResponse.md index 56def7d..f268aa5 100644 --- a/docs/Model/ProductDetailsResponse.md +++ b/docs/Model/ProductDetailsResponse.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | 商品ID | **object** | **string** | | [optional] [default to 'product'] -**name** | **string** | Checkoutなどで顧客に表示される商品名。 | -**active** | **bool** | 商品が購入可能かどうか。デフォルトは `true`。 | +**id** | **string** | 商品 ID | +**name** | **string** | Checkout などで顧客に表示される商品名 | +**active** | **bool** | 商品が購入可能かどうか | **defaultPriceId** | **string** | | **description** | **string** | | **unitLabel** | **string** | | diff --git a/docs/Model/ProductUpdateRequest.md b/docs/Model/ProductUpdateRequest.md index f9b6e80..febb70e 100644 --- a/docs/Model/ProductUpdateRequest.md +++ b/docs/Model/ProductUpdateRequest.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**defaultPriceId** | **string** | この商品のデフォルト価格である価格オブジェクトのID。 | [optional] -**description** | **string** | Checkoutなどで顧客に表示される商品説明。 | [optional] -**unitLabel** | **string** | この製品の単位を表すラベル。設定すると、Checkoutや請求書などに表示されます。(例:「個」、「ライセンス」、「時間」、「回」など) | [optional] -**url** | **string** | この製品の公開されているウェブページのURL。 | [optional] -**name** | **string** | Checkoutなどで顧客に表示される商品名。 | [optional] -**active** | **bool** | 商品が購入可能かどうか。デフォルトは `true`。 | [optional] +**name** | **string** | Checkout などで顧客に表示される商品名 | [optional] +**active** | **bool** | 商品が購入可能かどうか | [optional] +**defaultPriceId** | **string** | この商品のデフォルト価格である価格オブジェクトの ID | [optional] +**description** | **string** | Checkout などで顧客に表示される商品説明 | [optional] +**unitLabel** | **string** | この製品の単位を表すラベル。設定すると、Checkout などに表示されます。(例:「個」、「ライセンス」、「時間」、「回」など) | [optional] +**url** | **string** | この製品の公開されているウェブページの URL | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SetupFlowCancelRequest.md b/docs/Model/SetupFlowCancelRequest.md index 6e6f860..b09e338 100644 --- a/docs/Model/SetupFlowCancelRequest.md +++ b/docs/Model/SetupFlowCancelRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**cancellationReason** | [**\PAYJPV2\Model\SetupFlowCancellationReason**](SetupFlowCancellationReason.md) | この SetupFlow のキャンセル理由。 | 指定できる値 | |:---| | **abandoned**: 顧客が支払いを完了しなかった場合。 | | **requested_by_customer**: 顧客がキャンセルを要求した場合。 | | **duplicate**: 支払い方法が重複している場合。 | | [optional] +**cancellationReason** | [**\PAYJPV2\Model\SetupFlowCancellationReason**](SetupFlowCancellationReason.md) | この SetupFlow のキャンセル理由。 | 値 | |:---| | **abandoned**: 顧客が SetupFlow を完了しなかった場合。 | | **requested_by_customer**: 顧客がキャンセルを要求した場合。 | | **duplicate**: 支払い方法が重複している場合。 | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SetupFlowCreateRequest.md b/docs/Model/SetupFlowCreateRequest.md index 324ef67..547ed3d 100644 --- a/docs/Model/SetupFlowCreateRequest.md +++ b/docs/Model/SetupFlowCreateRequest.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**customerId** | **string** | この SetupFlow が属する顧客の ID。SetupFlow に PaymentMethod が設定されている場合、SetupFlow の設定が成功するとその PaymentMethod は顧客に紐付きます。別の顧客に紐付いている PaymentMethod をこの SetupFlow で使用することはできません。 | [optional] +**customerId** | **string** | この SetupFlow に関連付ける顧客の ID。SetupFlow により作られた PaymentMethod はこの顧客に紐付きます。 | [optional] +**paymentMethodOptions** | [**\PAYJPV2\Model\SetupFlowPaymentMethodOptionsRequest**](SetupFlowPaymentMethodOptionsRequest.md) | この SetupFlow 固有の支払い方法の設定 | [optional] +**paymentMethodTypes** | **string[]** | この SetupFlow で使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] +**usage** | [**\PAYJPV2\Model\Usage**](Usage.md) | 支払い方法が今後どのように使用されるかを指定します。指定されていない場合、この値はデフォルトで `off_session` になります。 | 値 | |:---| | **off_session**: 定期課金など、顧客がカートなどの決済フローにいるかどうか不明な場合は `off_session` を使用してください。 | | **on_session**: 顧客がカートなどの決済フローにいる場合にのみ支払い方法を利用する場合は `on_session` を使用してください。 | | [optional] **description** | **string** | 説明。顧客に表示されます。 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] -**paymentMethodOptions** | [**\PAYJPV2\Model\SetupFlowPaymentMethodOptionsRequest**](SetupFlowPaymentMethodOptionsRequest.md) | この SetupFlow の支払い方法の個別設定。 | [optional] -**paymentMethodTypes** | **string[]** | この SetupFlow で使用できる支払い方法の種類(カードなど)のリストです。 指定しない場合、ダッシュボードで利用可能な状態にしている支払い方法が自動的に設定されます。 | [optional] -**usage** | [**\PAYJPV2\Model\Usage**](Usage.md) | 支払い方法が今後どのように使用されるかを指定します。指定されていない場合、この値はデフォルトで `off_session` になります。 | 指定できる値 | |:---| | **off_session**: 定期課金など、顧客がカートなどの決済フローにいるかどうか不明な場合は `off_session` を使用してください。 | | **on_session**: 顧客がカートなどの決済フローにいる場合にのみ支払い方法を利用する場合は `on_session` を使用してください。 | | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SetupFlowDataRequest.md b/docs/Model/SetupFlowDataRequest.md index be58e90..0bd6696 100644 --- a/docs/Model/SetupFlowDataRequest.md +++ b/docs/Model/SetupFlowDataRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SetupFlowPaymentMethodOptionsCardRequest.md b/docs/Model/SetupFlowPaymentMethodOptionsCardRequest.md index f8b80ae..b7bfd6e 100644 --- a/docs/Model/SetupFlowPaymentMethodOptionsCardRequest.md +++ b/docs/Model/SetupFlowPaymentMethodOptionsCardRequest.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**requestThreeDSecure** | **string** | 3Dセキュア認証の要求方法。 | 指定できる値 | |:---| | **any**: 3Dセキュア認証を要求します。 | | **automatic**: 必要な場合にのみ3Dセキュア認証を要求します。 | | [optional] +**requestThreeDSecure** | **string** | 3D セキュア認証の要求方法。 | 値 | |:---| | **any**: 3D セキュア認証を要求します。 | | **automatic**: 必要な場合にのみ 3D セキュア認証を要求します。 | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SetupFlowResponse.md b/docs/Model/SetupFlowResponse.md index 850cecb..cf47b91 100644 --- a/docs/Model/SetupFlowResponse.md +++ b/docs/Model/SetupFlowResponse.md @@ -4,21 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | ID | **object** | **string** | | [optional] [default to 'setup_flow'] -**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | -**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | +**id** | **string** | ID | **livemode** | **bool** | 本番環境かどうか | -**clientSecret** | **string** | この SetupFlow のクライアントシークレットです。フロントエンドで公開鍵と合わせて使用し、SetupFlow の取得や支払い処理を行います。**この値はこの SetupFlow の支払いを行う顧客以外へ公開しないでください。 | +**clientSecret** | **string** | この SetupFlow のクライアントシークレットです。フロントエンドで公開鍵と合わせて使用し、SetupFlow の取得や支払い方法の登録処理を行います。**この値はこの SetupFlow を利用する顧客以外へ公開しないでください。 | **customerId** | **string** | | **description** | **string** | | **metadata** | [**array**](MetadataValue.md) | メタデータ | **paymentMethodId** | **string** | | **paymentMethodOptions** | **array** | | -**paymentMethodTypes** | [**\PAYJPV2\Model\PaymentMethodTypes[]**](PaymentMethodTypes.md) | この SetupFlow で使用できる支払い方法の種類(カードなど)のリストです。 指定しない場合、ダッシュボードで利用可能な状態にしている支払い方法が自動的に設定されます。 | -**status** | [**\PAYJPV2\Model\SetupFlowStatus**](SetupFlowStatus.md) | この SetupFlow のステータスです。<a href=\"https://docs.pay.jp/v2/setup_flows#status\" target=\"_blank\">ステータスの詳細についてはこちらをご覧ください。</a> | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **succeeded**: 成功しました。 | | **canceled**: キャンセルされました。 | | +**paymentMethodTypes** | [**\PAYJPV2\Model\PaymentMethodTypes[]**](PaymentMethodTypes.md) | この SetupFlow で使用できる支払い方法の種類のリスト | +**status** | [**\PAYJPV2\Model\SetupFlowStatus**](SetupFlowStatus.md) | この SetupFlow のステータスです。<a href=\"https://docs.pay.jp/v2/guide/payments/setupflow#setup-flow-%E3%81%AE%E3%82%B9%E3%83%86%E3%83%BC%E3%82%BF%E3%82%B9\" target=\"_blank\">ステータスの詳細についてはこちらをご覧ください。</a> | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **succeeded**: 成功しました。 | | **canceled**: キャンセルされました。 | | **nextAction** | **array** | | **returnUrl** | **string** | | **lastSetupError** | **array** | | +**cancellationReason** | [**\PAYJPV2\Model\SetupFlowCancellationReason**](SetupFlowCancellationReason.md) | | +**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | +**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SetupFlowUpdateRequest.md b/docs/Model/SetupFlowUpdateRequest.md index edccda9..af99893 100644 --- a/docs/Model/SetupFlowUpdateRequest.md +++ b/docs/Model/SetupFlowUpdateRequest.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**customerId** | **string** | この SetupFlow が属する顧客の ID。SetupFlow に PaymentMethod が設定されている場合、SetupFlow の設定が成功するとその PaymentMethod は顧客に紐付きます。別の顧客に紐付いている PaymentMethod をこの SetupFlow で使用することはできません。 | [optional] -**paymentMethodOptions** | [**\PAYJPV2\Model\SetupFlowPaymentMethodOptionsRequest**](SetupFlowPaymentMethodOptionsRequest.md) | この SetupFlow の支払い方法の個別設定。 | [optional] -**paymentMethodTypes** | **string[]** | この SetupFlow で使用できる支払い方法の種類(カードなど)のリストです。 指定しない場合、ダッシュボードで利用可能な状態にしている支払い方法が自動的に設定されます。 | [optional] +**customerId** | **string** | この SetupFlow に関連付ける顧客の ID。SetupFlow により作られた PaymentMethod はこの顧客に紐付きます。 | [optional] +**paymentMethodOptions** | [**\PAYJPV2\Model\SetupFlowPaymentMethodOptionsRequest**](SetupFlowPaymentMethodOptionsRequest.md) | この SetupFlow 固有の支払い方法の設定 | [optional] +**paymentMethodTypes** | **string[]** | この SetupFlow で使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] **description** | **string** | 説明。顧客に表示されます。 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StatementResponse.md b/docs/Model/StatementResponse.md index 1e27e71..00ca555 100644 --- a/docs/Model/StatementResponse.md +++ b/docs/Model/StatementResponse.md @@ -5,15 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **string** | | [optional] [default to 'statement'] -**id** | **string** | 明細ID | +**id** | **string** | 明細 ID | **livemode** | **bool** | 本番環境かどうか | **title** | **string** | | -**type** | [**\PAYJPV2\Model\StatementType**](StatementType.md) | 取引明細の区分 | 名 | 区分 | 詳細 | |---| --- | --- | | **sales** | 売上 | 決済による売上、決済手数料等 | | **service_fee** | サービス利用料 | 有料プランの月額費用など、salesに含まれないサービス利用料 | | **forfeit** | 残高失効 | - | | **transfer_fee** | 振込手数料 | - | | **misc** | その他 | 調整金など | | -**createdAt** | **\DateTime** | 更新時の日時 (UTC, ISO 8601 形式) | -**updatedAt** | **\DateTime** | 更新時の日時 (UTC, ISO 8601 形式) | +**type** | [**\PAYJPV2\Model\StatementType**](StatementType.md) | 取引明細の区分 | 値 | 区分 | 詳細 | |---| --- | --- | | **sales** | 売上 | 決済による売上、決済手数料等 | | **service_fee** | サービス利用料 | 有料プランの月額費用など、sales に含まれないサービス利用料 | | **forfeit** | 残高失効 | - | | **transfer_fee** | 振込手数料 | - | | **misc** | その他 | 調整金など | | **term** | [**\PAYJPV2\Model\TermResponse**](TermResponse.md) | | **balanceId** | **string** | | **items** | [**\PAYJPV2\Model\StatementItemResponse[]**](StatementItemResponse.md) | 明細項目のリスト | -**net** | **int** | 含まれるstatement_itemの金額合計 | +**net** | **int** | 含まれる statement_item の金額合計 | +**createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | +**updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StatementURLResponse.md b/docs/Model/StatementURLResponse.md index a1f7062..7b4f3ca 100644 --- a/docs/Model/StatementURLResponse.md +++ b/docs/Model/StatementURLResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **string** | | [optional] [default to 'statement_url'] -**url** | **string** | 取引明細書ダウンロードURL | -**expires** | **\DateTime** | 有効期限の日付。 有効期限は発行から1時間です。 | +**url** | **string** | 取引明細書ダウンロード URL | +**expires** | **\DateTime** | 有効期限の日付 有効期限は発行から1時間です。 | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TaxRateCreateRequest.md b/docs/Model/TaxRateCreateRequest.md index cf7aa56..9b25412 100644 --- a/docs/Model/TaxRateCreateRequest.md +++ b/docs/Model/TaxRateCreateRequest.md @@ -6,10 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **displayName** | **string** | 表示名。顧客に表示されます。 | **inclusive** | **bool** | 税込みかどうか。税込 = `true` 税抜 = `false` | -**percentage** | **float** | 税率を % 単位で指定します(例: 10%の場合は「10」と入力) | +**percentage** | **float** | 税率を % 単位で指定します(例: 10%の場合は「10」と入力) | **active** | **bool** | この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 | [optional] [default to true] **country** | [**\PAYJPV2\Model\Country**](Country.md) | 有効な2文字の <a href=\"https://ja.wikipedia.org/wiki/ISO_3166-1\" target=\"_blank\">ISO 国コード</a> | [optional] -**description** | **string** | 説明。ダッシュボード内のみで表示され、顧客には表示されません。 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**description** | **string** | 説明。管理画面内のみで表示され、顧客には表示されません。 | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TaxRateDetailsResponse.md b/docs/Model/TaxRateDetailsResponse.md index 064ec45..77664b1 100644 --- a/docs/Model/TaxRateDetailsResponse.md +++ b/docs/Model/TaxRateDetailsResponse.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **string** | | [optional] [default to 'tax_rate'] -**id** | **string** | ID | +**id** | **string** | 税率 ID | **displayName** | **string** | 表示名。顧客に表示されます。 | **inclusive** | **bool** | 税込みかどうか。税込 = `true` 税抜 = `false` | -**percentage** | **float** | 税率を % 単位で指定します(例: 10%の場合は「10」と入力) | -**active** | **bool** | この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 | +**percentage** | **float** | 税率 (% 単位) | +**active** | **bool** | この税率が有効であるかどうか | **country** | [**\PAYJPV2\Model\Country**](Country.md) | | **description** | **string** | | **metadata** | [**array**](MetadataValue.md) | メタデータ | diff --git a/docs/Model/TaxRateUpdateRequest.md b/docs/Model/TaxRateUpdateRequest.md index cb8216a..765132c 100644 --- a/docs/Model/TaxRateUpdateRequest.md +++ b/docs/Model/TaxRateUpdateRequest.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 | [optional] **country** | [**\PAYJPV2\Model\Country**](Country.md) | 有効な2文字の <a href=\"https://ja.wikipedia.org/wiki/ISO_3166-1\" target=\"_blank\">ISO 国コード</a> | [optional] -**description** | **string** | 説明。ダッシュボード内のみで表示され、顧客には表示されません。 | [optional] +**description** | **string** | 説明。管理画面内のみで表示され、顧客には表示されません。 | [optional] **displayName** | **string** | 表示名。顧客に表示されます。 | [optional] -**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。<a href=\"https://docs.pay.jp/v2/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] +**metadata** | [**array**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TermResponse.md b/docs/Model/TermResponse.md index c2546d6..e3ae476 100644 --- a/docs/Model/TermResponse.md +++ b/docs/Model/TermResponse.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | ID | **object** | **string** | | [optional] [default to 'term'] +**id** | **string** | 集計区間 ID | **livemode** | **bool** | 本番環境かどうか | **startAt** | **\DateTime** | 区間開始時刻 | -**endAt** | **\DateTime** | 区間終了時刻 Termが表す区間はstart_at 以上 end_at 未満 の範囲となります。 翌サイクルのTermの場合nullを返します。 | -**closed** | **bool** | 締め処理が完了済みならTrue | +**endAt** | **\DateTime** | 区間終了時刻 Term が表す区間は start_at 以上 end_at 未満の範囲となります。 翌サイクルの Term の場合 null を返します。 | +**closed** | **bool** | 締め処理が完了済みなら true | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/lib/Api/BalancesApi.php b/lib/Api/BalancesApi.php index c81e4de..cce4447 100644 --- a/lib/Api/BalancesApi.php +++ b/lib/Api/BalancesApi.php @@ -458,8 +458,8 @@ public function createBalanceUrlRequest($balanceId, ?string $idempotencyKey = nu * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param \PAYJPV2\Model\BalanceState|null $state stateが指定した値であるオブジェクトに限定 (optional) - * @param bool|null $closed closedが指定した値であるオブジェクトに限定 (optional) + * @param \PAYJPV2\Model\BalanceState|null $state state が指定した値であるオブジェクトに限定 (optional) + * @param bool|null $closed closed が指定した値であるオブジェクトに限定 (optional) * @param \DateTime|null $sinceDueDate 入金予定日/振込期限日が指定した日時以降のデータのみ取得 (optional) * @param \DateTime|null $untilDueDate 入金予定日/振込期限日が指定した日時以前のデータのみ取得 (optional) * @param string|null $idempotencyKey Idempotency key for the request @@ -485,8 +485,8 @@ public function getAllBalances($since = null, $until = null, $limit = 10, $start * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param \PAYJPV2\Model\BalanceState|null $state stateが指定した値であるオブジェクトに限定 (optional) - * @param bool|null $closed closedが指定した値であるオブジェクトに限定 (optional) + * @param \PAYJPV2\Model\BalanceState|null $state state が指定した値であるオブジェクトに限定 (optional) + * @param bool|null $closed closed が指定した値であるオブジェクトに限定 (optional) * @param \DateTime|null $sinceDueDate 入金予定日/振込期限日が指定した日時以降のデータのみ取得 (optional) * @param \DateTime|null $untilDueDate 入金予定日/振込期限日が指定した日時以前のデータのみ取得 (optional) * @param string|null $idempotencyKey Idempotency key for the request @@ -610,8 +610,8 @@ public function getAllBalancesWithHttpInfo($since = null, $until = null, $limit * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param \PAYJPV2\Model\BalanceState|null $state stateが指定した値であるオブジェクトに限定 (optional) - * @param bool|null $closed closedが指定した値であるオブジェクトに限定 (optional) + * @param \PAYJPV2\Model\BalanceState|null $state state が指定した値であるオブジェクトに限定 (optional) + * @param bool|null $closed closed が指定した値であるオブジェクトに限定 (optional) * @param \DateTime|null $sinceDueDate 入金予定日/振込期限日が指定した日時以降のデータのみ取得 (optional) * @param \DateTime|null $untilDueDate 入金予定日/振込期限日が指定した日時以前のデータのみ取得 (optional) * @param string|null $idempotencyKey Idempotency key for the request @@ -639,8 +639,8 @@ function ($response) { * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param \PAYJPV2\Model\BalanceState|null $state stateが指定した値であるオブジェクトに限定 (optional) - * @param bool|null $closed closedが指定した値であるオブジェクトに限定 (optional) + * @param \PAYJPV2\Model\BalanceState|null $state state が指定した値であるオブジェクトに限定 (optional) + * @param bool|null $closed closed が指定した値であるオブジェクトに限定 (optional) * @param \DateTime|null $sinceDueDate 入金予定日/振込期限日が指定した日時以降のデータのみ取得 (optional) * @param \DateTime|null $untilDueDate 入金予定日/振込期限日が指定した日時以前のデータのみ取得 (optional) * @param string|null $idempotencyKey Idempotency key for the request @@ -698,8 +698,8 @@ function ($exception) { * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param \PAYJPV2\Model\BalanceState|null $state stateが指定した値であるオブジェクトに限定 (optional) - * @param bool|null $closed closedが指定した値であるオブジェクトに限定 (optional) + * @param \PAYJPV2\Model\BalanceState|null $state state が指定した値であるオブジェクトに限定 (optional) + * @param bool|null $closed closed が指定した値であるオブジェクトに限定 (optional) * @param \DateTime|null $sinceDueDate 入金予定日/振込期限日が指定した日時以降のデータのみ取得 (optional) * @param \DateTime|null $untilDueDate 入金予定日/振込期限日が指定した日時以前のデータのみ取得 (optional) * @param string|null $idempotencyKey Idempotency key for the request diff --git a/lib/Api/CheckoutSessionsApi.php b/lib/Api/CheckoutSessionsApi.php index ebdb27e..5abe90a 100644 --- a/lib/Api/CheckoutSessionsApi.php +++ b/lib/Api/CheckoutSessionsApi.php @@ -1512,7 +1512,7 @@ public function getCheckoutSessionRequest($checkoutSessionId, ?string $idempoten * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \PAYJPV2\Model\CheckoutSessionDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse + * @return \PAYJPV2\Model\CheckoutSessionDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse */ public function updateCheckoutSession($checkoutSessionId, $checkoutSessionUpdateRequest, ?string $idempotencyKey = null) { @@ -1532,7 +1532,7 @@ public function updateCheckoutSession($checkoutSessionId, $checkoutSessionUpdate * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \PAYJPV2\Model\CheckoutSessionDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \PAYJPV2\Model\CheckoutSessionDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function updateCheckoutSessionWithHttpInfo($checkoutSessionId, $checkoutSessionUpdateRequest, ?string $idempotencyKey = null) { @@ -1581,6 +1581,12 @@ public function updateCheckoutSessionWithHttpInfo($checkoutSessionId, $checkoutS $request, $response, ); + case 400: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); } @@ -1631,6 +1637,15 @@ public function updateCheckoutSessionWithHttpInfo($checkoutSessionId, $checkoutS ); $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } diff --git a/lib/Api/CustomersApi.php b/lib/Api/CustomersApi.php index 2ce328a..1fdaa8b 100644 --- a/lib/Api/CustomersApi.php +++ b/lib/Api/CustomersApi.php @@ -1847,7 +1847,7 @@ public function getCustomerPaymentMethodsRequest($customerId, $limit = 10, $star * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \PAYJPV2\Model\CustomerResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse + * @return \PAYJPV2\Model\CustomerResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse */ public function updateCustomer($customerId, $customerUpdateRequest, ?string $idempotencyKey = null) { @@ -1867,7 +1867,7 @@ public function updateCustomer($customerId, $customerUpdateRequest, ?string $ide * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \PAYJPV2\Model\CustomerResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \PAYJPV2\Model\CustomerResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function updateCustomerWithHttpInfo($customerId, $customerUpdateRequest, ?string $idempotencyKey = null) { @@ -1916,6 +1916,12 @@ public function updateCustomerWithHttpInfo($customerId, $customerUpdateRequest, $request, $response, ); + case 400: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); } @@ -1966,6 +1972,15 @@ public function updateCustomerWithHttpInfo($customerId, $customerUpdateRequest, ); $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } diff --git a/lib/Api/EventsApi.php b/lib/Api/EventsApi.php index 71dc78e..d619b73 100644 --- a/lib/Api/EventsApi.php +++ b/lib/Api/EventsApi.php @@ -136,9 +136,9 @@ public function getConfig() * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string|null $resourceId 取得するeventに紐づくAPIリソースのID (e.g. customer.id) (optional) - * @param string|null $object 取得するeventに紐づくAPIリソースのobject。値はリソース名(e.g. customer, payment_flow) (optional) - * @param string|null $type 取得するeventのtype (optional) + * @param string|null $resourceId 取得する event に紐づく API リソースの ID (optional) + * @param string|null $object 取得する event に紐づく API リソースの object。値はリソース名 (e.g. customer, payment_flow) (optional) + * @param string|null $type 取得する event の type (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format @@ -160,9 +160,9 @@ public function getAllEvents($limit = 10, $startingAfter = null, $endingBefore = * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string|null $resourceId 取得するeventに紐づくAPIリソースのID (e.g. customer.id) (optional) - * @param string|null $object 取得するeventに紐づくAPIリソースのobject。値はリソース名(e.g. customer, payment_flow) (optional) - * @param string|null $type 取得するeventのtype (optional) + * @param string|null $resourceId 取得する event に紐づく API リソースの ID (optional) + * @param string|null $object 取得する event に紐づく API リソースの object。値はリソース名 (e.g. customer, payment_flow) (optional) + * @param string|null $type 取得する event の type (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format @@ -282,9 +282,9 @@ public function getAllEventsWithHttpInfo($limit = 10, $startingAfter = null, $en * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string|null $resourceId 取得するeventに紐づくAPIリソースのID (e.g. customer.id) (optional) - * @param string|null $object 取得するeventに紐づくAPIリソースのobject。値はリソース名(e.g. customer, payment_flow) (optional) - * @param string|null $type 取得するeventのtype (optional) + * @param string|null $resourceId 取得する event に紐づく API リソースの ID (optional) + * @param string|null $object 取得する event に紐づく API リソースの object。値はリソース名 (e.g. customer, payment_flow) (optional) + * @param string|null $type 取得する event の type (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException @@ -308,9 +308,9 @@ function ($response) { * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string|null $resourceId 取得するeventに紐づくAPIリソースのID (e.g. customer.id) (optional) - * @param string|null $object 取得するeventに紐づくAPIリソースのobject。値はリソース名(e.g. customer, payment_flow) (optional) - * @param string|null $type 取得するeventのtype (optional) + * @param string|null $resourceId 取得する event に紐づく API リソースの ID (optional) + * @param string|null $object 取得する event に紐づく API リソースの object。値はリソース名 (e.g. customer, payment_flow) (optional) + * @param string|null $type 取得する event の type (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException @@ -364,9 +364,9 @@ function ($exception) { * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string|null $resourceId 取得するeventに紐づくAPIリソースのID (e.g. customer.id) (optional) - * @param string|null $object 取得するeventに紐づくAPIリソースのobject。値はリソース名(e.g. customer, payment_flow) (optional) - * @param string|null $type 取得するeventのtype (optional) + * @param string|null $resourceId 取得する event に紐づく API リソースの ID (optional) + * @param string|null $object 取得する event に紐づく API リソースの object。値はリソース名 (e.g. customer, payment_flow) (optional) + * @param string|null $type 取得する event の type (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException diff --git a/lib/Api/PaymentMethodsApi.php b/lib/Api/PaymentMethodsApi.php index 8da8c46..1690676 100644 --- a/lib/Api/PaymentMethodsApi.php +++ b/lib/Api/PaymentMethodsApi.php @@ -2120,7 +2120,7 @@ public function getPaymentMethodByCardRequest($cardId, ?string $idempotencyKey = * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \PAYJPV2\Model\PaymentMethodResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse + * @return \PAYJPV2\Model\PaymentMethodResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse */ public function updatePaymentMethod($paymentMethodId, $paymentMethodUpdateRequest, ?string $idempotencyKey = null) { @@ -2140,7 +2140,7 @@ public function updatePaymentMethod($paymentMethodId, $paymentMethodUpdateReques * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \PAYJPV2\Model\PaymentMethodResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \PAYJPV2\Model\PaymentMethodResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function updatePaymentMethodWithHttpInfo($paymentMethodId, $paymentMethodUpdateRequest, ?string $idempotencyKey = null) { @@ -2189,6 +2189,12 @@ public function updatePaymentMethodWithHttpInfo($paymentMethodId, $paymentMethod $request, $response, ); + case 400: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); } @@ -2239,6 +2245,15 @@ public function updatePaymentMethodWithHttpInfo($paymentMethodId, $paymentMethod ); $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } diff --git a/lib/Api/PaymentRefundsApi.php b/lib/Api/PaymentRefundsApi.php index 369d614..9339284 100644 --- a/lib/Api/PaymentRefundsApi.php +++ b/lib/Api/PaymentRefundsApi.php @@ -1141,7 +1141,7 @@ public function getPaymentRefundRequest($paymentRefundId, ?string $idempotencyKe * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \PAYJPV2\Model\PaymentRefundResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse + * @return \PAYJPV2\Model\PaymentRefundResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse */ public function updatePaymentRefund($paymentRefundId, $paymentRefundUpdateRequest, ?string $idempotencyKey = null) { @@ -1161,7 +1161,7 @@ public function updatePaymentRefund($paymentRefundId, $paymentRefundUpdateReques * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \PAYJPV2\Model\PaymentRefundResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \PAYJPV2\Model\PaymentRefundResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function updatePaymentRefundWithHttpInfo($paymentRefundId, $paymentRefundUpdateRequest, ?string $idempotencyKey = null) { @@ -1210,6 +1210,12 @@ public function updatePaymentRefundWithHttpInfo($paymentRefundId, $paymentRefund $request, $response, ); + case 400: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); } @@ -1260,6 +1266,15 @@ public function updatePaymentRefundWithHttpInfo($paymentRefundId, $paymentRefund ); $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } diff --git a/lib/Api/PaymentTransactionsApi.php b/lib/Api/PaymentTransactionsApi.php index a67f80f..dad196d 100644 --- a/lib/Api/PaymentTransactionsApi.php +++ b/lib/Api/PaymentTransactionsApi.php @@ -136,7 +136,7 @@ public function getConfig() * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string|null $termId term ID (optional) + * @param string|null $termId 集計区間 ID (optional) * @param string|null $type 取引タイプ (optional) * @param string|null $paymentMethodType 支払い方法タイプ (optional) * @param string|null $idempotencyKey Idempotency key for the request @@ -160,7 +160,7 @@ public function getAllPaymentTransactions($limit = 10, $startingAfter = null, $e * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string|null $termId term ID (optional) + * @param string|null $termId 集計区間 ID (optional) * @param string|null $type 取引タイプ (optional) * @param string|null $paymentMethodType 支払い方法タイプ (optional) * @param string|null $idempotencyKey Idempotency key for the request @@ -282,7 +282,7 @@ public function getAllPaymentTransactionsWithHttpInfo($limit = 10, $startingAfte * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string|null $termId term ID (optional) + * @param string|null $termId 集計区間 ID (optional) * @param string|null $type 取引タイプ (optional) * @param string|null $paymentMethodType 支払い方法タイプ (optional) * @param string|null $idempotencyKey Idempotency key for the request @@ -308,7 +308,7 @@ function ($response) { * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string|null $termId term ID (optional) + * @param string|null $termId 集計区間 ID (optional) * @param string|null $type 取引タイプ (optional) * @param string|null $paymentMethodType 支払い方法タイプ (optional) * @param string|null $idempotencyKey Idempotency key for the request @@ -364,7 +364,7 @@ function ($exception) { * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string|null $termId term ID (optional) + * @param string|null $termId 集計区間 ID (optional) * @param string|null $type 取引タイプ (optional) * @param string|null $paymentMethodType 支払い方法タイプ (optional) * @param string|null $idempotencyKey Idempotency key for the request diff --git a/lib/Api/PricesApi.php b/lib/Api/PricesApi.php index 8098b24..a95e13a 100644 --- a/lib/Api/PricesApi.php +++ b/lib/Api/PricesApi.php @@ -144,7 +144,7 @@ public function getConfig() * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \PAYJPV2\Model\PriceDetailsResponse|\PAYJPV2\Model\ErrorResponse + * @return \PAYJPV2\Model\PriceDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse */ public function createPrice($priceCreateRequest, ?string $idempotencyKey = null) { @@ -163,7 +163,7 @@ public function createPrice($priceCreateRequest, ?string $idempotencyKey = null) * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \PAYJPV2\Model\PriceDetailsResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \PAYJPV2\Model\PriceDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function createPriceWithHttpInfo($priceCreateRequest, ?string $idempotencyKey = null) { @@ -206,6 +206,12 @@ public function createPriceWithHttpInfo($priceCreateRequest, ?string $idempotenc $request, $response, ); + case 404: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); } @@ -247,6 +253,15 @@ public function createPriceWithHttpInfo($priceCreateRequest, ?string $idempotenc ); $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } @@ -443,7 +458,7 @@ public function createPriceRequest($priceCreateRequest, ?string $idempotencyKey * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string[]|null $lookupKeys 価格を動的に取得するために使用される検索キー。 (optional) + * @param string[]|null $lookupKeys 価格を動的に取得するために使用される検索キー (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format @@ -465,7 +480,7 @@ public function getAllPrices($limit = 10, $startingAfter = null, $endingBefore = * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string[]|null $lookupKeys 価格を動的に取得するために使用される検索キー。 (optional) + * @param string[]|null $lookupKeys 価格を動的に取得するために使用される検索キー (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format @@ -585,7 +600,7 @@ public function getAllPricesWithHttpInfo($limit = 10, $startingAfter = null, $en * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string[]|null $lookupKeys 価格を動的に取得するために使用される検索キー。 (optional) + * @param string[]|null $lookupKeys 価格を動的に取得するために使用される検索キー (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException @@ -609,7 +624,7 @@ function ($response) { * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string[]|null $lookupKeys 価格を動的に取得するために使用される検索キー。 (optional) + * @param string[]|null $lookupKeys 価格を動的に取得するために使用される検索キー (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException @@ -663,7 +678,7 @@ function ($exception) { * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param string[]|null $lookupKeys 価格を動的に取得するために使用される検索キー。 (optional) + * @param string[]|null $lookupKeys 価格を動的に取得するために使用される検索キー (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException @@ -1111,7 +1126,7 @@ public function getPriceRequest($priceId, ?string $idempotencyKey = null) * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \PAYJPV2\Model\PriceDetailsResponse|\PAYJPV2\Model\ErrorResponse + * @return \PAYJPV2\Model\PriceDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse */ public function updatePrice($priceId, $priceUpdateRequest, ?string $idempotencyKey = null) { @@ -1131,7 +1146,7 @@ public function updatePrice($priceId, $priceUpdateRequest, ?string $idempotencyK * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \PAYJPV2\Model\PriceDetailsResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \PAYJPV2\Model\PriceDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function updatePriceWithHttpInfo($priceId, $priceUpdateRequest, ?string $idempotencyKey = null) { @@ -1174,6 +1189,18 @@ public function updatePriceWithHttpInfo($priceId, $priceUpdateRequest, ?string $ $request, $response, ); + case 404: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); } @@ -1215,6 +1242,24 @@ public function updatePriceWithHttpInfo($priceId, $priceUpdateRequest, ?string $ ); $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } diff --git a/lib/Api/ProductsApi.php b/lib/Api/ProductsApi.php index 21587f9..09cfddf 100644 --- a/lib/Api/ProductsApi.php +++ b/lib/Api/ProductsApi.php @@ -147,7 +147,7 @@ public function getConfig() * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \PAYJPV2\Model\ProductDetailsResponse|\PAYJPV2\Model\ErrorResponse + * @return \PAYJPV2\Model\ProductDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse */ public function createProduct($productCreateRequest, ?string $idempotencyKey = null) { @@ -166,7 +166,7 @@ public function createProduct($productCreateRequest, ?string $idempotencyKey = n * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \PAYJPV2\Model\ProductDetailsResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \PAYJPV2\Model\ProductDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function createProductWithHttpInfo($productCreateRequest, ?string $idempotencyKey = null) { @@ -209,6 +209,12 @@ public function createProductWithHttpInfo($productCreateRequest, ?string $idempo $request, $response, ); + case 400: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); } @@ -250,6 +256,15 @@ public function createProductWithHttpInfo($productCreateRequest, ?string $idempo ); $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } @@ -448,7 +463,7 @@ public function createProductRequest($productCreateRequest, ?string $idempotency * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \PAYJPV2\Model\ProductDeletedResponse|\PAYJPV2\Model\ErrorResponse + * @return \PAYJPV2\Model\ProductDeletedResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse */ public function deleteProduct($productId, ?string $idempotencyKey = null) { @@ -467,7 +482,7 @@ public function deleteProduct($productId, ?string $idempotencyKey = null) * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \PAYJPV2\Model\ProductDeletedResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \PAYJPV2\Model\ProductDeletedResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function deleteProductWithHttpInfo($productId, ?string $idempotencyKey = null) { @@ -510,6 +525,18 @@ public function deleteProductWithHttpInfo($productId, ?string $idempotencyKey = $request, $response, ); + case 404: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); } @@ -551,6 +578,24 @@ public function deleteProductWithHttpInfo($productId, ?string $idempotencyKey = ); $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } @@ -1098,7 +1143,7 @@ public function getAllProductsRequest($limit = 10, $startingAfter = null, $endin * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \PAYJPV2\Model\ProductDetailsResponse|\PAYJPV2\Model\ErrorResponse + * @return \PAYJPV2\Model\ProductDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse */ public function getProduct($productId, ?string $idempotencyKey = null) { @@ -1117,7 +1162,7 @@ public function getProduct($productId, ?string $idempotencyKey = null) * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \PAYJPV2\Model\ProductDetailsResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \PAYJPV2\Model\ProductDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function getProductWithHttpInfo($productId, ?string $idempotencyKey = null) { @@ -1160,6 +1205,12 @@ public function getProductWithHttpInfo($productId, ?string $idempotencyKey = nul $request, $response, ); + case 404: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); } @@ -1201,6 +1252,15 @@ public function getProductWithHttpInfo($productId, ?string $idempotencyKey = nul ); $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } @@ -1401,7 +1461,7 @@ public function getProductRequest($productId, ?string $idempotencyKey = null) * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \PAYJPV2\Model\ProductDetailsResponse|\PAYJPV2\Model\ErrorResponse + * @return \PAYJPV2\Model\ProductDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse */ public function updateProduct($productId, $productUpdateRequest, ?string $idempotencyKey = null) { @@ -1421,7 +1481,7 @@ public function updateProduct($productId, $productUpdateRequest, ?string $idempo * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \PAYJPV2\Model\ProductDetailsResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \PAYJPV2\Model\ProductDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function updateProductWithHttpInfo($productId, $productUpdateRequest, ?string $idempotencyKey = null) { @@ -1464,6 +1524,18 @@ public function updateProductWithHttpInfo($productId, $productUpdateRequest, ?st $request, $response, ); + case 404: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); } @@ -1505,6 +1577,24 @@ public function updateProductWithHttpInfo($productId, $productUpdateRequest, ?st ); $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } diff --git a/lib/Api/StatementsApi.php b/lib/Api/StatementsApi.php index 7791bd9..48b218d 100644 --- a/lib/Api/StatementsApi.php +++ b/lib/Api/StatementsApi.php @@ -459,7 +459,7 @@ public function createStatementUrlRequest($statementId, ?string $idempotencyKey * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) * @param \PAYJPV2\Model\StatementType|null $type 明細タイプでフィルタ (optional) - * @param string|null $termId 期間IDでフィルタ (optional) + * @param string|null $termId 集計区間 ID でフィルタ (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format @@ -484,7 +484,7 @@ public function getAllStatements($since = null, $until = null, $limit = 10, $sta * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) * @param \PAYJPV2\Model\StatementType|null $type 明細タイプでフィルタ (optional) - * @param string|null $termId 期間IDでフィルタ (optional) + * @param string|null $termId 集計区間 ID でフィルタ (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format @@ -607,7 +607,7 @@ public function getAllStatementsWithHttpInfo($since = null, $until = null, $limi * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) * @param \PAYJPV2\Model\StatementType|null $type 明細タイプでフィルタ (optional) - * @param string|null $termId 期間IDでフィルタ (optional) + * @param string|null $termId 集計区間 ID でフィルタ (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException @@ -634,7 +634,7 @@ function ($response) { * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) * @param \PAYJPV2\Model\StatementType|null $type 明細タイプでフィルタ (optional) - * @param string|null $termId 期間IDでフィルタ (optional) + * @param string|null $termId 集計区間 ID でフィルタ (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException @@ -691,7 +691,7 @@ function ($exception) { * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) * @param \PAYJPV2\Model\StatementType|null $type 明細タイプでフィルタ (optional) - * @param string|null $termId 期間IDでフィルタ (optional) + * @param string|null $termId 集計区間 ID でフィルタ (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException diff --git a/lib/Api/TaxRatesApi.php b/lib/Api/TaxRatesApi.php index 24f7ca5..c5a0fba 100644 --- a/lib/Api/TaxRatesApi.php +++ b/lib/Api/TaxRatesApi.php @@ -1096,7 +1096,7 @@ public function getTaxRateRequest($taxRateId, ?string $idempotencyKey = null) * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \PAYJPV2\Model\TaxRateDetailsResponse|\PAYJPV2\Model\ErrorResponse + * @return \PAYJPV2\Model\TaxRateDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse */ public function updateTaxRate($taxRateId, $taxRateUpdateRequest, ?string $idempotencyKey = null) { @@ -1116,7 +1116,7 @@ public function updateTaxRate($taxRateId, $taxRateUpdateRequest, ?string $idempo * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \PAYJPV2\Model\TaxRateDetailsResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \PAYJPV2\Model\TaxRateDetailsResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse|\PAYJPV2\Model\ErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function updateTaxRateWithHttpInfo($taxRateId, $taxRateUpdateRequest, ?string $idempotencyKey = null) { @@ -1159,6 +1159,18 @@ public function updateTaxRateWithHttpInfo($taxRateId, $taxRateUpdateRequest, ?st $request, $response, ); + case 404: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\PAYJPV2\Model\ErrorResponse', + $request, + $response, + ); } @@ -1200,6 +1212,24 @@ public function updateTaxRateWithHttpInfo($taxRateId, $taxRateUpdateRequest, ?st ); $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\PAYJPV2\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; } diff --git a/lib/Api/TermsApi.php b/lib/Api/TermsApi.php index cefdf5a..d57ea42 100644 --- a/lib/Api/TermsApi.php +++ b/lib/Api/TermsApi.php @@ -136,8 +136,8 @@ public function getConfig() * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param \DateTime|null $sinceStartAt start_atが指定した日付以降のデータを取得 (optional) - * @param \DateTime|null $untilStartAt start_atが指定した日付以前のデータを取得 (optional) + * @param \DateTime|null $sinceStartAt start_at が指定した日付以降のデータを取得 (optional) + * @param \DateTime|null $untilStartAt start_at が指定した日付以前のデータを取得 (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format @@ -159,8 +159,8 @@ public function getAllTerms($limit = 10, $startingAfter = null, $endingBefore = * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param \DateTime|null $sinceStartAt start_atが指定した日付以降のデータを取得 (optional) - * @param \DateTime|null $untilStartAt start_atが指定した日付以前のデータを取得 (optional) + * @param \DateTime|null $sinceStartAt start_at が指定した日付以降のデータを取得 (optional) + * @param \DateTime|null $untilStartAt start_at が指定した日付以前のデータを取得 (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \PAYJPV2\ApiException on non-2xx response or if the response body is not in the expected format @@ -280,8 +280,8 @@ public function getAllTermsWithHttpInfo($limit = 10, $startingAfter = null, $end * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param \DateTime|null $sinceStartAt start_atが指定した日付以降のデータを取得 (optional) - * @param \DateTime|null $untilStartAt start_atが指定した日付以前のデータを取得 (optional) + * @param \DateTime|null $sinceStartAt start_at が指定した日付以降のデータを取得 (optional) + * @param \DateTime|null $untilStartAt start_at が指定した日付以前のデータを取得 (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException @@ -305,8 +305,8 @@ function ($response) { * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param \DateTime|null $sinceStartAt start_atが指定した日付以降のデータを取得 (optional) - * @param \DateTime|null $untilStartAt start_atが指定した日付以前のデータを取得 (optional) + * @param \DateTime|null $sinceStartAt start_at が指定した日付以降のデータを取得 (optional) + * @param \DateTime|null $untilStartAt start_at が指定した日付以前のデータを取得 (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException @@ -360,8 +360,8 @@ function ($exception) { * @param int|null $limit 取得するデータの最大件数 (optional, default to 10) * @param string|null $startingAfter このIDより後のデータを取得 (optional) * @param string|null $endingBefore このIDより前のデータを取得 (optional) - * @param \DateTime|null $sinceStartAt start_atが指定した日付以降のデータを取得 (optional) - * @param \DateTime|null $untilStartAt start_atが指定した日付以前のデータを取得 (optional) + * @param \DateTime|null $sinceStartAt start_at が指定した日付以降のデータを取得 (optional) + * @param \DateTime|null $untilStartAt start_at が指定した日付以前のデータを取得 (optional) * @param string|null $idempotencyKey Idempotency key for the request * * @throws \InvalidArgumentException diff --git a/lib/Model/BalanceResponse.php b/lib/Model/BalanceResponse.php index e0f81bd..20bd088 100644 --- a/lib/Model/BalanceResponse.php +++ b/lib/Model/BalanceResponse.php @@ -61,8 +61,6 @@ class BalanceResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'object' => 'string', 'id' => 'string', 'livemode' => 'bool', - 'createdAt' => '\DateTime', - 'updatedAt' => '\DateTime', 'state' => '\PAYJPV2\Model\BalanceState', 'statements' => '\PAYJPV2\Model\StatementResponse[]', 'closed' => 'bool', @@ -70,6 +68,8 @@ class BalanceResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'dueDate' => '\DateTime', 'net' => 'int', 'bankInfo' => '\PAYJPV2\Model\BankInfoResponse', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime', ]; /** @@ -83,8 +83,6 @@ class BalanceResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'object' => null, 'id' => null, 'livemode' => null, - 'createdAt' => 'date-time', - 'updatedAt' => 'date-time', 'state' => null, 'statements' => null, 'closed' => null, @@ -92,6 +90,8 @@ class BalanceResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'dueDate' => 'date-time', 'net' => null, 'bankInfo' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time', ]; /** @@ -103,8 +103,6 @@ class BalanceResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'object' => false, 'id' => false, 'livemode' => false, - 'createdAt' => false, - 'updatedAt' => false, 'state' => false, 'statements' => false, 'closed' => false, @@ -112,6 +110,8 @@ class BalanceResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'dueDate' => true, 'net' => false, 'bankInfo' => true, + 'createdAt' => false, + 'updatedAt' => false, ]; /** @@ -203,8 +203,6 @@ public function isNullableSetToNull(string $property): bool 'object' => 'object', 'id' => 'id', 'livemode' => 'livemode', - 'createdAt' => 'created_at', - 'updatedAt' => 'updated_at', 'state' => 'state', 'statements' => 'statements', 'closed' => 'closed', @@ -212,6 +210,8 @@ public function isNullableSetToNull(string $property): bool 'dueDate' => 'due_date', 'net' => 'net', 'bankInfo' => 'bank_info', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', ]; /** @@ -223,8 +223,6 @@ public function isNullableSetToNull(string $property): bool 'object' => 'setObject', 'id' => 'setId', 'livemode' => 'setLivemode', - 'createdAt' => 'setCreatedAt', - 'updatedAt' => 'setUpdatedAt', 'state' => 'setState', 'statements' => 'setStatements', 'closed' => 'setClosed', @@ -232,6 +230,8 @@ public function isNullableSetToNull(string $property): bool 'dueDate' => 'setDueDate', 'net' => 'setNet', 'bankInfo' => 'setBankInfo', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', ]; /** @@ -243,8 +243,6 @@ public function isNullableSetToNull(string $property): bool 'object' => 'getObject', 'id' => 'getId', 'livemode' => 'getLivemode', - 'createdAt' => 'getCreatedAt', - 'updatedAt' => 'getUpdatedAt', 'state' => 'getState', 'statements' => 'getStatements', 'closed' => 'getClosed', @@ -252,6 +250,8 @@ public function isNullableSetToNull(string $property): bool 'dueDate' => 'getDueDate', 'net' => 'getNet', 'bankInfo' => 'getBankInfo', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', ]; /** @@ -327,8 +327,6 @@ public function __construct(?array $data = null) $this->setIfExists('object', $data ?? [], 'balance'); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('livemode', $data ?? [], null); - $this->setIfExists('createdAt', $data ?? [], null); - $this->setIfExists('updatedAt', $data ?? [], null); $this->setIfExists('state', $data ?? [], null); $this->setIfExists('statements', $data ?? [], null); $this->setIfExists('closed', $data ?? [], null); @@ -336,6 +334,8 @@ public function __construct(?array $data = null) $this->setIfExists('dueDate', $data ?? [], null); $this->setIfExists('net', $data ?? [], null); $this->setIfExists('bankInfo', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('updatedAt', $data ?? [], null); } /** @@ -380,12 +380,6 @@ public function listInvalidProperties() if ($this->container['livemode'] === null) { $invalidProperties[] = "'livemode' can't be null"; } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['updatedAt'] === null) { - $invalidProperties[] = "'updatedAt' can't be null"; - } if ($this->container['state'] === null) { $invalidProperties[] = "'state' can't be null"; } @@ -407,6 +401,12 @@ public function listInvalidProperties() if ($this->container['bankInfo'] === null) { $invalidProperties[] = "'bankInfo' can't be null"; } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } return $invalidProperties; } @@ -477,7 +477,7 @@ public function getId(): string /** * Sets id * - * @param string $id 残高ID + * @param string $id 残高 ID * * @return self */ @@ -522,68 +522,6 @@ public function setLivemode(bool $livemode): self return $this; } - /** - * Gets createdAt - * - * @return \DateTime - */ - public function getCreatedAt(): \DateTime - { - if ($this->container['createdAt'] === null) { - throw new \LogicException('Property "createdAt" is required but has not been set.'); - } - - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) - * - * @return self - */ - public function setCreatedAt(\DateTime $createdAt): self - { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets updatedAt - * - * @return \DateTime - */ - public function getUpdatedAt(): \DateTime - { - if ($this->container['updatedAt'] === null) { - throw new \LogicException('Property "updatedAt" is required but has not been set.'); - } - - return $this->container['updatedAt']; - } - - /** - * Sets updatedAt - * - * @param \DateTime $updatedAt 更新時の日時 (UTC, ISO 8601 形式) - * - * @return self - */ - public function setUpdatedAt(\DateTime $updatedAt): self - { - if (is_null($updatedAt)) { - throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); - } - $this->container['updatedAt'] = $updatedAt; - - return $this; - } - /** * Gets state * @@ -601,7 +539,7 @@ public function getState(): \PAYJPV2\Model\BalanceState /** * Sets state * - * @param \PAYJPV2\Model\BalanceState $state Balanceの状態 | 指定できる値 | |:---| | **collecting**: 集計中 | | **transfer**: 入金 | | **claim**: 請求 | + * @param \PAYJPV2\Model\BalanceState $state Balance の状態 | 値 | |:---| | **collecting**: 集計中 | | **transfer**: 入金 | | **claim**: 請求 | * * @return self */ @@ -632,7 +570,7 @@ public function getStatements(): array /** * Sets statements * - * @param \PAYJPV2\Model\StatementResponse[] $statements 関連付けられているStatementオブジェクトのリスト + * @param \PAYJPV2\Model\StatementResponse[] $statements 関連付けられている Statement オブジェクトのリスト * * @return self */ @@ -663,7 +601,7 @@ public function getClosed(): bool /** * Sets closed * - * @param bool $closed このBalanceの清算が終了していればtrue state=transferであれば加盟店口座への入金作業完了、state=claimであればPAY.JPで請求額の振込が確認できたことを表します。 + * @param bool $closed この Balance の清算が終了していれば true state=transfer であれば加盟店口座への入金作業完了、state=claim であれば PAY.JP で請求額の振込が確認できたことを表します。 * * @return self */ @@ -762,7 +700,7 @@ public function getNet(): int /** * Sets net * - * @param int $net 関連付けられているStatementの総額 + * @param int $net 関連付けられている Statement の総額 * * @return self */ @@ -809,6 +747,68 @@ public function setBankInfo(?\PAYJPV2\Model\BankInfoResponse $bankInfo): self return $this; } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt(): \DateTime + { + if ($this->container['createdAt'] === null) { + throw new \LogicException('Property "createdAt" is required but has not been set.'); + } + + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setCreatedAt(\DateTime $createdAt): self + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return \DateTime + */ + public function getUpdatedAt(): \DateTime + { + if ($this->container['updatedAt'] === null) { + throw new \LogicException('Property "updatedAt" is required but has not been set.'); + } + + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime $updatedAt 更新時の日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setUpdatedAt(\DateTime $updatedAt): self + { + if (is_null($updatedAt)) { + throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + } + $this->container['updatedAt'] = $updatedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/BalanceURLResponse.php b/lib/Model/BalanceURLResponse.php index feff007..bfe1a99 100644 --- a/lib/Model/BalanceURLResponse.php +++ b/lib/Model/BalanceURLResponse.php @@ -387,7 +387,7 @@ public function getUrl(): string /** * Sets url * - * @param string $url 残高明細書ダウンロードURL + * @param string $url 残高明細書ダウンロード URL * * @return self */ @@ -418,7 +418,7 @@ public function getExpires(): \DateTime /** * Sets expires * - * @param \DateTime $expires 有効期限の日付。 有効期限は発行から1時間です。 + * @param \DateTime $expires 有効期限の日付 有効期限は発行から1時間です。 * * @return self */ diff --git a/lib/Model/BankInfoResponse.php b/lib/Model/BankInfoResponse.php index 63b6857..6aab023 100644 --- a/lib/Model/BankInfoResponse.php +++ b/lib/Model/BankInfoResponse.php @@ -516,7 +516,7 @@ public function getBankAccountStatus(): string /** * Sets bankAccountStatus * - * @param string $bankAccountStatus 最新振込結果 | 指定できる値 | |:---| | **success**: 成功 | | **failed**: 失敗 | | **pending**: 初回振込み前 | + * @param string $bankAccountStatus 最新振込結果 | 値 | |:---| | **success**: 成功 | | **failed**: 失敗 | | **pending**: 初回振込み前 | * * @return self */ diff --git a/lib/Model/CheckoutSessionCreateRequest.php b/lib/Model/CheckoutSessionCreateRequest.php index 6484b2d..6de673d 100644 --- a/lib/Model/CheckoutSessionCreateRequest.php +++ b/lib/Model/CheckoutSessionCreateRequest.php @@ -58,23 +58,23 @@ class CheckoutSessionCreateRequest implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ + 'mode' => '\PAYJPV2\Model\CheckoutSessionMode', 'clientReferenceId' => 'string', 'customerId' => 'string', 'customerEmail' => 'string', 'customerCreation' => '\PAYJPV2\Model\CustomerCreation', 'lineItems' => '\PAYJPV2\Model\LineItemRequest[]', - 'mode' => '\PAYJPV2\Model\CheckoutSessionMode', 'metadata' => 'array', 'successUrl' => 'string', 'cancelUrl' => 'string', 'currency' => '\PAYJPV2\Model\Currency', 'expiresAt' => '\DateTime', 'locale' => '\PAYJPV2\Model\Locale', - 'paymentFlowData' => '\PAYJPV2\Model\PaymentFlowDataRequest', - 'paymentMethodOptions' => '\PAYJPV2\Model\CheckoutSessionPaymentMethodOptionsRequest', 'paymentMethodTypes' => '\PAYJPV2\Model\PaymentMethodTypes[]', - 'setupFlowData' => '\PAYJPV2\Model\SetupFlowDataRequest', + 'paymentMethodOptions' => '\PAYJPV2\Model\CheckoutSessionPaymentMethodOptionsRequest', + 'paymentFlowData' => '\PAYJPV2\Model\PaymentFlowDataRequest', 'submitType' => '\PAYJPV2\Model\CheckoutSessionSubmitType', + 'setupFlowData' => '\PAYJPV2\Model\SetupFlowDataRequest', 'uiMode' => '\PAYJPV2\Model\CheckoutSessionUIMode', ]; @@ -86,23 +86,23 @@ class CheckoutSessionCreateRequest implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ + 'mode' => null, 'clientReferenceId' => null, 'customerId' => null, 'customerEmail' => 'email', 'customerCreation' => null, 'lineItems' => null, - 'mode' => null, 'metadata' => null, 'successUrl' => null, 'cancelUrl' => null, 'currency' => null, 'expiresAt' => 'date-time', 'locale' => null, - 'paymentFlowData' => null, - 'paymentMethodOptions' => null, 'paymentMethodTypes' => null, - 'setupFlowData' => null, + 'paymentMethodOptions' => null, + 'paymentFlowData' => null, 'submitType' => null, + 'setupFlowData' => null, 'uiMode' => null, ]; @@ -112,23 +112,23 @@ class CheckoutSessionCreateRequest implements ModelInterface, ArrayAccess, \Json * @var bool[] */ protected static array $openAPINullables = [ + 'mode' => false, 'clientReferenceId' => false, 'customerId' => false, 'customerEmail' => false, 'customerCreation' => false, 'lineItems' => false, - 'mode' => false, 'metadata' => false, 'successUrl' => false, 'cancelUrl' => false, 'currency' => false, 'expiresAt' => false, 'locale' => false, - 'paymentFlowData' => false, - 'paymentMethodOptions' => false, 'paymentMethodTypes' => false, - 'setupFlowData' => false, + 'paymentMethodOptions' => false, + 'paymentFlowData' => false, 'submitType' => false, + 'setupFlowData' => false, 'uiMode' => false, ]; @@ -218,23 +218,23 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'mode' => 'mode', 'clientReferenceId' => 'client_reference_id', 'customerId' => 'customer_id', 'customerEmail' => 'customer_email', 'customerCreation' => 'customer_creation', 'lineItems' => 'line_items', - 'mode' => 'mode', 'metadata' => 'metadata', 'successUrl' => 'success_url', 'cancelUrl' => 'cancel_url', 'currency' => 'currency', 'expiresAt' => 'expires_at', 'locale' => 'locale', - 'paymentFlowData' => 'payment_flow_data', - 'paymentMethodOptions' => 'payment_method_options', 'paymentMethodTypes' => 'payment_method_types', - 'setupFlowData' => 'setup_flow_data', + 'paymentMethodOptions' => 'payment_method_options', + 'paymentFlowData' => 'payment_flow_data', 'submitType' => 'submit_type', + 'setupFlowData' => 'setup_flow_data', 'uiMode' => 'ui_mode', ]; @@ -244,23 +244,23 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'mode' => 'setMode', 'clientReferenceId' => 'setClientReferenceId', 'customerId' => 'setCustomerId', 'customerEmail' => 'setCustomerEmail', 'customerCreation' => 'setCustomerCreation', 'lineItems' => 'setLineItems', - 'mode' => 'setMode', 'metadata' => 'setMetadata', 'successUrl' => 'setSuccessUrl', 'cancelUrl' => 'setCancelUrl', 'currency' => 'setCurrency', 'expiresAt' => 'setExpiresAt', 'locale' => 'setLocale', - 'paymentFlowData' => 'setPaymentFlowData', - 'paymentMethodOptions' => 'setPaymentMethodOptions', 'paymentMethodTypes' => 'setPaymentMethodTypes', - 'setupFlowData' => 'setSetupFlowData', + 'paymentMethodOptions' => 'setPaymentMethodOptions', + 'paymentFlowData' => 'setPaymentFlowData', 'submitType' => 'setSubmitType', + 'setupFlowData' => 'setSetupFlowData', 'uiMode' => 'setUiMode', ]; @@ -270,23 +270,23 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'mode' => 'getMode', 'clientReferenceId' => 'getClientReferenceId', 'customerId' => 'getCustomerId', 'customerEmail' => 'getCustomerEmail', 'customerCreation' => 'getCustomerCreation', 'lineItems' => 'getLineItems', - 'mode' => 'getMode', 'metadata' => 'getMetadata', 'successUrl' => 'getSuccessUrl', 'cancelUrl' => 'getCancelUrl', 'currency' => 'getCurrency', 'expiresAt' => 'getExpiresAt', 'locale' => 'getLocale', - 'paymentFlowData' => 'getPaymentFlowData', - 'paymentMethodOptions' => 'getPaymentMethodOptions', 'paymentMethodTypes' => 'getPaymentMethodTypes', - 'setupFlowData' => 'getSetupFlowData', + 'paymentMethodOptions' => 'getPaymentMethodOptions', + 'paymentFlowData' => 'getPaymentFlowData', 'submitType' => 'getSubmitType', + 'setupFlowData' => 'getSetupFlowData', 'uiMode' => 'getUiMode', ]; @@ -347,23 +347,23 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('mode', $data ?? [], null); $this->setIfExists('clientReferenceId', $data ?? [], null); $this->setIfExists('customerId', $data ?? [], null); $this->setIfExists('customerEmail', $data ?? [], null); $this->setIfExists('customerCreation', $data ?? [], null); $this->setIfExists('lineItems', $data ?? [], null); - $this->setIfExists('mode', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('successUrl', $data ?? [], null); $this->setIfExists('cancelUrl', $data ?? [], null); $this->setIfExists('currency', $data ?? [], null); $this->setIfExists('expiresAt', $data ?? [], null); $this->setIfExists('locale', $data ?? [], null); - $this->setIfExists('paymentFlowData', $data ?? [], null); - $this->setIfExists('paymentMethodOptions', $data ?? [], null); $this->setIfExists('paymentMethodTypes', $data ?? [], null); - $this->setIfExists('setupFlowData', $data ?? [], null); + $this->setIfExists('paymentMethodOptions', $data ?? [], null); + $this->setIfExists('paymentFlowData', $data ?? [], null); $this->setIfExists('submitType', $data ?? [], null); + $this->setIfExists('setupFlowData', $data ?? [], null); $this->setIfExists('uiMode', $data ?? [], null); } @@ -394,13 +394,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if (! is_null($this->container['lineItems']) && (count($this->container['lineItems']) > 100)) { - $invalidProperties[] = "invalid value for 'lineItems', number of items must be less than or equal to 100."; - } - if ($this->container['mode'] === null) { $invalidProperties[] = "'mode' can't be null"; } + if (! is_null($this->container['lineItems']) && (count($this->container['lineItems']) > 100)) { + $invalidProperties[] = "invalid value for 'lineItems', number of items must be less than or equal to 100."; + } return $invalidProperties; } @@ -417,6 +416,37 @@ public function valid() } + /** + * Gets mode + * + * @return \PAYJPV2\Model\CheckoutSessionMode + */ + public function getMode(): \PAYJPV2\Model\CheckoutSessionMode + { + if ($this->container['mode'] === null) { + throw new \LogicException('Property "mode" is required but has not been set.'); + } + + return $this->container['mode']; + } + + /** + * Sets mode + * + * @param \PAYJPV2\Model\CheckoutSessionMode $mode Checkout Session のモード | 指定できる値 | |:---| | **payment**: 支払いモードで Checkout Session を作成します。 | | **setup**: セットアップモードで Checkout Session を作成します。 | + * + * @return self + */ + public function setMode(\PAYJPV2\Model\CheckoutSessionMode $mode): self + { + if (is_null($mode)) { + throw new \InvalidArgumentException('non-nullable mode cannot be null'); + } + $this->container['mode'] = $mode; + + return $this; + } + /** * Gets clientReferenceId * @@ -457,7 +487,7 @@ public function getCustomerId(): ?string /** * Sets customerId * - * @param string|null $customerId 顧客ID + * @param string|null $customerId 顧客 ID * * @return self */ @@ -484,7 +514,7 @@ public function getCustomerEmail(): ?string /** * Sets customerEmail * - * @param string|null $customerEmail 顧客オブジェクトを作成する時に使われます。指定されていない場合、顧客にメールアドレスの入力を求めます。すでに顧客のメールアドレスを持っている場合は、このパラメータを使ってあらかじめ情報を入力しておくことが可能です。支払いが完了した後に顧客情報を取得したい場合は、customer属性を使用します。 + * @param string|null $customerEmail 顧客オブジェクトを作成する時に使われます。指定されていない場合、顧客にメールアドレスの入力を求めます。すでに顧客のメールアドレスを持っている場合は、このパラメータを使ってあらかじめ情報を入力しておくことが可能です。 * * @return self */ @@ -511,7 +541,7 @@ public function getCustomerCreation(): ?\PAYJPV2\Model\CustomerCreation /** * Sets customerCreation * - * @param \PAYJPV2\Model\CustomerCreation|null $customerCreation Checkout Session の確定時に Customer を作成するかどうかを指定します。
Customer が作成されない場合でも `customer_details` で Checkout に入力されたメールアドレス、住所、その他の顧客データを取得できます。
Customer を作成しない Session は、ダッシュボードでゲスト顧客としてグループ化されます。
`payment` および `setup` モードでのみ設定可能です。 + * @param \PAYJPV2\Model\CustomerCreation|null $customerCreation Checkout Session の確定時に Customer を作成するかどうかを指定します。
`payment` および `setup` モードでのみ設定可能です。 * * @return self */ @@ -538,7 +568,7 @@ public function getLineItems(): ?array /** * Sets lineItems * - * @param \PAYJPV2\Model\LineItemRequest[]|null $lineItems 顧客が購入する商品のリストです。このパラメーターを使用して、1回限りまたは定期的な料金を渡します。 `payment` モードの場合、最大100個のラインアイテムを使用できます。 + * @param \PAYJPV2\Model\LineItemRequest[]|null $lineItems 顧客が購入する商品のリストです。このパラメーターを使用して、1回限りまたは定期的な料金を渡します。 `payment` モードの場合、最大100個のラインアイテムを使用できます。 * * @return self */ @@ -556,37 +586,6 @@ public function setLineItems(?array $lineItems): self return $this; } - /** - * Gets mode - * - * @return \PAYJPV2\Model\CheckoutSessionMode - */ - public function getMode(): \PAYJPV2\Model\CheckoutSessionMode - { - if ($this->container['mode'] === null) { - throw new \LogicException('Property "mode" is required but has not been set.'); - } - - return $this->container['mode']; - } - - /** - * Sets mode - * - * @param \PAYJPV2\Model\CheckoutSessionMode $mode Checkout Session のモード | 指定できる値 | |:---| | **payment**: 支払いモードでCheckout Sessionを作成します。 | | **setup**: セットアップモードでCheckout Sessionを作成します。 | - * - * @return self - */ - public function setMode(\PAYJPV2\Model\CheckoutSessionMode $mode): self - { - if (is_null($mode)) { - throw new \InvalidArgumentException('non-nullable mode cannot be null'); - } - $this->container['mode'] = $mode; - - return $this; - } - /** * Gets metadata * @@ -600,7 +599,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ @@ -627,7 +626,7 @@ public function getSuccessUrl(): ?string /** * Sets successUrl * - * @param string|null $successUrl 支払いや設定が完了した際に、PAY.JP が顧客をリダイレクトするURL。成功したCheckout Sessionからの情報をページで使用したい場合は、成功ページのカスタマイズに関するガイドをお読みください。 + * @param string|null $successUrl 支払いや設定が完了した際に、PAY.JP が顧客をリダイレクトする URL。成功した Checkout Session からの情報をページで使用したい場合は、成功ページのカスタマイズに関するガイドをお読みください。 * * @return self */ @@ -654,7 +653,7 @@ public function getCancelUrl(): ?string /** * Sets cancelUrl * - * @param string|null $cancelUrl キャンセル時のリダイレクトURL + * @param string|null $cancelUrl キャンセル時のリダイレクト URL * * @return self */ @@ -708,7 +707,7 @@ public function getExpiresAt(): ?\DateTime /** * Sets expiresAt * - * @param \DateTime|null $expiresAt Checkout Session の有効期限が失効する日時。 + * @param \DateTime|null $expiresAt Checkout Session の有効期限が失効する日時 * * @return self */ @@ -750,28 +749,28 @@ public function setLocale(?\PAYJPV2\Model\Locale $locale): self } /** - * Gets paymentFlowData + * Gets paymentMethodTypes * - * @return \PAYJPV2\Model\PaymentFlowDataRequest|null + * @return \PAYJPV2\Model\PaymentMethodTypes[]|null */ - public function getPaymentFlowData(): ?\PAYJPV2\Model\PaymentFlowDataRequest + public function getPaymentMethodTypes(): ?array { - return $this->container['paymentFlowData']; + return $this->container['paymentMethodTypes']; } /** - * Sets paymentFlowData + * Sets paymentMethodTypes * - * @param \PAYJPV2\Model\PaymentFlowDataRequest|null $paymentFlowData `payment` モード指定時に PaymentFlow 作成に使用するパラメーター。 + * @param \PAYJPV2\Model\PaymentMethodTypes[]|null $paymentMethodTypes この PaymentFlow で使用できる支払い方法の種類(カードなど)のリストです。指定しない場合、管理画面で利用可能な状態にしている支払い方法を自動的に表示します。 * * @return self */ - public function setPaymentFlowData(?\PAYJPV2\Model\PaymentFlowDataRequest $paymentFlowData): self + public function setPaymentMethodTypes(?array $paymentMethodTypes): self { - if (is_null($paymentFlowData)) { - throw new \InvalidArgumentException('non-nullable paymentFlowData cannot be null'); + if (is_null($paymentMethodTypes)) { + throw new \InvalidArgumentException('non-nullable paymentMethodTypes cannot be null'); } - $this->container['paymentFlowData'] = $paymentFlowData; + $this->container['paymentMethodTypes'] = $paymentMethodTypes; return $this; } @@ -789,7 +788,7 @@ public function getPaymentMethodOptions(): ?\PAYJPV2\Model\CheckoutSessionPaymen /** * Sets paymentMethodOptions * - * @param \PAYJPV2\Model\CheckoutSessionPaymentMethodOptionsRequest|null $paymentMethodOptions この PaymentFlow の支払い方法の個別設定。 + * @param \PAYJPV2\Model\CheckoutSessionPaymentMethodOptionsRequest|null $paymentMethodOptions この PaymentFlow の支払い方法の個別設定 * * @return self */ @@ -804,82 +803,82 @@ public function setPaymentMethodOptions(?\PAYJPV2\Model\CheckoutSessionPaymentMe } /** - * Gets paymentMethodTypes + * Gets paymentFlowData * - * @return \PAYJPV2\Model\PaymentMethodTypes[]|null + * @return \PAYJPV2\Model\PaymentFlowDataRequest|null */ - public function getPaymentMethodTypes(): ?array + public function getPaymentFlowData(): ?\PAYJPV2\Model\PaymentFlowDataRequest { - return $this->container['paymentMethodTypes']; + return $this->container['paymentFlowData']; } /** - * Sets paymentMethodTypes + * Sets paymentFlowData * - * @param \PAYJPV2\Model\PaymentMethodTypes[]|null $paymentMethodTypes この PaymentFlow で使用できる支払い方法の種類(カードなど)のリストです。 指定しない場合、ダッシュボードで利用可能な状態にしている支払い方法を自動的に表示します。 + * @param \PAYJPV2\Model\PaymentFlowDataRequest|null $paymentFlowData `payment` モード指定時に PaymentFlow 作成に使用するパラメーター * * @return self */ - public function setPaymentMethodTypes(?array $paymentMethodTypes): self + public function setPaymentFlowData(?\PAYJPV2\Model\PaymentFlowDataRequest $paymentFlowData): self { - if (is_null($paymentMethodTypes)) { - throw new \InvalidArgumentException('non-nullable paymentMethodTypes cannot be null'); + if (is_null($paymentFlowData)) { + throw new \InvalidArgumentException('non-nullable paymentFlowData cannot be null'); } - $this->container['paymentMethodTypes'] = $paymentMethodTypes; + $this->container['paymentFlowData'] = $paymentFlowData; return $this; } /** - * Gets setupFlowData + * Gets submitType * - * @return \PAYJPV2\Model\SetupFlowDataRequest|null + * @return \PAYJPV2\Model\CheckoutSessionSubmitType|null */ - public function getSetupFlowData(): ?\PAYJPV2\Model\SetupFlowDataRequest + public function getSubmitType(): ?\PAYJPV2\Model\CheckoutSessionSubmitType { - return $this->container['setupFlowData']; + return $this->container['submitType']; } /** - * Sets setupFlowData + * Sets submitType * - * @param \PAYJPV2\Model\SetupFlowDataRequest|null $setupFlowData `setup` モードの Checkout Session を作成する際、SetupFlow の作成に渡されるパラメーター + * @param \PAYJPV2\Model\CheckoutSessionSubmitType|null $submitType Checkout の画面上に表示される送信ボタンなど、ページ上の関連テキストをカスタマイズするために使用されます。
`submit_type` は、`payment` モードの Checkout Session でのみ指定できます。未指定時、あるいは `auto` の場合、`pay` が使用されます。 | 指定できる値 | |:---| | **auto**: `pay` が使用されます。 | | **pay**: 「支払う」(デフォルト) | | **book**: 「予約する」 | | **donate**: 「寄付する」 | * * @return self */ - public function setSetupFlowData(?\PAYJPV2\Model\SetupFlowDataRequest $setupFlowData): self + public function setSubmitType(?\PAYJPV2\Model\CheckoutSessionSubmitType $submitType): self { - if (is_null($setupFlowData)) { - throw new \InvalidArgumentException('non-nullable setupFlowData cannot be null'); + if (is_null($submitType)) { + throw new \InvalidArgumentException('non-nullable submitType cannot be null'); } - $this->container['setupFlowData'] = $setupFlowData; + $this->container['submitType'] = $submitType; return $this; } /** - * Gets submitType + * Gets setupFlowData * - * @return \PAYJPV2\Model\CheckoutSessionSubmitType|null + * @return \PAYJPV2\Model\SetupFlowDataRequest|null */ - public function getSubmitType(): ?\PAYJPV2\Model\CheckoutSessionSubmitType + public function getSetupFlowData(): ?\PAYJPV2\Model\SetupFlowDataRequest { - return $this->container['submitType']; + return $this->container['setupFlowData']; } /** - * Sets submitType + * Sets setupFlowData * - * @param \PAYJPV2\Model\CheckoutSessionSubmitType|null $submitType Checkout の画面上に表示される送信ボタンなど、ページ上の関連テキストをカスタマイズするために使用されます。
`submit_type` は、`payment` モードの Checkout Session でのみ指定できます。未指定時、あるいは `auto` の場合、`pay` が使用されます。 | 指定できる値 | |:---| | **auto**: `pay` が使用されます。 | | **pay**: 「支払う」(デフォルト) | | **book**: 「予約する」 | | **donate**: 「寄付する」 | + * @param \PAYJPV2\Model\SetupFlowDataRequest|null $setupFlowData `setup` モードの Checkout Session を作成する際、SetupFlow の作成に渡されるパラメーター * * @return self */ - public function setSubmitType(?\PAYJPV2\Model\CheckoutSessionSubmitType $submitType): self + public function setSetupFlowData(?\PAYJPV2\Model\SetupFlowDataRequest $setupFlowData): self { - if (is_null($submitType)) { - throw new \InvalidArgumentException('non-nullable submitType cannot be null'); + if (is_null($setupFlowData)) { + throw new \InvalidArgumentException('non-nullable setupFlowData cannot be null'); } - $this->container['submitType'] = $submitType; + $this->container['setupFlowData'] = $setupFlowData; return $this; } @@ -897,7 +896,7 @@ public function getUiMode(): ?\PAYJPV2\Model\CheckoutSessionUIMode /** * Sets uiMode * - * @param \PAYJPV2\Model\CheckoutSessionUIMode|null $uiMode Checkout Session の UI モード。デフォルトは `hosted` です。
| 指定できる値 | |:---| | **hosted**: PAY.JPでホスティングしている画面を使用します。 | + * @param \PAYJPV2\Model\CheckoutSessionUIMode|null $uiMode Checkout Session の UI モード。デフォルトは `hosted` です。 | 指定できる値 | |:---| | **hosted**: PAY.JP でホスティングしている画面を使用します。 | * * @return self */ diff --git a/lib/Model/CheckoutSessionCustomerDetailsAddressResponse.php b/lib/Model/CheckoutSessionCustomerDetailsAddressResponse.php new file mode 100644 index 0000000..f6fb261 --- /dev/null +++ b/lib/Model/CheckoutSessionCustomerDetailsAddressResponse.php @@ -0,0 +1,640 @@ + + */ +class CheckoutSessionCustomerDetailsAddressResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CheckoutSessionCustomerDetailsAddressResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'country' => 'string', + 'zip' => 'string', + 'state' => 'string', + 'city' => 'string', + 'line1' => 'string', + 'line2' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'country' => null, + 'zip' => null, + 'state' => null, + 'city' => null, + 'line1' => null, + 'line2' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'country' => true, + 'zip' => true, + 'state' => true, + 'city' => true, + 'line1' => true, + 'line2' => true, + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ + 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 bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $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 = [ + 'country' => 'country', + 'zip' => 'zip', + 'state' => 'state', + 'city' => 'city', + 'line1' => 'line1', + 'line2' => 'line2', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'country' => 'setCountry', + 'zip' => 'setZip', + 'state' => 'setState', + 'city' => 'setCity', + 'line1' => 'setLine1', + 'line2' => 'setLine2', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'country' => 'getCountry', + 'zip' => 'getZip', + 'state' => 'getState', + 'city' => 'getCity', + 'line1' => 'getLine1', + 'line2' => 'getLine2', + ]; + + /** + * 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[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('country', $data ?? [], null); + $this->setIfExists('zip', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('line1', $data ?? [], null); + $this->setIfExists('line2', $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['country'] === null) { + $invalidProperties[] = "'country' can't be null"; + } + if ($this->container['zip'] === null) { + $invalidProperties[] = "'zip' can't be null"; + } + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ($this->container['line1'] === null) { + $invalidProperties[] = "'line1' can't be null"; + } + if ($this->container['line2'] === null) { + $invalidProperties[] = "'line2' 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 country + * + * @return string|null + */ + public function getCountry(): ?string + { + return $this->container['country']; + } + + /** + * Sets country + * + * @param string|null $country country + * + * @return self + */ + public function setCountry(?string $country): self + { + if (is_null($country)) { + array_push($this->openAPINullablesSetToNull, 'country'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('country', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['country'] = $country; + + return $this; + } + + /** + * Gets zip + * + * @return string|null + */ + public function getZip(): ?string + { + return $this->container['zip']; + } + + /** + * Sets zip + * + * @param string|null $zip zip + * + * @return self + */ + public function setZip(?string $zip): self + { + if (is_null($zip)) { + array_push($this->openAPINullablesSetToNull, 'zip'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('zip', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['zip'] = $zip; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState(): ?string + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state state + * + * @return self + */ + public function setState(?string $state): self + { + if (is_null($state)) { + array_push($this->openAPINullablesSetToNull, 'state'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('state', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets city + * + * @return string|null + */ + public function getCity(): ?string + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string|null $city city + * + * @return self + */ + public function setCity(?string $city): self + { + if (is_null($city)) { + array_push($this->openAPINullablesSetToNull, 'city'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('city', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets line1 + * + * @return string|null + */ + public function getLine1(): ?string + { + return $this->container['line1']; + } + + /** + * Sets line1 + * + * @param string|null $line1 line1 + * + * @return self + */ + public function setLine1(?string $line1): self + { + if (is_null($line1)) { + array_push($this->openAPINullablesSetToNull, 'line1'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('line1', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['line1'] = $line1; + + return $this; + } + + /** + * Gets line2 + * + * @return string|null + */ + public function getLine2(): ?string + { + return $this->container['line2']; + } + + /** + * Sets line2 + * + * @param string|null $line2 line2 + * + * @return self + */ + public function setLine2(?string $line2): self + { + if (is_null($line2)) { + array_push($this->openAPINullablesSetToNull, 'line2'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('line2', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['line2'] = $line2; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $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 int $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/Model/CheckoutSessionCustomerDetailsResponse.php b/lib/Model/CheckoutSessionCustomerDetailsResponse.php new file mode 100644 index 0000000..2d248d6 --- /dev/null +++ b/lib/Model/CheckoutSessionCustomerDetailsResponse.php @@ -0,0 +1,552 @@ + + */ +class CheckoutSessionCustomerDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CheckoutSessionCustomerDetailsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'name' => 'string', + 'email' => 'string', + 'phone' => 'string', + 'address' => '\PAYJPV2\Model\CheckoutSessionCustomerDetailsAddressResponse', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'name' => null, + 'email' => null, + 'phone' => null, + 'address' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'name' => true, + 'email' => true, + 'phone' => true, + 'address' => true, + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ + 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 bool[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param bool[] $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 = [ + 'name' => 'name', + 'email' => 'email', + 'phone' => 'phone', + 'address' => 'address', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'email' => 'setEmail', + 'phone' => 'setPhone', + 'address' => 'setAddress', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'email' => 'getEmail', + 'phone' => 'getPhone', + 'address' => 'getAddress', + ]; + + /** + * 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[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('phone', $data ?? [], null); + $this->setIfExists('address', $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['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['phone'] === null) { + $invalidProperties[] = "'phone' can't be null"; + } + if ($this->container['address'] === null) { + $invalidProperties[] = "'address' 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 name + * + * @return string|null + */ + public function getName(): ?string + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name name + * + * @return self + */ + public function setName(?string $name): self + { + if (is_null($name)) { + array_push($this->openAPINullablesSetToNull, 'name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('name', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail(): ?string + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email email + * + * @return self + */ + public function setEmail(?string $email): self + { + if (is_null($email)) { + array_push($this->openAPINullablesSetToNull, 'email'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('email', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets phone + * + * @return string|null + */ + public function getPhone(): ?string + { + return $this->container['phone']; + } + + /** + * Sets phone + * + * @param string|null $phone phone + * + * @return self + */ + public function setPhone(?string $phone): self + { + if (is_null($phone)) { + array_push($this->openAPINullablesSetToNull, 'phone'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('phone', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['phone'] = $phone; + + return $this; + } + + /** + * Gets address + * + * @return \PAYJPV2\Model\CheckoutSessionCustomerDetailsAddressResponse|null + */ + public function getAddress(): ?\PAYJPV2\Model\CheckoutSessionCustomerDetailsAddressResponse + { + return $this->container['address']; + } + + /** + * Sets address + * + * @param \PAYJPV2\Model\CheckoutSessionCustomerDetailsAddressResponse|null $address address + * + * @return self + */ + public function setAddress(?\PAYJPV2\Model\CheckoutSessionCustomerDetailsAddressResponse $address): self + { + if (is_null($address)) { + array_push($this->openAPINullablesSetToNull, 'address'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('address', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['address'] = $address; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $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 int $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/Model/CheckoutSessionDetailsResponse.php b/lib/Model/CheckoutSessionDetailsResponse.php index 4cdbe5c..636e481 100644 --- a/lib/Model/CheckoutSessionDetailsResponse.php +++ b/lib/Model/CheckoutSessionDetailsResponse.php @@ -58,14 +58,14 @@ class CheckoutSessionDetailsResponse implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', 'object' => 'string', + 'id' => 'string', 'livemode' => 'bool', 'amountSubtotal' => 'int', 'amountTotal' => 'int', - 'cancelUrl' => 'string', 'customerId' => 'string', 'customerEmail' => 'string', + 'customerDetails' => '\PAYJPV2\Model\CheckoutSessionCustomerDetailsResponse', 'expiresAt' => '\DateTime', 'currency' => '\PAYJPV2\Model\Currency', 'locale' => '\PAYJPV2\Model\Locale', @@ -76,12 +76,13 @@ class CheckoutSessionDetailsResponse implements ModelInterface, ArrayAccess, \Js 'submitType' => '\PAYJPV2\Model\CheckoutSessionSubmitType', 'mode' => '\PAYJPV2\Model\CheckoutSessionMode', 'uiMode' => '\PAYJPV2\Model\CheckoutSessionUIMode', - 'createdAt' => '\DateTime', - 'updatedAt' => '\DateTime', - 'metadata' => 'array', 'status' => '\PAYJPV2\Model\CheckoutSessionStatus', 'successUrl' => 'string', + 'cancelUrl' => 'string', 'url' => 'string', + 'metadata' => 'array', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime', ]; /** @@ -92,14 +93,14 @@ class CheckoutSessionDetailsResponse implements ModelInterface, ArrayAccess, \Js * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'object' => null, + 'id' => null, 'livemode' => null, 'amountSubtotal' => null, 'amountTotal' => null, - 'cancelUrl' => null, 'customerId' => null, 'customerEmail' => null, + 'customerDetails' => null, 'expiresAt' => 'date-time', 'currency' => null, 'locale' => null, @@ -110,12 +111,13 @@ class CheckoutSessionDetailsResponse implements ModelInterface, ArrayAccess, \Js 'submitType' => null, 'mode' => null, 'uiMode' => null, - 'createdAt' => 'date-time', - 'updatedAt' => 'date-time', - 'metadata' => null, 'status' => null, 'successUrl' => null, + 'cancelUrl' => null, 'url' => null, + 'metadata' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time', ]; /** @@ -124,14 +126,14 @@ class CheckoutSessionDetailsResponse implements ModelInterface, ArrayAccess, \Js * @var bool[] */ protected static array $openAPINullables = [ - 'id' => false, 'object' => false, + 'id' => false, 'livemode' => false, 'amountSubtotal' => true, 'amountTotal' => true, - 'cancelUrl' => true, 'customerId' => true, 'customerEmail' => true, + 'customerDetails' => true, 'expiresAt' => true, 'currency' => false, 'locale' => true, @@ -142,12 +144,13 @@ class CheckoutSessionDetailsResponse implements ModelInterface, ArrayAccess, \Js 'submitType' => true, 'mode' => false, 'uiMode' => false, - 'createdAt' => false, - 'updatedAt' => false, - 'metadata' => false, 'status' => false, 'successUrl' => true, + 'cancelUrl' => true, 'url' => false, + 'metadata' => false, + 'createdAt' => false, + 'updatedAt' => false, ]; /** @@ -236,14 +239,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'object' => 'object', + 'id' => 'id', 'livemode' => 'livemode', 'amountSubtotal' => 'amount_subtotal', 'amountTotal' => 'amount_total', - 'cancelUrl' => 'cancel_url', 'customerId' => 'customer_id', 'customerEmail' => 'customer_email', + 'customerDetails' => 'customer_details', 'expiresAt' => 'expires_at', 'currency' => 'currency', 'locale' => 'locale', @@ -254,12 +257,13 @@ public function isNullableSetToNull(string $property): bool 'submitType' => 'submit_type', 'mode' => 'mode', 'uiMode' => 'ui_mode', - 'createdAt' => 'created_at', - 'updatedAt' => 'updated_at', - 'metadata' => 'metadata', 'status' => 'status', 'successUrl' => 'success_url', + 'cancelUrl' => 'cancel_url', 'url' => 'url', + 'metadata' => 'metadata', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', ]; /** @@ -268,14 +272,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'object' => 'setObject', + 'id' => 'setId', 'livemode' => 'setLivemode', 'amountSubtotal' => 'setAmountSubtotal', 'amountTotal' => 'setAmountTotal', - 'cancelUrl' => 'setCancelUrl', 'customerId' => 'setCustomerId', 'customerEmail' => 'setCustomerEmail', + 'customerDetails' => 'setCustomerDetails', 'expiresAt' => 'setExpiresAt', 'currency' => 'setCurrency', 'locale' => 'setLocale', @@ -286,12 +290,13 @@ public function isNullableSetToNull(string $property): bool 'submitType' => 'setSubmitType', 'mode' => 'setMode', 'uiMode' => 'setUiMode', - 'createdAt' => 'setCreatedAt', - 'updatedAt' => 'setUpdatedAt', - 'metadata' => 'setMetadata', 'status' => 'setStatus', 'successUrl' => 'setSuccessUrl', + 'cancelUrl' => 'setCancelUrl', 'url' => 'setUrl', + 'metadata' => 'setMetadata', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', ]; /** @@ -300,14 +305,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'object' => 'getObject', + 'id' => 'getId', 'livemode' => 'getLivemode', 'amountSubtotal' => 'getAmountSubtotal', 'amountTotal' => 'getAmountTotal', - 'cancelUrl' => 'getCancelUrl', 'customerId' => 'getCustomerId', 'customerEmail' => 'getCustomerEmail', + 'customerDetails' => 'getCustomerDetails', 'expiresAt' => 'getExpiresAt', 'currency' => 'getCurrency', 'locale' => 'getLocale', @@ -318,12 +323,13 @@ public function isNullableSetToNull(string $property): bool 'submitType' => 'getSubmitType', 'mode' => 'getMode', 'uiMode' => 'getUiMode', - 'createdAt' => 'getCreatedAt', - 'updatedAt' => 'getUpdatedAt', - 'metadata' => 'getMetadata', 'status' => 'getStatus', 'successUrl' => 'getSuccessUrl', + 'cancelUrl' => 'getCancelUrl', 'url' => 'getUrl', + 'metadata' => 'getMetadata', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', ]; /** @@ -396,14 +402,14 @@ public function getObjectAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('object', $data ?? [], 'checkout.session'); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('amountSubtotal', $data ?? [], null); $this->setIfExists('amountTotal', $data ?? [], null); - $this->setIfExists('cancelUrl', $data ?? [], null); $this->setIfExists('customerId', $data ?? [], null); $this->setIfExists('customerEmail', $data ?? [], null); + $this->setIfExists('customerDetails', $data ?? [], null); $this->setIfExists('expiresAt', $data ?? [], null); $this->setIfExists('currency', $data ?? [], null); $this->setIfExists('locale', $data ?? [], null); @@ -414,12 +420,13 @@ public function __construct(?array $data = null) $this->setIfExists('submitType', $data ?? [], null); $this->setIfExists('mode', $data ?? [], null); $this->setIfExists('uiMode', $data ?? [], null); - $this->setIfExists('createdAt', $data ?? [], null); - $this->setIfExists('updatedAt', $data ?? [], null); - $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); $this->setIfExists('successUrl', $data ?? [], null); + $this->setIfExists('cancelUrl', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('updatedAt', $data ?? [], null); } /** @@ -449,9 +456,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } $allowedValues = $this->getObjectAllowableValues(); if (! is_null($this->container['object']) && ! in_array($this->container['object'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -461,6 +465,9 @@ public function listInvalidProperties() ); } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } if ($this->container['livemode'] === null) { $invalidProperties[] = "'livemode' can't be null"; } @@ -470,9 +477,6 @@ public function listInvalidProperties() if ($this->container['amountTotal'] === null) { $invalidProperties[] = "'amountTotal' can't be null"; } - if ($this->container['cancelUrl'] === null) { - $invalidProperties[] = "'cancelUrl' can't be null"; - } if ($this->container['customerId'] === null) { $invalidProperties[] = "'customerId' can't be null"; } @@ -503,24 +507,27 @@ public function listInvalidProperties() if ($this->container['uiMode'] === null) { $invalidProperties[] = "'uiMode' can't be null"; } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['updatedAt'] === null) { - $invalidProperties[] = "'updatedAt' can't be null"; - } - if ($this->container['metadata'] === null) { - $invalidProperties[] = "'metadata' can't be null"; - } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } if ($this->container['successUrl'] === null) { $invalidProperties[] = "'successUrl' can't be null"; } + if ($this->container['cancelUrl'] === null) { + $invalidProperties[] = "'cancelUrl' can't be null"; + } if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } + if ($this->container['metadata'] === null) { + $invalidProperties[] = "'metadata' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } return $invalidProperties; } @@ -537,37 +544,6 @@ public function valid() } - /** - * Gets id - * - * @return string - */ - public function getId(): string - { - if ($this->container['id'] === null) { - throw new \LogicException('Property "id" is required but has not been set.'); - } - - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID - * - * @return self - */ - public function setId(string $id): self - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets object * @@ -605,6 +581,37 @@ public function setObject(?string $object): self return $this; } + /** + * Gets id + * + * @return string + */ + public function getId(): string + { + if ($this->container['id'] === null) { + throw new \LogicException('Property "id" is required but has not been set.'); + } + + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Checkout Session ID + * + * @return self + */ + public function setId(string $id): self + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + /** * Gets livemode * @@ -705,103 +712,103 @@ public function setAmountTotal(?int $amountTotal): self } /** - * Gets cancelUrl + * Gets customerId * * @return string|null */ - public function getCancelUrl(): ?string + public function getCustomerId(): ?string { - return $this->container['cancelUrl']; + return $this->container['customerId']; } /** - * Sets cancelUrl + * Sets customerId * - * @param string|null $cancelUrl cancelUrl + * @param string|null $customerId customerId * * @return self */ - public function setCancelUrl(?string $cancelUrl): self + public function setCustomerId(?string $customerId): self { - if (is_null($cancelUrl)) { - array_push($this->openAPINullablesSetToNull, 'cancelUrl'); + if (is_null($customerId)) { + array_push($this->openAPINullablesSetToNull, 'customerId'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('cancelUrl', $nullablesSetToNull); + $index = array_search('customerId', $nullablesSetToNull); if ($index !== false) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['cancelUrl'] = $cancelUrl; + $this->container['customerId'] = $customerId; return $this; } /** - * Gets customerId + * Gets customerEmail * * @return string|null */ - public function getCustomerId(): ?string + public function getCustomerEmail(): ?string { - return $this->container['customerId']; + return $this->container['customerEmail']; } /** - * Sets customerId + * Sets customerEmail * - * @param string|null $customerId customerId + * @param string|null $customerEmail customerEmail * * @return self */ - public function setCustomerId(?string $customerId): self + public function setCustomerEmail(?string $customerEmail): self { - if (is_null($customerId)) { - array_push($this->openAPINullablesSetToNull, 'customerId'); + if (is_null($customerEmail)) { + array_push($this->openAPINullablesSetToNull, 'customerEmail'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('customerId', $nullablesSetToNull); + $index = array_search('customerEmail', $nullablesSetToNull); if ($index !== false) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['customerId'] = $customerId; + $this->container['customerEmail'] = $customerEmail; return $this; } /** - * Gets customerEmail + * Gets customerDetails * - * @return string|null + * @return \PAYJPV2\Model\CheckoutSessionCustomerDetailsResponse|null */ - public function getCustomerEmail(): ?string + public function getCustomerDetails(): ?\PAYJPV2\Model\CheckoutSessionCustomerDetailsResponse { - return $this->container['customerEmail']; + return $this->container['customerDetails']; } /** - * Sets customerEmail + * Sets customerDetails * - * @param string|null $customerEmail customerEmail + * @param \PAYJPV2\Model\CheckoutSessionCustomerDetailsResponse|null $customerDetails customerDetails * * @return self */ - public function setCustomerEmail(?string $customerEmail): self + public function setCustomerDetails(?\PAYJPV2\Model\CheckoutSessionCustomerDetailsResponse $customerDetails): self { - if (is_null($customerEmail)) { - array_push($this->openAPINullablesSetToNull, 'customerEmail'); + if (is_null($customerDetails)) { + array_push($this->openAPINullablesSetToNull, 'customerDetails'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('customerEmail', $nullablesSetToNull); + $index = array_search('customerDetails', $nullablesSetToNull); if ($index !== false) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['customerEmail'] = $customerEmail; + $this->container['customerDetails'] = $customerDetails; return $this; } @@ -1092,7 +1099,7 @@ public function getMode(): \PAYJPV2\Model\CheckoutSessionMode /** * Sets mode * - * @param \PAYJPV2\Model\CheckoutSessionMode $mode Checkout Session のモード | 指定できる値 | |:---| | **payment**: 支払いモードでCheckout Sessionを作成します。 | | **setup**: セットアップモードでCheckout Sessionを作成します。 | + * @param \PAYJPV2\Model\CheckoutSessionMode $mode Checkout Session のモード | 値 | |:---| | **payment**: 支払いモード | | **setup**: セットアップモード | * * @return self */ @@ -1123,7 +1130,7 @@ public function getUiMode(): \PAYJPV2\Model\CheckoutSessionUIMode /** * Sets uiMode * - * @param \PAYJPV2\Model\CheckoutSessionUIMode $uiMode Checkout Session の UI モード。デフォルトは `hosted` です。
| 指定できる値 | |:---| | **hosted**: PAY.JPでホスティングしている画面を使用します。 | + * @param \PAYJPV2\Model\CheckoutSessionUIMode $uiMode Checkout Session の UI モード | 値 | |:---| | **hosted**: PAY.JP でホスティングしている画面を使用します。 | * * @return self */ @@ -1138,190 +1145,224 @@ public function setUiMode(\PAYJPV2\Model\CheckoutSessionUIMode $uiMode): self } /** - * Gets createdAt + * Gets status * - * @return \DateTime + * @return \PAYJPV2\Model\CheckoutSessionStatus */ - public function getCreatedAt(): \DateTime + public function getStatus(): \PAYJPV2\Model\CheckoutSessionStatus { - if ($this->container['createdAt'] === null) { - throw new \LogicException('Property "createdAt" is required but has not been set.'); + if ($this->container['status'] === null) { + throw new \LogicException('Property "status" is required but has not been set.'); } - return $this->container['createdAt']; + return $this->container['status']; } /** - * Sets createdAt + * Sets status * - * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) + * @param \PAYJPV2\Model\CheckoutSessionStatus $status チェックアウトセッションのステータス * * @return self */ - public function setCreatedAt(\DateTime $createdAt): self + public function setStatus(\PAYJPV2\Model\CheckoutSessionStatus $status): self { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); } - $this->container['createdAt'] = $createdAt; + $this->container['status'] = $status; return $this; } /** - * Gets updatedAt + * Gets successUrl * - * @return \DateTime + * @return string|null */ - public function getUpdatedAt(): \DateTime + public function getSuccessUrl(): ?string { - if ($this->container['updatedAt'] === null) { - throw new \LogicException('Property "updatedAt" is required but has not been set.'); + return $this->container['successUrl']; + } + + /** + * Sets successUrl + * + * @param string|null $successUrl successUrl + * + * @return self + */ + public function setSuccessUrl(?string $successUrl): self + { + if (is_null($successUrl)) { + array_push($this->openAPINullablesSetToNull, 'successUrl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('successUrl', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } + $this->container['successUrl'] = $successUrl; - return $this->container['updatedAt']; + return $this; } /** - * Sets updatedAt + * Gets cancelUrl * - * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) + * @return string|null + */ + public function getCancelUrl(): ?string + { + return $this->container['cancelUrl']; + } + + /** + * Sets cancelUrl + * + * @param string|null $cancelUrl cancelUrl * * @return self */ - public function setUpdatedAt(\DateTime $updatedAt): self + public function setCancelUrl(?string $cancelUrl): self { - if (is_null($updatedAt)) { - throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + if (is_null($cancelUrl)) { + array_push($this->openAPINullablesSetToNull, 'cancelUrl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('cancelUrl', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['updatedAt'] = $updatedAt; + $this->container['cancelUrl'] = $cancelUrl; return $this; } /** - * Gets metadata + * Gets url * - * @return array + * @return string */ - public function getMetadata(): array + public function getUrl(): string { - if ($this->container['metadata'] === null) { - throw new \LogicException('Property "metadata" is required but has not been set.'); + if ($this->container['url'] === null) { + throw new \LogicException('Property "url" is required but has not been set.'); } - return $this->container['metadata']; + return $this->container['url']; } /** - * Sets metadata + * Sets url * - * @param array $metadata メタデータ + * @param string $url URL * * @return self */ - public function setMetadata(array $metadata): self + public function setUrl(string $url): self { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + if (is_null($url)) { + throw new \InvalidArgumentException('non-nullable url cannot be null'); } - $this->container['metadata'] = $metadata; + $this->container['url'] = $url; return $this; } /** - * Gets status + * Gets metadata * - * @return \PAYJPV2\Model\CheckoutSessionStatus + * @return array */ - public function getStatus(): \PAYJPV2\Model\CheckoutSessionStatus + public function getMetadata(): array { - if ($this->container['status'] === null) { - throw new \LogicException('Property "status" is required but has not been set.'); + if ($this->container['metadata'] === null) { + throw new \LogicException('Property "metadata" is required but has not been set.'); } - return $this->container['status']; + return $this->container['metadata']; } /** - * Sets status + * Sets metadata * - * @param \PAYJPV2\Model\CheckoutSessionStatus $status チェックアウトセッションのステータス + * @param array $metadata メタデータ * * @return self */ - public function setStatus(\PAYJPV2\Model\CheckoutSessionStatus $status): self + public function setMetadata(array $metadata): self { - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); } - $this->container['status'] = $status; + $this->container['metadata'] = $metadata; return $this; } /** - * Gets successUrl + * Gets createdAt * - * @return string|null + * @return \DateTime */ - public function getSuccessUrl(): ?string + public function getCreatedAt(): \DateTime { - return $this->container['successUrl']; + if ($this->container['createdAt'] === null) { + throw new \LogicException('Property "createdAt" is required but has not been set.'); + } + + return $this->container['createdAt']; } /** - * Sets successUrl + * Sets createdAt * - * @param string|null $successUrl successUrl + * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) * * @return self */ - public function setSuccessUrl(?string $successUrl): self + public function setCreatedAt(\DateTime $createdAt): self { - if (is_null($successUrl)) { - array_push($this->openAPINullablesSetToNull, 'successUrl'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('successUrl', $nullablesSetToNull); - if ($index !== false) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); } - $this->container['successUrl'] = $successUrl; + $this->container['createdAt'] = $createdAt; return $this; } /** - * Gets url + * Gets updatedAt * - * @return string + * @return \DateTime */ - public function getUrl(): string + public function getUpdatedAt(): \DateTime { - if ($this->container['url'] === null) { - throw new \LogicException('Property "url" is required but has not been set.'); + if ($this->container['updatedAt'] === null) { + throw new \LogicException('Property "updatedAt" is required but has not been set.'); } - return $this->container['url']; + return $this->container['updatedAt']; } /** - * Sets url + * Sets updatedAt * - * @param string $url URL + * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) * * @return self */ - public function setUrl(string $url): self + public function setUpdatedAt(\DateTime $updatedAt): self { - if (is_null($url)) { - throw new \InvalidArgumentException('non-nullable url cannot be null'); + if (is_null($updatedAt)) { + throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); } - $this->container['url'] = $url; + $this->container['updatedAt'] = $updatedAt; return $this; } diff --git a/lib/Model/CheckoutSessionPaymentMethodOptionsCardRequest.php b/lib/Model/CheckoutSessionPaymentMethodOptionsCardRequest.php index 3f78208..e05f576 100644 --- a/lib/Model/CheckoutSessionPaymentMethodOptionsCardRequest.php +++ b/lib/Model/CheckoutSessionPaymentMethodOptionsCardRequest.php @@ -358,7 +358,7 @@ public function getRequestExtendedAuthorization(): ?string /** * Sets requestExtendedAuthorization * - * @param string|null $requestExtendedAuthorization オーソリ期間の延長要求。 | 指定できる値 | |:---| | **if_available**: オーソリ期間の延長が可能な場合に延長要求を行います。 | | **never**: オーソリ期間の延長要求を行いません。 | + * @param string|null $requestExtendedAuthorization オーソリ期間の延長要求 | 指定できる値 | |:---| | **if_available**: オーソリ期間の延長が可能な場合に延長要求を行います。 | | **never**: オーソリ期間の延長要求を行いません。 | * * @return self */ @@ -395,7 +395,7 @@ public function getRequestThreeDSecure(): ?string /** * Sets requestThreeDSecure * - * @param string|null $requestThreeDSecure 3Dセキュア認証の要求方法。 | 指定できる値 | |:---| | **any**: 3Dセキュア認証を要求します。 | | **automatic**: 必要な場合にのみ3Dセキュア認証を要求します。 | + * @param string|null $requestThreeDSecure 3D セキュア認証の要求方法 | 指定できる値 | |:---| | **any**: 3D セキュア認証を要求します。 | | **automatic**: 必要な場合にのみ 3D セキュア認証を要求します。 | * * @return self */ diff --git a/lib/Model/CheckoutSessionUpdateRequest.php b/lib/Model/CheckoutSessionUpdateRequest.php index 5b1bdeb..5fb6605 100644 --- a/lib/Model/CheckoutSessionUpdateRequest.php +++ b/lib/Model/CheckoutSessionUpdateRequest.php @@ -303,7 +303,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ diff --git a/lib/Model/CustomerCreateRequest.php b/lib/Model/CustomerCreateRequest.php index db561bd..6870a1e 100644 --- a/lib/Model/CustomerCreateRequest.php +++ b/lib/Model/CustomerCreateRequest.php @@ -58,11 +58,11 @@ class CustomerCreateRequest implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ + 'id' => 'string', + 'paymentMethodId' => 'string', 'email' => 'string', 'description' => 'string', 'metadata' => 'array', - 'id' => 'string', - 'paymentMethodId' => 'string', ]; /** @@ -73,11 +73,11 @@ class CustomerCreateRequest implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ + 'id' => null, + 'paymentMethodId' => null, 'email' => 'email', 'description' => null, 'metadata' => null, - 'id' => null, - 'paymentMethodId' => null, ]; /** @@ -86,11 +86,11 @@ class CustomerCreateRequest implements ModelInterface, ArrayAccess, \JsonSeriali * @var bool[] */ protected static array $openAPINullables = [ + 'id' => false, + 'paymentMethodId' => false, 'email' => false, 'description' => false, 'metadata' => false, - 'id' => false, - 'paymentMethodId' => false, ]; /** @@ -179,11 +179,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'id' => 'id', + 'paymentMethodId' => 'payment_method_id', 'email' => 'email', 'description' => 'description', 'metadata' => 'metadata', - 'id' => 'id', - 'paymentMethodId' => 'payment_method_id', ]; /** @@ -192,11 +192,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'id' => 'setId', + 'paymentMethodId' => 'setPaymentMethodId', 'email' => 'setEmail', 'description' => 'setDescription', 'metadata' => 'setMetadata', - 'id' => 'setId', - 'paymentMethodId' => 'setPaymentMethodId', ]; /** @@ -205,11 +205,11 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'id' => 'getId', + 'paymentMethodId' => 'getPaymentMethodId', 'email' => 'getEmail', 'description' => 'getDescription', 'metadata' => 'getMetadata', - 'id' => 'getId', - 'paymentMethodId' => 'getPaymentMethodId', ]; /** @@ -269,11 +269,11 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('paymentMethodId', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('paymentMethodId', $data ?? [], null); } /** @@ -303,14 +303,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if (! is_null($this->container['email']) && (mb_strlen($this->container['email']) > 255)) { - $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 255."; - } - - if (! is_null($this->container['description']) && (mb_strlen($this->container['description']) > 255)) { - $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 255."; - } - if (! is_null($this->container['id']) && (mb_strlen($this->container['id']) > 100)) { $invalidProperties[] = "invalid value for 'id', the character length must be smaller than or equal to 100."; } @@ -319,6 +311,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'id', must be conform to the pattern /^[-_0-9A-Za-z]+$/."; } + if (! is_null($this->container['email']) && (mb_strlen($this->container['email']) > 255)) { + $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 255."; + } + + if (! is_null($this->container['description']) && (mb_strlen($this->container['description']) > 255)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 255."; + } + return $invalidProperties; } @@ -335,151 +335,151 @@ public function valid() /** - * Gets email + * Gets id * * @return string|null */ - public function getEmail(): ?string + public function getId(): ?string { - return $this->container['email']; + return $this->container['id']; } /** - * Sets email + * Sets id * - * @param string|null $email 顧客のメールアドレス。メールアドレスの形式が正しいかどうかは検証されます。 + * @param string|null $id 顧客 ID。100桁までの一意な文字列を指定できます。使える文字は半角英数字、ハイフン(-)、アンダースコア(_)です。未指定時は `cus_` で始まる一意な文字列が自動生成されます。 * * @return self */ - public function setEmail(?string $email): self + public function setId(?string $id): self { - if (is_null($email)) { - throw new \InvalidArgumentException('non-nullable email cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - if ((mb_strlen($email) > 255)) { - throw new \InvalidArgumentException('invalid length for $email when calling CustomerCreateRequest., must be smaller than or equal to 255.'); + if ((mb_strlen($id) > 100)) { + throw new \InvalidArgumentException('invalid length for $id when calling CustomerCreateRequest., must be smaller than or equal to 100.'); + } + if ((! preg_match("/^[-_0-9A-Za-z]+$/", ObjectSerializer::toString($id)))) { + throw new \InvalidArgumentException("invalid value for \$id when calling CustomerCreateRequest., must conform to the pattern /^[-_0-9A-Za-z]+$/."); } - $this->container['email'] = $email; + $this->container['id'] = $id; return $this; } /** - * Gets description + * Gets paymentMethodId * * @return string|null */ - public function getDescription(): ?string + public function getPaymentMethodId(): ?string { - return $this->container['description']; + return $this->container['paymentMethodId']; } /** - * Sets description + * Sets paymentMethodId * - * @param string|null $description 顧客オブジェクトに付加できる任意の文字列です。これは、ダッシュボードで顧客と一緒に表示されます。 + * @param string|null $paymentMethodId 顧客に紐づける支払い方法 ID。同時にデフォルトの支払い方法として登録されます。 * * @return self */ - public function setDescription(?string $description): self + public function setPaymentMethodId(?string $paymentMethodId): self { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } - if ((mb_strlen($description) > 255)) { - throw new \InvalidArgumentException('invalid length for $description when calling CustomerCreateRequest., must be smaller than or equal to 255.'); + if (is_null($paymentMethodId)) { + throw new \InvalidArgumentException('non-nullable paymentMethodId cannot be null'); } - - $this->container['description'] = $description; + $this->container['paymentMethodId'] = $paymentMethodId; return $this; } /** - * Gets metadata + * Gets email * - * @return array|null + * @return string|null */ - public function getMetadata(): ?array + public function getEmail(): ?string { - return $this->container['metadata']; + return $this->container['email']; } /** - * Sets metadata + * Sets email * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param string|null $email 顧客のメールアドレス。メールアドレスの形式が正しいかどうかは検証されます。 * * @return self */ - public function setMetadata(?array $metadata): self + public function setEmail(?string $email): self { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + if ((mb_strlen($email) > 255)) { + throw new \InvalidArgumentException('invalid length for $email when calling CustomerCreateRequest., must be smaller than or equal to 255.'); } - $this->container['metadata'] = $metadata; + + $this->container['email'] = $email; return $this; } /** - * Gets id + * Gets description * * @return string|null */ - public function getId(): ?string + public function getDescription(): ?string { - return $this->container['id']; + return $this->container['description']; } /** - * Sets id + * Sets description * - * @param string|null $id 顧客ID。100桁までの一意な文字列を指定できます。使える文字は半角英数字、ハイフン(-)、アンダースコア(_)です。未指定時は `cus_` で始まる32桁までの一意な文字列が自動生成されます。 + * @param string|null $description 顧客オブジェクトに付加できる任意の文字列です。管理画面で顧客と一緒に表示されます。 * * @return self */ - public function setId(?string $id): self + public function setDescription(?string $description): self { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - if ((mb_strlen($id) > 100)) { - throw new \InvalidArgumentException('invalid length for $id when calling CustomerCreateRequest., must be smaller than or equal to 100.'); + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); } - if ((! preg_match("/^[-_0-9A-Za-z]+$/", ObjectSerializer::toString($id)))) { - throw new \InvalidArgumentException("invalid value for \$id when calling CustomerCreateRequest., must conform to the pattern /^[-_0-9A-Za-z]+$/."); + if ((mb_strlen($description) > 255)) { + throw new \InvalidArgumentException('invalid length for $description when calling CustomerCreateRequest., must be smaller than or equal to 255.'); } - $this->container['id'] = $id; + $this->container['description'] = $description; return $this; } /** - * Gets paymentMethodId + * Gets metadata * - * @return string|null + * @return array|null */ - public function getPaymentMethodId(): ?string + public function getMetadata(): ?array { - return $this->container['paymentMethodId']; + return $this->container['metadata']; } /** - * Sets paymentMethodId + * Sets metadata * - * @param string|null $paymentMethodId 顧客に紐づける支払い方法ID + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ - public function setPaymentMethodId(?string $paymentMethodId): self + public function setMetadata(?array $metadata): self { - if (is_null($paymentMethodId)) { - throw new \InvalidArgumentException('non-nullable paymentMethodId cannot be null'); + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); } - $this->container['paymentMethodId'] = $paymentMethodId; + $this->container['metadata'] = $metadata; return $this; } diff --git a/lib/Model/CustomerResponse.php b/lib/Model/CustomerResponse.php index efe2322..e5ad3c6 100644 --- a/lib/Model/CustomerResponse.php +++ b/lib/Model/CustomerResponse.php @@ -58,8 +58,8 @@ class CustomerResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', 'object' => 'string', + 'id' => 'string', 'livemode' => 'bool', 'email' => 'string', 'description' => 'string', @@ -77,8 +77,8 @@ class CustomerResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'object' => null, + 'id' => null, 'livemode' => null, 'email' => null, 'description' => null, @@ -94,8 +94,8 @@ class CustomerResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @var bool[] */ protected static array $openAPINullables = [ - 'id' => false, 'object' => false, + 'id' => false, 'livemode' => false, 'email' => true, 'description' => true, @@ -191,8 +191,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'object' => 'object', + 'id' => 'id', 'livemode' => 'livemode', 'email' => 'email', 'description' => 'description', @@ -208,8 +208,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'object' => 'setObject', + 'id' => 'setId', 'livemode' => 'setLivemode', 'email' => 'setEmail', 'description' => 'setDescription', @@ -225,8 +225,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'object' => 'getObject', + 'id' => 'getId', 'livemode' => 'getLivemode', 'email' => 'getEmail', 'description' => 'getDescription', @@ -306,8 +306,8 @@ public function getObjectAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('object', $data ?? [], 'customer'); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); @@ -344,9 +344,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } $allowedValues = $this->getObjectAllowableValues(); if (! is_null($this->container['object']) && ! in_array($this->container['object'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -356,6 +353,9 @@ public function listInvalidProperties() ); } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } if ($this->container['livemode'] === null) { $invalidProperties[] = "'livemode' can't be null"; } @@ -393,37 +393,6 @@ public function valid() } - /** - * Gets id - * - * @return string - */ - public function getId(): string - { - if ($this->container['id'] === null) { - throw new \LogicException('Property "id" is required but has not been set.'); - } - - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id 顧客ID - * - * @return self - */ - public function setId(string $id): self - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets object * @@ -461,6 +430,37 @@ public function setObject(?string $object): self return $this; } + /** + * Gets id + * + * @return string + */ + public function getId(): string + { + if ($this->container['id'] === null) { + throw new \LogicException('Property "id" is required but has not been set.'); + } + + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id 顧客 ID + * + * @return self + */ + public function setId(string $id): self + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + /** * Gets livemode * diff --git a/lib/Model/CustomerUpdateRequest.php b/lib/Model/CustomerUpdateRequest.php index 86e038b..1ce047c 100644 --- a/lib/Model/CustomerUpdateRequest.php +++ b/lib/Model/CustomerUpdateRequest.php @@ -58,10 +58,10 @@ class CustomerUpdateRequest implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ + 'defaultPaymentMethodId' => 'string', 'email' => 'string', 'description' => 'string', 'metadata' => 'array', - 'defaultPaymentMethodId' => 'string', ]; /** @@ -72,10 +72,10 @@ class CustomerUpdateRequest implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ + 'defaultPaymentMethodId' => null, 'email' => 'email', 'description' => null, 'metadata' => null, - 'defaultPaymentMethodId' => null, ]; /** @@ -84,10 +84,10 @@ class CustomerUpdateRequest implements ModelInterface, ArrayAccess, \JsonSeriali * @var bool[] */ protected static array $openAPINullables = [ + 'defaultPaymentMethodId' => true, 'email' => false, 'description' => false, 'metadata' => false, - 'defaultPaymentMethodId' => true, ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'defaultPaymentMethodId' => 'default_payment_method_id', 'email' => 'email', 'description' => 'description', 'metadata' => 'metadata', - 'defaultPaymentMethodId' => 'default_payment_method_id', ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'defaultPaymentMethodId' => 'setDefaultPaymentMethodId', 'email' => 'setEmail', 'description' => 'setDescription', 'metadata' => 'setMetadata', - 'defaultPaymentMethodId' => 'setDefaultPaymentMethodId', ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'defaultPaymentMethodId' => 'getDefaultPaymentMethodId', 'email' => 'getEmail', 'description' => 'getDescription', 'metadata' => 'getMetadata', - 'defaultPaymentMethodId' => 'getDefaultPaymentMethodId', ]; /** @@ -263,10 +263,10 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('defaultPaymentMethodId', $data ?? [], null); $this->setIfExists('email', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); - $this->setIfExists('defaultPaymentMethodId', $data ?? [], null); } /** @@ -319,6 +319,40 @@ public function valid() } + /** + * Gets defaultPaymentMethodId + * + * @return string|null + */ + public function getDefaultPaymentMethodId(): ?string + { + return $this->container['defaultPaymentMethodId']; + } + + /** + * Sets defaultPaymentMethodId + * + * @param string|null $defaultPaymentMethodId defaultPaymentMethodId + * + * @return self + */ + public function setDefaultPaymentMethodId(?string $defaultPaymentMethodId): self + { + if (is_null($defaultPaymentMethodId)) { + array_push($this->openAPINullablesSetToNull, 'defaultPaymentMethodId'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('defaultPaymentMethodId', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['defaultPaymentMethodId'] = $defaultPaymentMethodId; + + return $this; + } + /** * Gets email * @@ -363,7 +397,7 @@ public function getDescription(): ?string /** * Sets description * - * @param string|null $description 顧客オブジェクトに付加できる任意の文字列です。これは、ダッシュボードで顧客と一緒に表示されます。 + * @param string|null $description 顧客オブジェクトに付加できる任意の文字列です。管理画面で顧客と一緒に表示されます。 * * @return self */ @@ -394,7 +428,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ @@ -407,40 +441,6 @@ public function setMetadata(?array $metadata): self return $this; } - - /** - * Gets defaultPaymentMethodId - * - * @return string|null - */ - public function getDefaultPaymentMethodId(): ?string - { - return $this->container['defaultPaymentMethodId']; - } - - /** - * Sets defaultPaymentMethodId - * - * @param string|null $defaultPaymentMethodId defaultPaymentMethodId - * - * @return self - */ - public function setDefaultPaymentMethodId(?string $defaultPaymentMethodId): self - { - if (is_null($defaultPaymentMethodId)) { - array_push($this->openAPINullablesSetToNull, 'defaultPaymentMethodId'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('defaultPaymentMethodId', $nullablesSetToNull); - if ($index !== false) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } - } - $this->container['defaultPaymentMethodId'] = $defaultPaymentMethodId; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/DisplayPreferenceRequest.php b/lib/Model/DisplayPreferenceRequest.php index 54b2bb3..76f66d1 100644 --- a/lib/Model/DisplayPreferenceRequest.php +++ b/lib/Model/DisplayPreferenceRequest.php @@ -336,7 +336,7 @@ public function getPreference(): string /** * Sets preference * - * @param string $preference この支払い方法がアカウントで有効になっているかどうか。 | 指定できる値 | |:---| | **on**: この決済手段を決済画面に表示する | | **off**: この決済手段を決済画面に表示しない | | **none**: デフォルト設定を使用 | + * @param string $preference この支払い方法がアカウントで有効になっているかどうか | 値 | |:---| | **on**: この決済手段を決済画面に表示する | | **off**: この決済手段を決済画面に表示しない | | **none**: デフォルト設定を使用 | * * @return self */ diff --git a/lib/Model/EventResponse.php b/lib/Model/EventResponse.php index 077b26e..e2e071e 100644 --- a/lib/Model/EventResponse.php +++ b/lib/Model/EventResponse.php @@ -58,14 +58,14 @@ class EventResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', 'object' => 'string', - 'createdAt' => '\DateTime', - 'updatedAt' => '\DateTime', + 'id' => 'string', 'livemode' => 'bool', 'type' => 'string', 'pendingWebhooks' => 'int', 'data' => 'array', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime', ]; /** @@ -76,14 +76,14 @@ class EventResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'object' => null, - 'createdAt' => 'date-time', - 'updatedAt' => 'date-time', + 'id' => null, 'livemode' => null, 'type' => null, 'pendingWebhooks' => null, 'data' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time', ]; /** @@ -92,14 +92,14 @@ class EventResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @var bool[] */ protected static array $openAPINullables = [ - 'id' => false, 'object' => false, - 'createdAt' => false, - 'updatedAt' => false, + 'id' => false, 'livemode' => false, 'type' => false, 'pendingWebhooks' => false, 'data' => false, + 'createdAt' => false, + 'updatedAt' => false, ]; /** @@ -188,14 +188,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'object' => 'object', - 'createdAt' => 'created_at', - 'updatedAt' => 'updated_at', + 'id' => 'id', 'livemode' => 'livemode', 'type' => 'type', 'pendingWebhooks' => 'pending_webhooks', 'data' => 'data', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', ]; /** @@ -204,14 +204,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'object' => 'setObject', - 'createdAt' => 'setCreatedAt', - 'updatedAt' => 'setUpdatedAt', + 'id' => 'setId', 'livemode' => 'setLivemode', 'type' => 'setType', 'pendingWebhooks' => 'setPendingWebhooks', 'data' => 'setData', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', ]; /** @@ -220,14 +220,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'object' => 'getObject', - 'createdAt' => 'getCreatedAt', - 'updatedAt' => 'getUpdatedAt', + 'id' => 'getId', 'livemode' => 'getLivemode', 'type' => 'getType', 'pendingWebhooks' => 'getPendingWebhooks', 'data' => 'getData', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', ]; /** @@ -300,14 +300,14 @@ public function getObjectAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('object', $data ?? [], 'event'); - $this->setIfExists('createdAt', $data ?? [], null); - $this->setIfExists('updatedAt', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('pendingWebhooks', $data ?? [], null); $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('updatedAt', $data ?? [], null); } /** @@ -337,9 +337,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } $allowedValues = $this->getObjectAllowableValues(); if (! is_null($this->container['object']) && ! in_array($this->container['object'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -349,11 +346,8 @@ public function listInvalidProperties() ); } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['updatedAt'] === null) { - $invalidProperties[] = "'updatedAt' can't be null"; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; } if ($this->container['livemode'] === null) { $invalidProperties[] = "'livemode' can't be null"; @@ -367,6 +361,12 @@ public function listInvalidProperties() if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } return $invalidProperties; } @@ -383,37 +383,6 @@ public function valid() } - /** - * Gets id - * - * @return string - */ - public function getId(): string - { - if ($this->container['id'] === null) { - throw new \LogicException('Property "id" is required but has not been set.'); - } - - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id イベントID - * - * @return self - */ - public function setId(string $id): self - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets object * @@ -452,63 +421,32 @@ public function setObject(?string $object): self } /** - * Gets createdAt - * - * @return \DateTime - */ - public function getCreatedAt(): \DateTime - { - if ($this->container['createdAt'] === null) { - throw new \LogicException('Property "createdAt" is required but has not been set.'); - } - - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) - * - * @return self - */ - public function setCreatedAt(\DateTime $createdAt): self - { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets updatedAt + * Gets id * - * @return \DateTime + * @return string */ - public function getUpdatedAt(): \DateTime + public function getId(): string { - if ($this->container['updatedAt'] === null) { - throw new \LogicException('Property "updatedAt" is required but has not been set.'); + if ($this->container['id'] === null) { + throw new \LogicException('Property "id" is required but has not been set.'); } - return $this->container['updatedAt']; + return $this->container['id']; } /** - * Sets updatedAt + * Sets id * - * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) + * @param string $id イベント ID * * @return self */ - public function setUpdatedAt(\DateTime $updatedAt): self + public function setId(string $id): self { - if (is_null($updatedAt)) { - throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['updatedAt'] = $updatedAt; + $this->container['id'] = $id; return $this; } @@ -592,7 +530,7 @@ public function getPendingWebhooks(): int /** * Sets pendingWebhooks * - * @param int $pendingWebhooks 設定されたURLへの通知が完了していない(2xxのレスポンスが得られていない)webhookの数 + * @param int $pendingWebhooks 設定された URL への通知が完了していない (2xx のレスポンスが得られていない) webhook の数 * * @return self */ @@ -636,6 +574,68 @@ public function setData(array $data): self return $this; } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt(): \DateTime + { + if ($this->container['createdAt'] === null) { + throw new \LogicException('Property "createdAt" is required but has not been set.'); + } + + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setCreatedAt(\DateTime $createdAt): self + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return \DateTime + */ + public function getUpdatedAt(): \DateTime + { + if ($this->container['updatedAt'] === null) { + throw new \LogicException('Property "updatedAt" is required but has not been set.'); + } + + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setUpdatedAt(\DateTime $updatedAt): self + { + if (is_null($updatedAt)) { + throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + } + $this->container['updatedAt'] = $updatedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/LineItemRequest.php b/lib/Model/LineItemRequest.php index 3acca5c..4e410a4 100644 --- a/lib/Model/LineItemRequest.php +++ b/lib/Model/LineItemRequest.php @@ -328,7 +328,7 @@ public function getPriceId(): string /** * Sets priceId * - * @param string $priceId 料金ID + * @param string $priceId 料金 ID * * @return self */ @@ -386,7 +386,7 @@ public function getTaxRates(): ?array /** * Sets taxRates * - * @param string[]|null $taxRates 税率ID + * @param string[]|null $taxRates 税率 ID * * @return self */ diff --git a/lib/Model/PaymentFlowCancelRequest.php b/lib/Model/PaymentFlowCancelRequest.php index 59ce6ff..0a4dca6 100644 --- a/lib/Model/PaymentFlowCancelRequest.php +++ b/lib/Model/PaymentFlowCancelRequest.php @@ -331,7 +331,7 @@ public function getCancellationReason(): ?string /** * Sets cancellationReason * - * @param string|null $cancellationReason この PaymentFlow のキャンセル理由 | 指定できる値 | |:---| | **duplicate**: 重複した支払いである場合。 | | **fraudulent**: 不正な利用だと考えられる場合。 | | **requested_by_customer**: 顧客がキャンセルを要求した場合。 | | **abandoned**: 顧客が支払いを完了しなかった場合。 | + * @param string|null $cancellationReason この PaymentFlow のキャンセル理由 | 値 | |:---| | **duplicate**: 重複した支払いである場合。 | | **fraudulent**: 不正な利用だと考えられる場合。 | | **requested_by_customer**: 顧客がキャンセルを要求した場合。 | | **abondoned**: 顧客が支払いを完了しなかった場合。 | * * @return self */ diff --git a/lib/Model/PaymentFlowCancellationReason.php b/lib/Model/PaymentFlowCancellationReason.php new file mode 100644 index 0000000..524be25 --- /dev/null +++ b/lib/Model/PaymentFlowCancellationReason.php @@ -0,0 +1,59 @@ +|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ diff --git a/lib/Model/PaymentFlowDataRequest.php b/lib/Model/PaymentFlowDataRequest.php index 43340dd..e8e3d1c 100644 --- a/lib/Model/PaymentFlowDataRequest.php +++ b/lib/Model/PaymentFlowDataRequest.php @@ -310,7 +310,7 @@ public function getCaptureMethod(): ?\PAYJPV2\Model\CaptureMethod /** * Sets captureMethod * - * @param \PAYJPV2\Model\CaptureMethod|null $captureMethod 支払いの確定方法を指定します。 | 指定できる値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると自動的に確定します。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | + * @param \PAYJPV2\Model\CaptureMethod|null $captureMethod 支払いの確定方法を指定します。 | 指定できる値 | |:---| | **automatic**: 顧客が支払いを承認すると自動的に確定します。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | * * @return self */ @@ -337,7 +337,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ diff --git a/lib/Model/PaymentFlowPaymentMethodOptionsCardRequest.php b/lib/Model/PaymentFlowPaymentMethodOptionsCardRequest.php index 490cb87..9b89897 100644 --- a/lib/Model/PaymentFlowPaymentMethodOptionsCardRequest.php +++ b/lib/Model/PaymentFlowPaymentMethodOptionsCardRequest.php @@ -358,7 +358,7 @@ public function getRequestExtendedAuthorization(): ?string /** * Sets requestExtendedAuthorization * - * @param string|null $requestExtendedAuthorization オーソリ期間の延長要求 | 指定できる値 | |:---| | **if_available**: オーソリ期間の延長が可能な場合に延長要求を行います。 | | **never**: オーソリ期間の延長要求を行いません。 | + * @param string|null $requestExtendedAuthorization オーソリ期間の延長要求 | 値 | |:---| | **if_available**: オーソリ期間の延長が可能な場合に延長要求を行います。 | | **never**: オーソリ期間の延長要求を行いません。 | * * @return self */ @@ -395,7 +395,7 @@ public function getRequestThreeDSecure(): ?string /** * Sets requestThreeDSecure * - * @param string|null $requestThreeDSecure 3Dセキュア認証の要求方法。 | 指定できる値 | |:---| | **any**: 3Dセキュア認証を要求します。 | | **automatic**: 必要な場合にのみ3Dセキュア認証を要求します。 | + * @param string|null $requestThreeDSecure 3D セキュア認証の要求方法。 | 値 | |:---| | **any**: 3D セキュア認証を要求します。 | | **automatic**: 必要な場合にのみ 3D セキュア認証を要求します。 | * * @return self */ diff --git a/lib/Model/PaymentFlowResponse.php b/lib/Model/PaymentFlowResponse.php index 823096f..69fe6c7 100644 --- a/lib/Model/PaymentFlowResponse.php +++ b/lib/Model/PaymentFlowResponse.php @@ -58,10 +58,8 @@ class PaymentFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializa * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', 'object' => 'string', - 'createdAt' => '\DateTime', - 'updatedAt' => '\DateTime', + 'id' => 'string', 'livemode' => 'bool', 'amount' => 'int', 'currency' => '\PAYJPV2\Model\Currency', @@ -70,7 +68,6 @@ class PaymentFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'clientSecret' => 'string', 'customerId' => 'string', 'description' => 'string', - 'metadata' => 'array', 'paymentMethodId' => 'string', 'paymentMethodOptions' => 'array', 'paymentMethodTypes' => '\PAYJPV2\Model\PaymentMethodTypes[]', @@ -79,6 +76,11 @@ class PaymentFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'returnUrl' => 'string', 'captureMethod' => '\PAYJPV2\Model\CaptureMethod', 'lastPaymentError' => 'array', + 'cancellationReason' => '\PAYJPV2\Model\PaymentFlowCancellationReason', + 'canceledAt' => '\DateTime', + 'metadata' => 'array', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime', ]; /** @@ -89,10 +91,8 @@ class PaymentFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'object' => null, - 'createdAt' => 'date-time', - 'updatedAt' => 'date-time', + 'id' => null, 'livemode' => null, 'amount' => null, 'currency' => null, @@ -101,7 +101,6 @@ class PaymentFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'clientSecret' => null, 'customerId' => null, 'description' => null, - 'metadata' => null, 'paymentMethodId' => null, 'paymentMethodOptions' => null, 'paymentMethodTypes' => null, @@ -110,6 +109,11 @@ class PaymentFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'returnUrl' => null, 'captureMethod' => null, 'lastPaymentError' => null, + 'cancellationReason' => null, + 'canceledAt' => 'date-time', + 'metadata' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time', ]; /** @@ -118,10 +122,8 @@ class PaymentFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializa * @var bool[] */ protected static array $openAPINullables = [ - 'id' => false, 'object' => false, - 'createdAt' => false, - 'updatedAt' => false, + 'id' => false, 'livemode' => false, 'amount' => false, 'currency' => false, @@ -130,7 +132,6 @@ class PaymentFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'clientSecret' => false, 'customerId' => true, 'description' => true, - 'metadata' => false, 'paymentMethodId' => true, 'paymentMethodOptions' => true, 'paymentMethodTypes' => false, @@ -139,6 +140,11 @@ class PaymentFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'returnUrl' => true, 'captureMethod' => false, 'lastPaymentError' => true, + 'cancellationReason' => true, + 'canceledAt' => true, + 'metadata' => false, + 'createdAt' => false, + 'updatedAt' => false, ]; /** @@ -227,10 +233,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'object' => 'object', - 'createdAt' => 'created_at', - 'updatedAt' => 'updated_at', + 'id' => 'id', 'livemode' => 'livemode', 'amount' => 'amount', 'currency' => 'currency', @@ -239,7 +243,6 @@ public function isNullableSetToNull(string $property): bool 'clientSecret' => 'client_secret', 'customerId' => 'customer_id', 'description' => 'description', - 'metadata' => 'metadata', 'paymentMethodId' => 'payment_method_id', 'paymentMethodOptions' => 'payment_method_options', 'paymentMethodTypes' => 'payment_method_types', @@ -248,6 +251,11 @@ public function isNullableSetToNull(string $property): bool 'returnUrl' => 'return_url', 'captureMethod' => 'capture_method', 'lastPaymentError' => 'last_payment_error', + 'cancellationReason' => 'cancellation_reason', + 'canceledAt' => 'canceled_at', + 'metadata' => 'metadata', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', ]; /** @@ -256,10 +264,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'object' => 'setObject', - 'createdAt' => 'setCreatedAt', - 'updatedAt' => 'setUpdatedAt', + 'id' => 'setId', 'livemode' => 'setLivemode', 'amount' => 'setAmount', 'currency' => 'setCurrency', @@ -268,7 +274,6 @@ public function isNullableSetToNull(string $property): bool 'clientSecret' => 'setClientSecret', 'customerId' => 'setCustomerId', 'description' => 'setDescription', - 'metadata' => 'setMetadata', 'paymentMethodId' => 'setPaymentMethodId', 'paymentMethodOptions' => 'setPaymentMethodOptions', 'paymentMethodTypes' => 'setPaymentMethodTypes', @@ -277,6 +282,11 @@ public function isNullableSetToNull(string $property): bool 'returnUrl' => 'setReturnUrl', 'captureMethod' => 'setCaptureMethod', 'lastPaymentError' => 'setLastPaymentError', + 'cancellationReason' => 'setCancellationReason', + 'canceledAt' => 'setCanceledAt', + 'metadata' => 'setMetadata', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', ]; /** @@ -285,10 +295,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'object' => 'getObject', - 'createdAt' => 'getCreatedAt', - 'updatedAt' => 'getUpdatedAt', + 'id' => 'getId', 'livemode' => 'getLivemode', 'amount' => 'getAmount', 'currency' => 'getCurrency', @@ -297,7 +305,6 @@ public function isNullableSetToNull(string $property): bool 'clientSecret' => 'getClientSecret', 'customerId' => 'getCustomerId', 'description' => 'getDescription', - 'metadata' => 'getMetadata', 'paymentMethodId' => 'getPaymentMethodId', 'paymentMethodOptions' => 'getPaymentMethodOptions', 'paymentMethodTypes' => 'getPaymentMethodTypes', @@ -306,6 +313,11 @@ public function isNullableSetToNull(string $property): bool 'returnUrl' => 'getReturnUrl', 'captureMethod' => 'getCaptureMethod', 'lastPaymentError' => 'getLastPaymentError', + 'cancellationReason' => 'getCancellationReason', + 'canceledAt' => 'getCanceledAt', + 'metadata' => 'getMetadata', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', ]; /** @@ -378,10 +390,8 @@ public function getObjectAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('object', $data ?? [], 'payment_flow'); - $this->setIfExists('createdAt', $data ?? [], null); - $this->setIfExists('updatedAt', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); $this->setIfExists('currency', $data ?? [], null); @@ -390,7 +400,6 @@ public function __construct(?array $data = null) $this->setIfExists('clientSecret', $data ?? [], null); $this->setIfExists('customerId', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('paymentMethodId', $data ?? [], null); $this->setIfExists('paymentMethodOptions', $data ?? [], null); $this->setIfExists('paymentMethodTypes', $data ?? [], null); @@ -399,6 +408,11 @@ public function __construct(?array $data = null) $this->setIfExists('returnUrl', $data ?? [], null); $this->setIfExists('captureMethod', $data ?? [], null); $this->setIfExists('lastPaymentError', $data ?? [], null); + $this->setIfExists('cancellationReason', $data ?? [], null); + $this->setIfExists('canceledAt', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('updatedAt', $data ?? [], null); } /** @@ -428,9 +442,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } $allowedValues = $this->getObjectAllowableValues(); if (! is_null($this->container['object']) && ! in_array($this->container['object'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -440,11 +451,8 @@ public function listInvalidProperties() ); } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['updatedAt'] === null) { - $invalidProperties[] = "'updatedAt' can't be null"; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; } if ($this->container['livemode'] === null) { $invalidProperties[] = "'livemode' can't be null"; @@ -470,9 +478,6 @@ public function listInvalidProperties() if ($this->container['description'] === null) { $invalidProperties[] = "'description' can't be null"; } - if ($this->container['metadata'] === null) { - $invalidProperties[] = "'metadata' can't be null"; - } if ($this->container['paymentMethodId'] === null) { $invalidProperties[] = "'paymentMethodId' can't be null"; } @@ -497,6 +502,21 @@ public function listInvalidProperties() if ($this->container['lastPaymentError'] === null) { $invalidProperties[] = "'lastPaymentError' can't be null"; } + if ($this->container['cancellationReason'] === null) { + $invalidProperties[] = "'cancellationReason' can't be null"; + } + if ($this->container['canceledAt'] === null) { + $invalidProperties[] = "'canceledAt' can't be null"; + } + if ($this->container['metadata'] === null) { + $invalidProperties[] = "'metadata' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } return $invalidProperties; } @@ -513,37 +533,6 @@ public function valid() } - /** - * Gets id - * - * @return string - */ - public function getId(): string - { - if ($this->container['id'] === null) { - throw new \LogicException('Property "id" is required but has not been set.'); - } - - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id 支払いフローID - * - * @return self - */ - public function setId(string $id): self - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets object * @@ -582,63 +571,32 @@ public function setObject(?string $object): self } /** - * Gets createdAt - * - * @return \DateTime - */ - public function getCreatedAt(): \DateTime - { - if ($this->container['createdAt'] === null) { - throw new \LogicException('Property "createdAt" is required but has not been set.'); - } - - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) - * - * @return self - */ - public function setCreatedAt(\DateTime $createdAt): self - { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets updatedAt + * Gets id * - * @return \DateTime + * @return string */ - public function getUpdatedAt(): \DateTime + public function getId(): string { - if ($this->container['updatedAt'] === null) { - throw new \LogicException('Property "updatedAt" is required but has not been set.'); + if ($this->container['id'] === null) { + throw new \LogicException('Property "id" is required but has not been set.'); } - return $this->container['updatedAt']; + return $this->container['id']; } /** - * Sets updatedAt + * Sets id * - * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) + * @param string $id 支払いフロー ID * * @return self */ - public function setUpdatedAt(\DateTime $updatedAt): self + public function setId(string $id): self { - if (is_null($updatedAt)) { - throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['updatedAt'] = $updatedAt; + $this->container['id'] = $id; return $this; } @@ -821,7 +779,7 @@ public function getClientSecret(): string /** * Sets clientSecret * - * @param string $clientSecret このPaymentFlowのクライアントシークレットです。フロントエンドで公開APIキーと合わせて使用しPaymentFlowの情報を取得や支払い処理を行います。**この値はこのPaymentFlowの支払いを行う顧客以外へ公開しないでください。**また保存やログへの記録なども行わないでください。 + * @param string $clientSecret この PaymentFlow のクライアントシークレットです。フロントエンドで公開 API キーと合わせて使用し PaymentFlow の情報を取得や支払い処理を行います。**この値はこの PaymentFlow の支払いを行う顧客以外へ公開しないでください。**また保存やログへの記録なども行わないでください。 * * @return self */ @@ -903,37 +861,6 @@ public function setDescription(?string $description): self return $this; } - /** - * Gets metadata - * - * @return array - */ - public function getMetadata(): array - { - if ($this->container['metadata'] === null) { - throw new \LogicException('Property "metadata" is required but has not been set.'); - } - - return $this->container['metadata']; - } - - /** - * Sets metadata - * - * @param array $metadata メタデータ - * - * @return self - */ - public function setMetadata(array $metadata): self - { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } - $this->container['metadata'] = $metadata; - - return $this; - } - /** * Gets paymentMethodId * @@ -1019,7 +946,7 @@ public function getPaymentMethodTypes(): array /** * Sets paymentMethodTypes * - * @param \PAYJPV2\Model\PaymentMethodTypes[] $paymentMethodTypes このPaymentFlowで使用できる支払い方法の種類のリスト + * @param \PAYJPV2\Model\PaymentMethodTypes[] $paymentMethodTypes この PaymentFlow で使用できる支払い方法の種類のリスト * * @return self */ @@ -1050,7 +977,7 @@ public function getStatus(): \PAYJPV2\Model\PaymentFlowStatus /** * Sets status * - * @param \PAYJPV2\Model\PaymentFlowStatus $status このPaymentFlowのステータス。ステータスの詳細についてはこちらをご覧ください。 | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **requires_capture**: 確定が必要です。 | | **canceled**: キャンセルされました。 | | **succeeded**: 成功しました。 | + * @param \PAYJPV2\Model\PaymentFlowStatus $status この PaymentFlow のステータス。ステータスの詳細についてはこちらをご覧ください。 | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **requires_capture**: 確定が必要です。 | | **canceled**: キャンセルされました。 | | **succeeded**: 成功しました。 | * * @return self */ @@ -1149,7 +1076,7 @@ public function getCaptureMethod(): \PAYJPV2\Model\CaptureMethod /** * Sets captureMethod * - * @param \PAYJPV2\Model\CaptureMethod $captureMethod 支払いの確定方法 | 指定できる値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | + * @param \PAYJPV2\Model\CaptureMethod $captureMethod 支払いの確定方法 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | * * @return self */ @@ -1196,6 +1123,167 @@ public function setLastPaymentError(?array $lastPaymentError): self return $this; } + + /** + * Gets cancellationReason + * + * @return \PAYJPV2\Model\PaymentFlowCancellationReason|null + */ + public function getCancellationReason(): ?\PAYJPV2\Model\PaymentFlowCancellationReason + { + return $this->container['cancellationReason']; + } + + /** + * Sets cancellationReason + * + * @param \PAYJPV2\Model\PaymentFlowCancellationReason|null $cancellationReason cancellationReason + * + * @return self + */ + public function setCancellationReason(?\PAYJPV2\Model\PaymentFlowCancellationReason $cancellationReason): self + { + if (is_null($cancellationReason)) { + array_push($this->openAPINullablesSetToNull, 'cancellationReason'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('cancellationReason', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['cancellationReason'] = $cancellationReason; + + return $this; + } + + /** + * Gets canceledAt + * + * @return \DateTime|null + */ + public function getCanceledAt(): ?\DateTime + { + return $this->container['canceledAt']; + } + + /** + * Sets canceledAt + * + * @param \DateTime|null $canceledAt canceledAt + * + * @return self + */ + public function setCanceledAt(?\DateTime $canceledAt): self + { + if (is_null($canceledAt)) { + array_push($this->openAPINullablesSetToNull, 'canceledAt'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('canceledAt', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['canceledAt'] = $canceledAt; + + return $this; + } + + /** + * Gets metadata + * + * @return array + */ + public function getMetadata(): array + { + if ($this->container['metadata'] === null) { + throw new \LogicException('Property "metadata" is required but has not been set.'); + } + + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array $metadata メタデータ + * + * @return self + */ + public function setMetadata(array $metadata): self + { + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + } + $this->container['metadata'] = $metadata; + + return $this; + } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt(): \DateTime + { + if ($this->container['createdAt'] === null) { + throw new \LogicException('Property "createdAt" is required but has not been set.'); + } + + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setCreatedAt(\DateTime $createdAt): self + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return \DateTime + */ + public function getUpdatedAt(): \DateTime + { + if ($this->container['updatedAt'] === null) { + throw new \LogicException('Property "updatedAt" is required but has not been set.'); + } + + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setUpdatedAt(\DateTime $updatedAt): self + { + if (is_null($updatedAt)) { + throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + } + $this->container['updatedAt'] = $updatedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/PaymentFlowUpdateRequest.php b/lib/Model/PaymentFlowUpdateRequest.php index cac9bae..092ac5e 100644 --- a/lib/Model/PaymentFlowUpdateRequest.php +++ b/lib/Model/PaymentFlowUpdateRequest.php @@ -395,7 +395,7 @@ public function getCustomerId(): ?string /** * Sets customerId * - * @param string|null $customerId このPaymentFlowに関連付ける顧客のID + * @param string|null $customerId この PaymentFlow に関連付ける顧客の ID * * @return self */ @@ -422,7 +422,7 @@ public function getPaymentMethodId(): ?string /** * Sets paymentMethodId * - * @param string|null $paymentMethodId 支払い方法ID。customer_idの指定が必須です。Customerが所持するPaymentMethodのみ指定できます。payment_method_idを指定せず、Customerにdefault_payment_method_idが設定されている場合はそちらが自動でセットされます。 + * @param string|null $paymentMethodId 支払い方法 ID。customer_id の指定が必須です。Customer が所持する PaymentMethod のみ指定できます。payment_method_id を指定せず、Customer に default_payment_method_id が設定されている場合はそちらが自動でセットされます。 * * @return self */ @@ -449,7 +449,7 @@ public function getPaymentMethodOptions(): ?\PAYJPV2\Model\PaymentFlowPaymentMet /** * Sets paymentMethodOptions * - * @param \PAYJPV2\Model\PaymentFlowPaymentMethodOptionsRequest|null $paymentMethodOptions このPaymentFlow固有の支払い方法の設定 + * @param \PAYJPV2\Model\PaymentFlowPaymentMethodOptionsRequest|null $paymentMethodOptions この PaymentFlow 固有の支払い方法の設定 * * @return self */ @@ -476,7 +476,7 @@ public function getPaymentMethodTypes(): ?array /** * Sets paymentMethodTypes * - * @param \PAYJPV2\Model\PaymentMethodTypes[]|null $paymentMethodTypes このPaymentFlowで使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JPは支払い方法の設定から利用可能な支払い方法を動的に表示します。 + * @param \PAYJPV2\Model\PaymentMethodTypes[]|null $paymentMethodTypes この PaymentFlow で使用できる支払い方法の種類のリスト。指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 * * @return self */ @@ -503,7 +503,7 @@ public function getReturnUrl(): ?string /** * Sets returnUrl * - * @param string|null $returnUrl 顧客が支払いを完了後かキャンセルした後にリダイレクトされるURL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。 + * @param string|null $returnUrl 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。 * * @return self */ @@ -557,7 +557,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ diff --git a/lib/Model/PaymentMethodApplePayCreateRequest.php b/lib/Model/PaymentMethodApplePayCreateRequest.php index 01c0845..33e9464 100644 --- a/lib/Model/PaymentMethodApplePayCreateRequest.php +++ b/lib/Model/PaymentMethodApplePayCreateRequest.php @@ -360,7 +360,7 @@ public function getCustomerId(): ?string /** * Sets customerId * - * @param string|null $customerId 顧客ID + * @param string|null $customerId 顧客 ID * * @return self */ @@ -414,7 +414,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ @@ -445,7 +445,7 @@ public function getType(): string /** * Sets type * - * @param string $type Apple Pay決済の場合は `apple_pay` を指定します。 + * @param string $type Apple Pay 決済の場合は `apple_pay` を指定します。 * * @return self */ @@ -486,7 +486,7 @@ public function getToken(): string /** * Sets token * - * @param string $token Apple Payのトークン + * @param string $token Apple Pay のトークン * * @return self */ diff --git a/lib/Model/PaymentMethodApplePayUpdateRequest.php b/lib/Model/PaymentMethodApplePayUpdateRequest.php index 8d39ba7..8b70f3b 100644 --- a/lib/Model/PaymentMethodApplePayUpdateRequest.php +++ b/lib/Model/PaymentMethodApplePayUpdateRequest.php @@ -369,7 +369,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ @@ -400,7 +400,7 @@ public function getType(): string /** * Sets type * - * @param string $type Apple Pay決済の場合は `apple_pay` を指定します。 + * @param string $type Apple Pay 決済の場合は `apple_pay` を指定します。 * * @return self */ diff --git a/lib/Model/PaymentMethodAttachRequest.php b/lib/Model/PaymentMethodAttachRequest.php index 47a63e3..fb5d72d 100644 --- a/lib/Model/PaymentMethodAttachRequest.php +++ b/lib/Model/PaymentMethodAttachRequest.php @@ -311,7 +311,7 @@ public function getCustomerId(): string /** * Sets customerId * - * @param string $customerId 顧客ID + * @param string $customerId 顧客 ID * * @return self */ diff --git a/lib/Model/PaymentMethodCardCreateRequest.php b/lib/Model/PaymentMethodCardCreateRequest.php index ef462ff..2fb5260 100644 --- a/lib/Model/PaymentMethodCardCreateRequest.php +++ b/lib/Model/PaymentMethodCardCreateRequest.php @@ -363,7 +363,7 @@ public function getCustomerId(): ?string /** * Sets customerId * - * @param string|null $customerId 顧客ID + * @param string|null $customerId 顧客 ID * * @return self */ @@ -421,7 +421,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ diff --git a/lib/Model/PaymentMethodCardDetailsResponse.php b/lib/Model/PaymentMethodCardDetailsResponse.php index 8d2c3dc..ce357c8 100644 --- a/lib/Model/PaymentMethodCardDetailsResponse.php +++ b/lib/Model/PaymentMethodCardDetailsResponse.php @@ -485,7 +485,7 @@ public function getFingerprint(): string /** * Sets fingerprint * - * @param string $fingerprint fingerprint + * @param string $fingerprint このクレジットカード番号に紐づく値。同一番号のカードからは同一の値が生成されることが保証されています。 * * @return self */ diff --git a/lib/Model/PaymentMethodCardResponse.php b/lib/Model/PaymentMethodCardResponse.php index 48a6c56..23a85a5 100644 --- a/lib/Model/PaymentMethodCardResponse.php +++ b/lib/Model/PaymentMethodCardResponse.php @@ -60,13 +60,13 @@ class PaymentMethodCardResponse implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPITypes = [ 'object' => 'string', 'id' => 'string', + 'livemode' => 'bool', 'type' => 'string', 'customerId' => 'string', 'detachedAt' => '\DateTime', - 'livemode' => 'bool', + 'metadata' => 'array', 'createdAt' => '\DateTime', 'updatedAt' => '\DateTime', - 'metadata' => 'array', 'billingDetails' => '\PAYJPV2\Model\PaymentMethodBillingDetailsResponse', 'card' => '\PAYJPV2\Model\PaymentMethodCardDetailsResponse', ]; @@ -81,13 +81,13 @@ class PaymentMethodCardResponse implements ModelInterface, ArrayAccess, \JsonSer protected static $openAPIFormats = [ 'object' => null, 'id' => null, + 'livemode' => null, 'type' => null, 'customerId' => null, 'detachedAt' => 'date-time', - 'livemode' => null, + 'metadata' => null, 'createdAt' => 'date-time', 'updatedAt' => 'date-time', - 'metadata' => null, 'billingDetails' => null, 'card' => null, ]; @@ -100,13 +100,13 @@ class PaymentMethodCardResponse implements ModelInterface, ArrayAccess, \JsonSer protected static array $openAPINullables = [ 'object' => false, 'id' => false, + 'livemode' => false, 'type' => false, 'customerId' => true, 'detachedAt' => true, - 'livemode' => false, + 'metadata' => false, 'createdAt' => false, 'updatedAt' => false, - 'metadata' => false, 'billingDetails' => false, 'card' => false, ]; @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'object' => 'object', 'id' => 'id', + 'livemode' => 'livemode', 'type' => 'type', 'customerId' => 'customer_id', 'detachedAt' => 'detached_at', - 'livemode' => 'livemode', + 'metadata' => 'metadata', 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', - 'metadata' => 'metadata', 'billingDetails' => 'billing_details', 'card' => 'card', ]; @@ -218,13 +218,13 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'object' => 'setObject', 'id' => 'setId', + 'livemode' => 'setLivemode', 'type' => 'setType', 'customerId' => 'setCustomerId', 'detachedAt' => 'setDetachedAt', - 'livemode' => 'setLivemode', + 'metadata' => 'setMetadata', 'createdAt' => 'setCreatedAt', 'updatedAt' => 'setUpdatedAt', - 'metadata' => 'setMetadata', 'billingDetails' => 'setBillingDetails', 'card' => 'setCard', ]; @@ -237,13 +237,13 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'object' => 'getObject', 'id' => 'getId', + 'livemode' => 'getLivemode', 'type' => 'getType', 'customerId' => 'getCustomerId', 'detachedAt' => 'getDetachedAt', - 'livemode' => 'getLivemode', + 'metadata' => 'getMetadata', 'createdAt' => 'getCreatedAt', 'updatedAt' => 'getUpdatedAt', - 'metadata' => 'getMetadata', 'billingDetails' => 'getBillingDetails', 'card' => 'getCard', ]; @@ -335,13 +335,13 @@ public function __construct(?array $data = null) { $this->setIfExists('object', $data ?? [], 'payment_method'); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('customerId', $data ?? [], null); $this->setIfExists('detachedAt', $data ?? [], null); - $this->setIfExists('livemode', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('createdAt', $data ?? [], null); $this->setIfExists('updatedAt', $data ?? [], null); - $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('billingDetails', $data ?? [], null); $this->setIfExists('card', $data ?? [], null); } @@ -385,6 +385,9 @@ public function listInvalidProperties() if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['livemode'] === null) { + $invalidProperties[] = "'livemode' can't be null"; + } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -403,8 +406,8 @@ public function listInvalidProperties() if ($this->container['detachedAt'] === null) { $invalidProperties[] = "'detachedAt' can't be null"; } - if ($this->container['livemode'] === null) { - $invalidProperties[] = "'livemode' can't be null"; + if ($this->container['metadata'] === null) { + $invalidProperties[] = "'metadata' can't be null"; } if ($this->container['createdAt'] === null) { $invalidProperties[] = "'createdAt' can't be null"; @@ -412,9 +415,6 @@ public function listInvalidProperties() if ($this->container['updatedAt'] === null) { $invalidProperties[] = "'updatedAt' can't be null"; } - if ($this->container['metadata'] === null) { - $invalidProperties[] = "'metadata' can't be null"; - } if ($this->container['billingDetails'] === null) { $invalidProperties[] = "'billingDetails' can't be null"; } @@ -505,6 +505,37 @@ public function setId(string $id): self return $this; } + /** + * Gets livemode + * + * @return bool + */ + public function getLivemode(): bool + { + if ($this->container['livemode'] === null) { + throw new \LogicException('Property "livemode" is required but has not been set.'); + } + + return $this->container['livemode']; + } + + /** + * Sets livemode + * + * @param bool $livemode 本番環境かどうか + * + * @return self + */ + public function setLivemode(bool $livemode): self + { + if (is_null($livemode)) { + throw new \InvalidArgumentException('non-nullable livemode cannot be null'); + } + $this->container['livemode'] = $livemode; + + return $this; + } + /** * Gets type * @@ -615,32 +646,32 @@ public function setDetachedAt(?\DateTime $detachedAt): self } /** - * Gets livemode + * Gets metadata * - * @return bool + * @return array */ - public function getLivemode(): bool + public function getMetadata(): array { - if ($this->container['livemode'] === null) { - throw new \LogicException('Property "livemode" is required but has not been set.'); + if ($this->container['metadata'] === null) { + throw new \LogicException('Property "metadata" is required but has not been set.'); } - return $this->container['livemode']; + return $this->container['metadata']; } /** - * Sets livemode + * Sets metadata * - * @param bool $livemode 本番環境かどうか + * @param array $metadata メタデータ * * @return self */ - public function setLivemode(bool $livemode): self + public function setMetadata(array $metadata): self { - if (is_null($livemode)) { - throw new \InvalidArgumentException('non-nullable livemode cannot be null'); + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); } - $this->container['livemode'] = $livemode; + $this->container['metadata'] = $metadata; return $this; } @@ -707,37 +738,6 @@ public function setUpdatedAt(\DateTime $updatedAt): self return $this; } - /** - * Gets metadata - * - * @return array - */ - public function getMetadata(): array - { - if ($this->container['metadata'] === null) { - throw new \LogicException('Property "metadata" is required but has not been set.'); - } - - return $this->container['metadata']; - } - - /** - * Sets metadata - * - * @param array $metadata メタデータ - * - * @return self - */ - public function setMetadata(array $metadata): self - { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } - $this->container['metadata'] = $metadata; - - return $this; - } - /** * Gets billingDetails * diff --git a/lib/Model/PaymentMethodCardUpdateRequest.php b/lib/Model/PaymentMethodCardUpdateRequest.php index c692c07..835cc37 100644 --- a/lib/Model/PaymentMethodCardUpdateRequest.php +++ b/lib/Model/PaymentMethodCardUpdateRequest.php @@ -369,7 +369,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ diff --git a/lib/Model/PaymentMethodConfigurationDetailsResponse.php b/lib/Model/PaymentMethodConfigurationDetailsResponse.php index c831e9f..2483d7c 100644 --- a/lib/Model/PaymentMethodConfigurationDetailsResponse.php +++ b/lib/Model/PaymentMethodConfigurationDetailsResponse.php @@ -58,10 +58,10 @@ class PaymentMethodConfigurationDetailsResponse implements ModelInterface, Array * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', 'object' => 'string', - 'active' => 'bool', + 'id' => 'string', 'livemode' => 'bool', + 'active' => 'bool', 'name' => 'string', 'paypay' => '\PAYJPV2\Model\PaymentMethodConfigurationSettingResponse', 'card' => '\PAYJPV2\Model\PaymentMethodConfigurationSettingResponse', @@ -75,10 +75,10 @@ class PaymentMethodConfigurationDetailsResponse implements ModelInterface, Array * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'object' => null, - 'active' => null, + 'id' => null, 'livemode' => null, + 'active' => null, 'name' => null, 'paypay' => null, 'card' => null, @@ -90,10 +90,10 @@ class PaymentMethodConfigurationDetailsResponse implements ModelInterface, Array * @var bool[] */ protected static array $openAPINullables = [ - 'id' => false, 'object' => false, - 'active' => false, + 'id' => false, 'livemode' => false, + 'active' => false, 'name' => true, 'paypay' => false, 'card' => false, @@ -185,10 +185,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'object' => 'object', - 'active' => 'active', + 'id' => 'id', 'livemode' => 'livemode', + 'active' => 'active', 'name' => 'name', 'paypay' => 'paypay', 'card' => 'card', @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'object' => 'setObject', - 'active' => 'setActive', + 'id' => 'setId', 'livemode' => 'setLivemode', + 'active' => 'setActive', 'name' => 'setName', 'paypay' => 'setPaypay', 'card' => 'setCard', @@ -215,10 +215,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'object' => 'getObject', - 'active' => 'getActive', + 'id' => 'getId', 'livemode' => 'getLivemode', + 'active' => 'getActive', 'name' => 'getName', 'paypay' => 'getPaypay', 'card' => 'getCard', @@ -294,10 +294,10 @@ public function getObjectAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('object', $data ?? [], 'payment_method_configuration'); - $this->setIfExists('active', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('livemode', $data ?? [], null); + $this->setIfExists('active', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('paypay', $data ?? [], null); $this->setIfExists('card', $data ?? [], null); @@ -330,9 +330,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } $allowedValues = $this->getObjectAllowableValues(); if (! is_null($this->container['object']) && ! in_array($this->container['object'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -342,12 +339,15 @@ public function listInvalidProperties() ); } - if ($this->container['active'] === null) { - $invalidProperties[] = "'active' can't be null"; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; } if ($this->container['livemode'] === null) { $invalidProperties[] = "'livemode' can't be null"; } + if ($this->container['active'] === null) { + $invalidProperties[] = "'active' can't be null"; + } if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } @@ -373,37 +373,6 @@ public function valid() } - /** - * Gets id - * - * @return string - */ - public function getId(): string - { - if ($this->container['id'] === null) { - throw new \LogicException('Property "id" is required but has not been set.'); - } - - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID - * - * @return self - */ - public function setId(string $id): self - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets object * @@ -442,32 +411,32 @@ public function setObject(?string $object): self } /** - * Gets active + * Gets id * - * @return bool + * @return string */ - public function getActive(): bool + public function getId(): string { - if ($this->container['active'] === null) { - throw new \LogicException('Property "active" is required but has not been set.'); + if ($this->container['id'] === null) { + throw new \LogicException('Property "id" is required but has not been set.'); } - return $this->container['active']; + return $this->container['id']; } /** - * Sets active + * Sets id * - * @param bool $active 設定が有効かどうか。 + * @param string $id 支払い方法設定 ID * * @return self */ - public function setActive(bool $active): self + public function setId(string $id): self { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['active'] = $active; + $this->container['id'] = $id; return $this; } @@ -503,6 +472,37 @@ public function setLivemode(bool $livemode): self return $this; } + /** + * Gets active + * + * @return bool + */ + public function getActive(): bool + { + if ($this->container['active'] === null) { + throw new \LogicException('Property "active" is required but has not been set.'); + } + + return $this->container['active']; + } + + /** + * Sets active + * + * @param bool $active 設定が有効かどうか + * + * @return self + */ + public function setActive(bool $active): self + { + if (is_null($active)) { + throw new \InvalidArgumentException('non-nullable active cannot be null'); + } + $this->container['active'] = $active; + + return $this; + } + /** * Gets name * @@ -554,7 +554,7 @@ public function getPaypay(): \PAYJPV2\Model\PaymentMethodConfigurationSettingRes /** * Sets paypay * - * @param \PAYJPV2\Model\PaymentMethodConfigurationSettingResponse $paypay PayPayの設定 + * @param \PAYJPV2\Model\PaymentMethodConfigurationSettingResponse $paypay PayPay の設定 * * @return self */ diff --git a/lib/Model/PaymentMethodConfigurationDisplayPreference.php b/lib/Model/PaymentMethodConfigurationDisplayPreference.php index ad3fc82..7a99fe2 100644 --- a/lib/Model/PaymentMethodConfigurationDisplayPreference.php +++ b/lib/Model/PaymentMethodConfigurationDisplayPreference.php @@ -360,7 +360,7 @@ public function getPreference(): ?string /** * Sets preference * - * @param string|null $preference この支払い方法がアカウントで有効になっているかどうか。 | 指定できる値 | |:---| | **on**: この決済手段を決済画面に表示する | | **off**: この決済手段を決済画面に表示しない | | **none**: デフォルト設定を使用 | + * @param string|null $preference この支払い方法がアカウントで有効になっているかどうか | 値 | |:---| | **on**: この決済手段を決済画面に表示する | | **off**: この決済手段を決済画面に表示しない | | **none**: デフォルト設定を使用 | * * @return self */ @@ -397,7 +397,7 @@ public function getValue(): ?string /** * Sets value * - * @param string|null $value この支払い方法を決済画面に表示するかどうか。 | 指定できる値 | |:---| | **on**: この決済手段を決済画面に表示する | | **off**: この決済手段を決済画面に表示しない | + * @param string|null $value この支払い方法を決済画面に表示するかどうか。 | 値 | |:---| | **on**: この決済手段を決済画面に表示する | | **off**: この決済手段を決済画面に表示しない | * * @return self */ diff --git a/lib/Model/PaymentMethodConfigurationSettingResponse.php b/lib/Model/PaymentMethodConfigurationSettingResponse.php index 26ee2f2..16647b8 100644 --- a/lib/Model/PaymentMethodConfigurationSettingResponse.php +++ b/lib/Model/PaymentMethodConfigurationSettingResponse.php @@ -337,7 +337,7 @@ public function getDisplayPreference(): ?\PAYJPV2\Model\PaymentMethodConfigurati /** * Sets displayPreference * - * @param \PAYJPV2\Model\PaymentMethodConfigurationDisplayPreference|null $displayPreference 支払い方法の表示設定。 + * @param \PAYJPV2\Model\PaymentMethodConfigurationDisplayPreference|null $displayPreference 支払い方法の表示設定 * * @return self */ diff --git a/lib/Model/PaymentMethodCreateRequest.php b/lib/Model/PaymentMethodCreateRequest.php index 83b82dc..22f03ff 100644 --- a/lib/Model/PaymentMethodCreateRequest.php +++ b/lib/Model/PaymentMethodCreateRequest.php @@ -380,7 +380,7 @@ public function getCustomerId(): ?string /** * Sets customerId * - * @param string|null $customerId 顧客ID + * @param string|null $customerId 顧客 ID * * @return self */ @@ -438,7 +438,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ @@ -541,7 +541,7 @@ public function getToken(): string /** * Sets token * - * @param string $token Apple Payのトークン + * @param string $token Apple Pay のトークン * * @return self */ diff --git a/lib/Model/PaymentMethodPayPayCreateRequest.php b/lib/Model/PaymentMethodPayPayCreateRequest.php index 79ba63f..ecd4898 100644 --- a/lib/Model/PaymentMethodPayPayCreateRequest.php +++ b/lib/Model/PaymentMethodPayPayCreateRequest.php @@ -349,7 +349,7 @@ public function getCustomerId(): ?string /** * Sets customerId * - * @param string|null $customerId 顧客ID + * @param string|null $customerId 顧客 ID * * @return self */ @@ -403,7 +403,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ @@ -434,7 +434,7 @@ public function getType(): string /** * Sets type * - * @param string $type PayPay決済の場合は `paypay` を指定します。 + * @param string $type PayPay 決済の場合は `paypay` を指定します。 * * @return self */ diff --git a/lib/Model/PaymentMethodPayPayResponse.php b/lib/Model/PaymentMethodPayPayResponse.php index 93907dd..08a43a4 100644 --- a/lib/Model/PaymentMethodPayPayResponse.php +++ b/lib/Model/PaymentMethodPayPayResponse.php @@ -60,13 +60,13 @@ class PaymentMethodPayPayResponse implements ModelInterface, ArrayAccess, \JsonS protected static $openAPITypes = [ 'object' => 'string', 'id' => 'string', + 'livemode' => 'bool', 'type' => 'string', 'customerId' => 'string', 'detachedAt' => '\DateTime', - 'livemode' => 'bool', + 'metadata' => 'array', 'createdAt' => '\DateTime', 'updatedAt' => '\DateTime', - 'metadata' => 'array', 'billingDetails' => '\PAYJPV2\Model\PaymentMethodBillingDetailsResponse', ]; @@ -80,13 +80,13 @@ class PaymentMethodPayPayResponse implements ModelInterface, ArrayAccess, \JsonS protected static $openAPIFormats = [ 'object' => null, 'id' => null, + 'livemode' => null, 'type' => null, 'customerId' => null, 'detachedAt' => 'date-time', - 'livemode' => null, + 'metadata' => null, 'createdAt' => 'date-time', 'updatedAt' => 'date-time', - 'metadata' => null, 'billingDetails' => null, ]; @@ -98,13 +98,13 @@ class PaymentMethodPayPayResponse implements ModelInterface, ArrayAccess, \JsonS protected static array $openAPINullables = [ 'object' => false, 'id' => false, + 'livemode' => false, 'type' => false, 'customerId' => true, 'detachedAt' => true, - 'livemode' => false, + 'metadata' => false, 'createdAt' => false, 'updatedAt' => false, - 'metadata' => false, 'billingDetails' => false, ]; @@ -196,13 +196,13 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'object' => 'object', 'id' => 'id', + 'livemode' => 'livemode', 'type' => 'type', 'customerId' => 'customer_id', 'detachedAt' => 'detached_at', - 'livemode' => 'livemode', + 'metadata' => 'metadata', 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', - 'metadata' => 'metadata', 'billingDetails' => 'billing_details', ]; @@ -214,13 +214,13 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'object' => 'setObject', 'id' => 'setId', + 'livemode' => 'setLivemode', 'type' => 'setType', 'customerId' => 'setCustomerId', 'detachedAt' => 'setDetachedAt', - 'livemode' => 'setLivemode', + 'metadata' => 'setMetadata', 'createdAt' => 'setCreatedAt', 'updatedAt' => 'setUpdatedAt', - 'metadata' => 'setMetadata', 'billingDetails' => 'setBillingDetails', ]; @@ -232,13 +232,13 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'object' => 'getObject', 'id' => 'getId', + 'livemode' => 'getLivemode', 'type' => 'getType', 'customerId' => 'getCustomerId', 'detachedAt' => 'getDetachedAt', - 'livemode' => 'getLivemode', + 'metadata' => 'getMetadata', 'createdAt' => 'getCreatedAt', 'updatedAt' => 'getUpdatedAt', - 'metadata' => 'getMetadata', 'billingDetails' => 'getBillingDetails', ]; @@ -327,13 +327,13 @@ public function __construct(?array $data = null) { $this->setIfExists('object', $data ?? [], 'payment_method'); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('customerId', $data ?? [], null); $this->setIfExists('detachedAt', $data ?? [], null); - $this->setIfExists('livemode', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('createdAt', $data ?? [], null); $this->setIfExists('updatedAt', $data ?? [], null); - $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('billingDetails', $data ?? [], null); } @@ -376,6 +376,9 @@ public function listInvalidProperties() if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['livemode'] === null) { + $invalidProperties[] = "'livemode' can't be null"; + } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -394,8 +397,8 @@ public function listInvalidProperties() if ($this->container['detachedAt'] === null) { $invalidProperties[] = "'detachedAt' can't be null"; } - if ($this->container['livemode'] === null) { - $invalidProperties[] = "'livemode' can't be null"; + if ($this->container['metadata'] === null) { + $invalidProperties[] = "'metadata' can't be null"; } if ($this->container['createdAt'] === null) { $invalidProperties[] = "'createdAt' can't be null"; @@ -403,9 +406,6 @@ public function listInvalidProperties() if ($this->container['updatedAt'] === null) { $invalidProperties[] = "'updatedAt' can't be null"; } - if ($this->container['metadata'] === null) { - $invalidProperties[] = "'metadata' can't be null"; - } if ($this->container['billingDetails'] === null) { $invalidProperties[] = "'billingDetails' can't be null"; } @@ -493,6 +493,37 @@ public function setId(string $id): self return $this; } + /** + * Gets livemode + * + * @return bool + */ + public function getLivemode(): bool + { + if ($this->container['livemode'] === null) { + throw new \LogicException('Property "livemode" is required but has not been set.'); + } + + return $this->container['livemode']; + } + + /** + * Sets livemode + * + * @param bool $livemode 本番環境かどうか + * + * @return self + */ + public function setLivemode(bool $livemode): self + { + if (is_null($livemode)) { + throw new \InvalidArgumentException('non-nullable livemode cannot be null'); + } + $this->container['livemode'] = $livemode; + + return $this; + } + /** * Gets type * @@ -603,32 +634,32 @@ public function setDetachedAt(?\DateTime $detachedAt): self } /** - * Gets livemode + * Gets metadata * - * @return bool + * @return array */ - public function getLivemode(): bool + public function getMetadata(): array { - if ($this->container['livemode'] === null) { - throw new \LogicException('Property "livemode" is required but has not been set.'); + if ($this->container['metadata'] === null) { + throw new \LogicException('Property "metadata" is required but has not been set.'); } - return $this->container['livemode']; + return $this->container['metadata']; } /** - * Sets livemode + * Sets metadata * - * @param bool $livemode 本番環境かどうか + * @param array $metadata メタデータ * * @return self */ - public function setLivemode(bool $livemode): self + public function setMetadata(array $metadata): self { - if (is_null($livemode)) { - throw new \InvalidArgumentException('non-nullable livemode cannot be null'); + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); } - $this->container['livemode'] = $livemode; + $this->container['metadata'] = $metadata; return $this; } @@ -695,37 +726,6 @@ public function setUpdatedAt(\DateTime $updatedAt): self return $this; } - /** - * Gets metadata - * - * @return array - */ - public function getMetadata(): array - { - if ($this->container['metadata'] === null) { - throw new \LogicException('Property "metadata" is required but has not been set.'); - } - - return $this->container['metadata']; - } - - /** - * Sets metadata - * - * @param array $metadata メタデータ - * - * @return self - */ - public function setMetadata(array $metadata): self - { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } - $this->container['metadata'] = $metadata; - - return $this; - } - /** * Gets billingDetails * diff --git a/lib/Model/PaymentMethodPayPayUpdateRequest.php b/lib/Model/PaymentMethodPayPayUpdateRequest.php index 31ba1f7..6f1da8f 100644 --- a/lib/Model/PaymentMethodPayPayUpdateRequest.php +++ b/lib/Model/PaymentMethodPayPayUpdateRequest.php @@ -369,7 +369,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ @@ -400,7 +400,7 @@ public function getType(): string /** * Sets type * - * @param string $type PayPay決済の場合は `paypay` を指定します。 + * @param string $type PayPay 決済の場合は `paypay` を指定します。 * * @return self */ diff --git a/lib/Model/PaymentMethodResponse.php b/lib/Model/PaymentMethodResponse.php index 5b9b5d9..8169f99 100644 --- a/lib/Model/PaymentMethodResponse.php +++ b/lib/Model/PaymentMethodResponse.php @@ -60,13 +60,13 @@ class PaymentMethodResponse implements ModelInterface, ArrayAccess, \JsonSeriali protected static $openAPITypes = [ 'object' => 'string', 'id' => 'string', + 'livemode' => 'bool', 'type' => 'string', 'customerId' => 'string', 'detachedAt' => '\DateTime', - 'livemode' => 'bool', + 'metadata' => 'array', 'createdAt' => '\DateTime', 'updatedAt' => '\DateTime', - 'metadata' => 'array', 'billingDetails' => '\PAYJPV2\Model\PaymentMethodBillingDetailsResponse', 'card' => '\PAYJPV2\Model\PaymentMethodCardDetailsResponse', ]; @@ -81,13 +81,13 @@ class PaymentMethodResponse implements ModelInterface, ArrayAccess, \JsonSeriali protected static $openAPIFormats = [ 'object' => null, 'id' => null, + 'livemode' => null, 'type' => null, 'customerId' => null, 'detachedAt' => 'date-time', - 'livemode' => null, + 'metadata' => null, 'createdAt' => 'date-time', 'updatedAt' => 'date-time', - 'metadata' => null, 'billingDetails' => null, 'card' => null, ]; @@ -100,13 +100,13 @@ class PaymentMethodResponse implements ModelInterface, ArrayAccess, \JsonSeriali protected static array $openAPINullables = [ 'object' => false, 'id' => false, + 'livemode' => false, 'type' => false, 'customerId' => false, 'detachedAt' => false, - 'livemode' => false, + 'metadata' => false, 'createdAt' => false, 'updatedAt' => false, - 'metadata' => false, 'billingDetails' => false, 'card' => false, ]; @@ -199,13 +199,13 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'object' => 'object', 'id' => 'id', + 'livemode' => 'livemode', 'type' => 'type', 'customerId' => 'customer_id', 'detachedAt' => 'detached_at', - 'livemode' => 'livemode', + 'metadata' => 'metadata', 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', - 'metadata' => 'metadata', 'billingDetails' => 'billing_details', 'card' => 'card', ]; @@ -218,13 +218,13 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'object' => 'setObject', 'id' => 'setId', + 'livemode' => 'setLivemode', 'type' => 'setType', 'customerId' => 'setCustomerId', 'detachedAt' => 'setDetachedAt', - 'livemode' => 'setLivemode', + 'metadata' => 'setMetadata', 'createdAt' => 'setCreatedAt', 'updatedAt' => 'setUpdatedAt', - 'metadata' => 'setMetadata', 'billingDetails' => 'setBillingDetails', 'card' => 'setCard', ]; @@ -237,13 +237,13 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'object' => 'getObject', 'id' => 'getId', + 'livemode' => 'getLivemode', 'type' => 'getType', 'customerId' => 'getCustomerId', 'detachedAt' => 'getDetachedAt', - 'livemode' => 'getLivemode', + 'metadata' => 'getMetadata', 'createdAt' => 'getCreatedAt', 'updatedAt' => 'getUpdatedAt', - 'metadata' => 'getMetadata', 'billingDetails' => 'getBillingDetails', 'card' => 'getCard', ]; @@ -337,13 +337,13 @@ public function __construct(?array $data = null) { $this->setIfExists('object', $data ?? [], 'payment_method'); $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('customerId', $data ?? [], null); $this->setIfExists('detachedAt', $data ?? [], null); - $this->setIfExists('livemode', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('createdAt', $data ?? [], null); $this->setIfExists('updatedAt', $data ?? [], null); - $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('billingDetails', $data ?? [], null); $this->setIfExists('card', $data ?? [], null); } @@ -387,6 +387,9 @@ public function listInvalidProperties() if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['livemode'] === null) { + $invalidProperties[] = "'livemode' can't be null"; + } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -405,8 +408,8 @@ public function listInvalidProperties() if ($this->container['detachedAt'] === null) { $invalidProperties[] = "'detachedAt' can't be null"; } - if ($this->container['livemode'] === null) { - $invalidProperties[] = "'livemode' can't be null"; + if ($this->container['metadata'] === null) { + $invalidProperties[] = "'metadata' can't be null"; } if ($this->container['createdAt'] === null) { $invalidProperties[] = "'createdAt' can't be null"; @@ -414,9 +417,6 @@ public function listInvalidProperties() if ($this->container['updatedAt'] === null) { $invalidProperties[] = "'updatedAt' can't be null"; } - if ($this->container['metadata'] === null) { - $invalidProperties[] = "'metadata' can't be null"; - } if ($this->container['billingDetails'] === null) { $invalidProperties[] = "'billingDetails' can't be null"; } @@ -507,6 +507,37 @@ public function setId(string $id): self return $this; } + /** + * Gets livemode + * + * @return bool + */ + public function getLivemode(): bool + { + if ($this->container['livemode'] === null) { + throw new \LogicException('Property "livemode" is required but has not been set.'); + } + + return $this->container['livemode']; + } + + /** + * Sets livemode + * + * @param bool $livemode 本番環境かどうか + * + * @return self + */ + public function setLivemode(bool $livemode): self + { + if (is_null($livemode)) { + throw new \InvalidArgumentException('non-nullable livemode cannot be null'); + } + $this->container['livemode'] = $livemode; + + return $this; + } + /** * Gets type * @@ -611,32 +642,32 @@ public function setDetachedAt(\DateTime $detachedAt): self } /** - * Gets livemode + * Gets metadata * - * @return bool + * @return array */ - public function getLivemode(): bool + public function getMetadata(): array { - if ($this->container['livemode'] === null) { - throw new \LogicException('Property "livemode" is required but has not been set.'); + if ($this->container['metadata'] === null) { + throw new \LogicException('Property "metadata" is required but has not been set.'); } - return $this->container['livemode']; + return $this->container['metadata']; } /** - * Sets livemode + * Sets metadata * - * @param bool $livemode 本番環境かどうか + * @param array $metadata メタデータ * * @return self */ - public function setLivemode(bool $livemode): self + public function setMetadata(array $metadata): self { - if (is_null($livemode)) { - throw new \InvalidArgumentException('non-nullable livemode cannot be null'); + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); } - $this->container['livemode'] = $livemode; + $this->container['metadata'] = $metadata; return $this; } @@ -703,37 +734,6 @@ public function setUpdatedAt(\DateTime $updatedAt): self return $this; } - /** - * Gets metadata - * - * @return array - */ - public function getMetadata(): array - { - if ($this->container['metadata'] === null) { - throw new \LogicException('Property "metadata" is required but has not been set.'); - } - - return $this->container['metadata']; - } - - /** - * Sets metadata - * - * @param array $metadata メタデータ - * - * @return self - */ - public function setMetadata(array $metadata): self - { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } - $this->container['metadata'] = $metadata; - - return $this; - } - /** * Gets billingDetails * diff --git a/lib/Model/PaymentMethodUpdateRequest.php b/lib/Model/PaymentMethodUpdateRequest.php index bbaf7e9..211eaf9 100644 --- a/lib/Model/PaymentMethodUpdateRequest.php +++ b/lib/Model/PaymentMethodUpdateRequest.php @@ -376,7 +376,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ diff --git a/lib/Model/PaymentRefundCreateRequest.php b/lib/Model/PaymentRefundCreateRequest.php index ac09315..19e7f48 100644 --- a/lib/Model/PaymentRefundCreateRequest.php +++ b/lib/Model/PaymentRefundCreateRequest.php @@ -60,8 +60,8 @@ class PaymentRefundCreateRequest implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPITypes = [ 'paymentFlowId' => 'string', 'amount' => 'int', - 'metadata' => 'array', 'reason' => '\PAYJPV2\Model\PaymentRefundReason', + 'metadata' => 'array', ]; /** @@ -74,8 +74,8 @@ class PaymentRefundCreateRequest implements ModelInterface, ArrayAccess, \JsonSe protected static $openAPIFormats = [ 'paymentFlowId' => null, 'amount' => null, - 'metadata' => null, 'reason' => null, + 'metadata' => null, ]; /** @@ -86,8 +86,8 @@ class PaymentRefundCreateRequest implements ModelInterface, ArrayAccess, \JsonSe protected static array $openAPINullables = [ 'paymentFlowId' => false, 'amount' => false, - 'metadata' => false, 'reason' => false, + 'metadata' => false, ]; /** @@ -178,8 +178,8 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'paymentFlowId' => 'payment_flow_id', 'amount' => 'amount', - 'metadata' => 'metadata', 'reason' => 'reason', + 'metadata' => 'metadata', ]; /** @@ -190,8 +190,8 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'paymentFlowId' => 'setPaymentFlowId', 'amount' => 'setAmount', - 'metadata' => 'setMetadata', 'reason' => 'setReason', + 'metadata' => 'setMetadata', ]; /** @@ -202,8 +202,8 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'paymentFlowId' => 'getPaymentFlowId', 'amount' => 'getAmount', - 'metadata' => 'getMetadata', 'reason' => 'getReason', + 'metadata' => 'getMetadata', ]; /** @@ -265,8 +265,8 @@ public function __construct(?array $data = null) { $this->setIfExists('paymentFlowId', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); - $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('reason', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); } /** @@ -362,7 +362,7 @@ public function getAmount(): ?int /** * Sets amount * - * @param int|null $amount 返金金額 + * @param int|null $amount 返金金額。省略すると全額返金となります。 * * @return self */ @@ -382,55 +382,55 @@ public function setAmount(?int $amount): self } /** - * Gets metadata + * Gets reason * - * @return array|null + * @return \PAYJPV2\Model\PaymentRefundReason|null */ - public function getMetadata(): ?array + public function getReason(): ?\PAYJPV2\Model\PaymentRefundReason { - return $this->container['metadata']; + return $this->container['reason']; } /** - * Sets metadata + * Sets reason * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param \PAYJPV2\Model\PaymentRefundReason|null $reason 返金理由 | 値 | |:---| | **duplicate**: 重複した支払い | | **fraudulent**: 不正な支払い | | **requested_by_customer**: 顧客の要求 | * * @return self */ - public function setMetadata(?array $metadata): self + public function setReason(?\PAYJPV2\Model\PaymentRefundReason $reason): self { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + if (is_null($reason)) { + throw new \InvalidArgumentException('non-nullable reason cannot be null'); } - $this->container['metadata'] = $metadata; + $this->container['reason'] = $reason; return $this; } /** - * Gets reason + * Gets metadata * - * @return \PAYJPV2\Model\PaymentRefundReason|null + * @return array|null */ - public function getReason(): ?\PAYJPV2\Model\PaymentRefundReason + public function getMetadata(): ?array { - return $this->container['reason']; + return $this->container['metadata']; } /** - * Sets reason + * Sets metadata * - * @param \PAYJPV2\Model\PaymentRefundReason|null $reason 返金理由 | 指定できる値 | |:---| | **duplicate**: 重複した支払い | | **fraudulent**: 不正な支払い | | **requested_by_customer**: 顧客の要求 | + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ - public function setReason(?\PAYJPV2\Model\PaymentRefundReason $reason): self + public function setMetadata(?array $metadata): self { - if (is_null($reason)) { - throw new \InvalidArgumentException('non-nullable reason cannot be null'); + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); } - $this->container['reason'] = $reason; + $this->container['metadata'] = $metadata; return $this; } diff --git a/lib/Model/PaymentRefundResponse.php b/lib/Model/PaymentRefundResponse.php index 1416cc9..bd9b033 100644 --- a/lib/Model/PaymentRefundResponse.php +++ b/lib/Model/PaymentRefundResponse.php @@ -58,16 +58,16 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', 'object' => 'string', - 'createdAt' => '\DateTime', - 'updatedAt' => '\DateTime', + 'id' => 'string', 'livemode' => 'bool', + 'paymentFlowId' => 'string', 'amount' => 'int', 'status' => '\PAYJPV2\Model\PaymentRefundStatus', - 'paymentFlowId' => 'string', 'reason' => '\PAYJPV2\Model\PaymentRefundReason', 'metadata' => 'array', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime', ]; /** @@ -78,16 +78,16 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'object' => null, - 'createdAt' => 'date-time', - 'updatedAt' => 'date-time', + 'id' => null, 'livemode' => null, + 'paymentFlowId' => null, 'amount' => null, 'status' => null, - 'paymentFlowId' => null, 'reason' => null, 'metadata' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time', ]; /** @@ -96,16 +96,16 @@ class PaymentRefundResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @var bool[] */ protected static array $openAPINullables = [ - 'id' => false, 'object' => false, - 'createdAt' => false, - 'updatedAt' => false, + 'id' => false, 'livemode' => false, + 'paymentFlowId' => false, 'amount' => false, 'status' => false, - 'paymentFlowId' => false, 'reason' => true, 'metadata' => false, + 'createdAt' => false, + 'updatedAt' => false, ]; /** @@ -194,16 +194,16 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'object' => 'object', - 'createdAt' => 'created_at', - 'updatedAt' => 'updated_at', + 'id' => 'id', 'livemode' => 'livemode', + 'paymentFlowId' => 'payment_flow_id', 'amount' => 'amount', 'status' => 'status', - 'paymentFlowId' => 'payment_flow_id', 'reason' => 'reason', 'metadata' => 'metadata', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', ]; /** @@ -212,16 +212,16 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'object' => 'setObject', - 'createdAt' => 'setCreatedAt', - 'updatedAt' => 'setUpdatedAt', + 'id' => 'setId', 'livemode' => 'setLivemode', + 'paymentFlowId' => 'setPaymentFlowId', 'amount' => 'setAmount', 'status' => 'setStatus', - 'paymentFlowId' => 'setPaymentFlowId', 'reason' => 'setReason', 'metadata' => 'setMetadata', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', ]; /** @@ -230,16 +230,16 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'object' => 'getObject', - 'createdAt' => 'getCreatedAt', - 'updatedAt' => 'getUpdatedAt', + 'id' => 'getId', 'livemode' => 'getLivemode', + 'paymentFlowId' => 'getPaymentFlowId', 'amount' => 'getAmount', 'status' => 'getStatus', - 'paymentFlowId' => 'getPaymentFlowId', 'reason' => 'getReason', 'metadata' => 'getMetadata', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', ]; /** @@ -312,16 +312,16 @@ public function getObjectAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('object', $data ?? [], 'payment_refund'); - $this->setIfExists('createdAt', $data ?? [], null); - $this->setIfExists('updatedAt', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('livemode', $data ?? [], null); + $this->setIfExists('paymentFlowId', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); $this->setIfExists('status', $data ?? [], null); - $this->setIfExists('paymentFlowId', $data ?? [], null); $this->setIfExists('reason', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('updatedAt', $data ?? [], null); } /** @@ -351,9 +351,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } $allowedValues = $this->getObjectAllowableValues(); if (! is_null($this->container['object']) && ! in_array($this->container['object'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -363,30 +360,33 @@ public function listInvalidProperties() ); } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['updatedAt'] === null) { - $invalidProperties[] = "'updatedAt' can't be null"; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; } if ($this->container['livemode'] === null) { $invalidProperties[] = "'livemode' can't be null"; } + if ($this->container['paymentFlowId'] === null) { + $invalidProperties[] = "'paymentFlowId' can't be null"; + } if ($this->container['amount'] === null) { $invalidProperties[] = "'amount' can't be null"; } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } - if ($this->container['paymentFlowId'] === null) { - $invalidProperties[] = "'paymentFlowId' can't be null"; - } if ($this->container['reason'] === null) { $invalidProperties[] = "'reason' can't be null"; } if ($this->container['metadata'] === null) { $invalidProperties[] = "'metadata' can't be null"; } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } return $invalidProperties; } @@ -403,37 +403,6 @@ public function valid() } - /** - * Gets id - * - * @return string - */ - public function getId(): string - { - if ($this->container['id'] === null) { - throw new \LogicException('Property "id" is required but has not been set.'); - } - - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id 返金対象となる PaymentFlow の ID - * - * @return self - */ - public function setId(string $id): self - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets object * @@ -472,94 +441,94 @@ public function setObject(?string $object): self } /** - * Gets createdAt + * Gets id * - * @return \DateTime + * @return string */ - public function getCreatedAt(): \DateTime + public function getId(): string { - if ($this->container['createdAt'] === null) { - throw new \LogicException('Property "createdAt" is required but has not been set.'); + if ($this->container['id'] === null) { + throw new \LogicException('Property "id" is required but has not been set.'); } - return $this->container['createdAt']; + return $this->container['id']; } /** - * Sets createdAt + * Sets id * - * @param \DateTime $createdAt 作成時の日時 (UTC, ISO 8601 形式) + * @param string $id 返金 ID * * @return self */ - public function setCreatedAt(\DateTime $createdAt): self + public function setId(string $id): self { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['createdAt'] = $createdAt; + $this->container['id'] = $id; return $this; } /** - * Gets updatedAt + * Gets livemode * - * @return \DateTime + * @return bool */ - public function getUpdatedAt(): \DateTime + public function getLivemode(): bool { - if ($this->container['updatedAt'] === null) { - throw new \LogicException('Property "updatedAt" is required but has not been set.'); + if ($this->container['livemode'] === null) { + throw new \LogicException('Property "livemode" is required but has not been set.'); } - return $this->container['updatedAt']; + return $this->container['livemode']; } /** - * Sets updatedAt + * Sets livemode * - * @param \DateTime $updatedAt 更新時の日時 (UTC, ISO 8601 形式) + * @param bool $livemode 本番環境かどうか * * @return self */ - public function setUpdatedAt(\DateTime $updatedAt): self + public function setLivemode(bool $livemode): self { - if (is_null($updatedAt)) { - throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + if (is_null($livemode)) { + throw new \InvalidArgumentException('non-nullable livemode cannot be null'); } - $this->container['updatedAt'] = $updatedAt; + $this->container['livemode'] = $livemode; return $this; } /** - * Gets livemode + * Gets paymentFlowId * - * @return bool + * @return string */ - public function getLivemode(): bool + public function getPaymentFlowId(): string { - if ($this->container['livemode'] === null) { - throw new \LogicException('Property "livemode" is required but has not been set.'); + if ($this->container['paymentFlowId'] === null) { + throw new \LogicException('Property "paymentFlowId" is required but has not been set.'); } - return $this->container['livemode']; + return $this->container['paymentFlowId']; } /** - * Sets livemode + * Sets paymentFlowId * - * @param bool $livemode 本番環境かどうか + * @param string $paymentFlowId 返金対象となる PaymentFlow の ID * * @return self */ - public function setLivemode(bool $livemode): self + public function setPaymentFlowId(string $paymentFlowId): self { - if (is_null($livemode)) { - throw new \InvalidArgumentException('non-nullable livemode cannot be null'); + if (is_null($paymentFlowId)) { + throw new \InvalidArgumentException('non-nullable paymentFlowId cannot be null'); } - $this->container['livemode'] = $livemode; + $this->container['paymentFlowId'] = $paymentFlowId; return $this; } @@ -612,7 +581,7 @@ public function getStatus(): \PAYJPV2\Model\PaymentRefundStatus /** * Sets status * - * @param \PAYJPV2\Model\PaymentRefundStatus $status 返金ステータス 返金ステータスの詳細についてはこちらを参照してください。 | 指定できる値 | |:---| | **succeeded**: 成功 | | **failed**: 失敗 | | **pending**: 保留中 | | **canceled**: キャンセル | + * @param \PAYJPV2\Model\PaymentRefundStatus $status 返金ステータス 返金ステータスの詳細についてはこちらを参照してください。 | 値 | |:---| | **succeeded**: 返金が成功しました | | **failed**: 返金が失敗しました | | **pending**: 返金処理中です | | **canceled**: 返金がキャンセルされました | | **requires_action**: 追加のアクションが必要です | * * @return self */ @@ -626,37 +595,6 @@ public function setStatus(\PAYJPV2\Model\PaymentRefundStatus $status): self return $this; } - /** - * Gets paymentFlowId - * - * @return string - */ - public function getPaymentFlowId(): string - { - if ($this->container['paymentFlowId'] === null) { - throw new \LogicException('Property "paymentFlowId" is required but has not been set.'); - } - - return $this->container['paymentFlowId']; - } - - /** - * Sets paymentFlowId - * - * @param string $paymentFlowId 返金対象となる PaymentFlow の ID - * - * @return self - */ - public function setPaymentFlowId(string $paymentFlowId): self - { - if (is_null($paymentFlowId)) { - throw new \InvalidArgumentException('non-nullable paymentFlowId cannot be null'); - } - $this->container['paymentFlowId'] = $paymentFlowId; - - return $this; - } - /** * Gets reason * @@ -721,6 +659,68 @@ public function setMetadata(array $metadata): self return $this; } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt(): \DateTime + { + if ($this->container['createdAt'] === null) { + throw new \LogicException('Property "createdAt" is required but has not been set.'); + } + + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setCreatedAt(\DateTime $createdAt): self + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return \DateTime + */ + public function getUpdatedAt(): \DateTime + { + if ($this->container['updatedAt'] === null) { + throw new \LogicException('Property "updatedAt" is required but has not been set.'); + } + + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setUpdatedAt(\DateTime $updatedAt): self + { + if (is_null($updatedAt)) { + throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + } + $this->container['updatedAt'] = $updatedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/PaymentRefundUpdateRequest.php b/lib/Model/PaymentRefundUpdateRequest.php index 5086451..316b373 100644 --- a/lib/Model/PaymentRefundUpdateRequest.php +++ b/lib/Model/PaymentRefundUpdateRequest.php @@ -303,7 +303,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ diff --git a/lib/Model/PaymentTransactionListResponse.php b/lib/Model/PaymentTransactionListResponse.php index 3f91a91..e6ccfce 100644 --- a/lib/Model/PaymentTransactionListResponse.php +++ b/lib/Model/PaymentTransactionListResponse.php @@ -459,7 +459,7 @@ public function getData(): array /** * Sets data * - * @param \PAYJPV2\Model\PaymentTransactionResponse[] $data PaymentTransaction一覧 + * @param \PAYJPV2\Model\PaymentTransactionResponse[] $data PaymentTransaction 一覧 * * @return self */ diff --git a/lib/Model/PaymentTransactionResponse.php b/lib/Model/PaymentTransactionResponse.php index 976685b..f684ec9 100644 --- a/lib/Model/PaymentTransactionResponse.php +++ b/lib/Model/PaymentTransactionResponse.php @@ -58,10 +58,8 @@ class PaymentTransactionResponse implements ModelInterface, ArrayAccess, \JsonSe * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', 'object' => 'string', - 'createdAt' => '\DateTime', - 'updatedAt' => '\DateTime', + 'id' => 'string', 'livemode' => 'bool', 'resourceId' => 'string', 'amount' => 'int', @@ -71,6 +69,8 @@ class PaymentTransactionResponse implements ModelInterface, ArrayAccess, \JsonSe 'type' => '\PAYJPV2\Model\PaymentTransactionType', 'paymentMethodType' => '\PAYJPV2\Model\PaymentMethodTypes', 'termId' => 'string', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime', ]; /** @@ -81,10 +81,8 @@ class PaymentTransactionResponse implements ModelInterface, ArrayAccess, \JsonSe * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'object' => null, - 'createdAt' => 'date-time', - 'updatedAt' => 'date-time', + 'id' => null, 'livemode' => null, 'resourceId' => null, 'amount' => null, @@ -94,6 +92,8 @@ class PaymentTransactionResponse implements ModelInterface, ArrayAccess, \JsonSe 'type' => null, 'paymentMethodType' => null, 'termId' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time', ]; /** @@ -102,10 +102,8 @@ class PaymentTransactionResponse implements ModelInterface, ArrayAccess, \JsonSe * @var bool[] */ protected static array $openAPINullables = [ - 'id' => false, 'object' => false, - 'createdAt' => false, - 'updatedAt' => false, + 'id' => false, 'livemode' => false, 'resourceId' => false, 'amount' => false, @@ -115,6 +113,8 @@ class PaymentTransactionResponse implements ModelInterface, ArrayAccess, \JsonSe 'type' => false, 'paymentMethodType' => false, 'termId' => false, + 'createdAt' => false, + 'updatedAt' => false, ]; /** @@ -203,10 +203,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'object' => 'object', - 'createdAt' => 'created_at', - 'updatedAt' => 'updated_at', + 'id' => 'id', 'livemode' => 'livemode', 'resourceId' => 'resource_id', 'amount' => 'amount', @@ -216,6 +214,8 @@ public function isNullableSetToNull(string $property): bool 'type' => 'type', 'paymentMethodType' => 'payment_method_type', 'termId' => 'term_id', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', ]; /** @@ -224,10 +224,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'object' => 'setObject', - 'createdAt' => 'setCreatedAt', - 'updatedAt' => 'setUpdatedAt', + 'id' => 'setId', 'livemode' => 'setLivemode', 'resourceId' => 'setResourceId', 'amount' => 'setAmount', @@ -237,6 +235,8 @@ public function isNullableSetToNull(string $property): bool 'type' => 'setType', 'paymentMethodType' => 'setPaymentMethodType', 'termId' => 'setTermId', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', ]; /** @@ -245,10 +245,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'object' => 'getObject', - 'createdAt' => 'getCreatedAt', - 'updatedAt' => 'getUpdatedAt', + 'id' => 'getId', 'livemode' => 'getLivemode', 'resourceId' => 'getResourceId', 'amount' => 'getAmount', @@ -258,6 +256,8 @@ public function isNullableSetToNull(string $property): bool 'type' => 'getType', 'paymentMethodType' => 'getPaymentMethodType', 'termId' => 'getTermId', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', ]; /** @@ -330,10 +330,8 @@ public function getObjectAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('object', $data ?? [], 'payment_transaction'); - $this->setIfExists('createdAt', $data ?? [], null); - $this->setIfExists('updatedAt', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('resourceId', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); @@ -343,6 +341,8 @@ public function __construct(?array $data = null) $this->setIfExists('type', $data ?? [], null); $this->setIfExists('paymentMethodType', $data ?? [], null); $this->setIfExists('termId', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('updatedAt', $data ?? [], null); } /** @@ -372,9 +372,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } $allowedValues = $this->getObjectAllowableValues(); if (! is_null($this->container['object']) && ! in_array($this->container['object'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -384,11 +381,8 @@ public function listInvalidProperties() ); } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['updatedAt'] === null) { - $invalidProperties[] = "'updatedAt' can't be null"; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; } if ($this->container['livemode'] === null) { $invalidProperties[] = "'livemode' can't be null"; @@ -421,6 +415,12 @@ public function listInvalidProperties() if ($this->container['termId'] === null) { $invalidProperties[] = "'termId' can't be null"; } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } return $invalidProperties; } @@ -437,37 +437,6 @@ public function valid() } - /** - * Gets id - * - * @return string - */ - public function getId(): string - { - if ($this->container['id'] === null) { - throw new \LogicException('Property "id" is required but has not been set.'); - } - - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID - * - * @return self - */ - public function setId(string $id): self - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets object * @@ -506,63 +475,32 @@ public function setObject(?string $object): self } /** - * Gets createdAt - * - * @return \DateTime - */ - public function getCreatedAt(): \DateTime - { - if ($this->container['createdAt'] === null) { - throw new \LogicException('Property "createdAt" is required but has not been set.'); - } - - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) - * - * @return self - */ - public function setCreatedAt(\DateTime $createdAt): self - { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets updatedAt + * Gets id * - * @return \DateTime + * @return string */ - public function getUpdatedAt(): \DateTime + public function getId(): string { - if ($this->container['updatedAt'] === null) { - throw new \LogicException('Property "updatedAt" is required but has not been set.'); + if ($this->container['id'] === null) { + throw new \LogicException('Property "id" is required but has not been set.'); } - return $this->container['updatedAt']; + return $this->container['id']; } /** - * Sets updatedAt + * Sets id * - * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) + * @param string $id 決済トランザクション ID * * @return self */ - public function setUpdatedAt(\DateTime $updatedAt): self + public function setId(string $id): self { - if (is_null($updatedAt)) { - throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['updatedAt'] = $updatedAt; + $this->container['id'] = $id; return $this; } @@ -615,7 +553,7 @@ public function getResourceId(): string /** * Sets resourceId * - * @param string $resourceId PaymentTransaction生成の元になったリソースのID + * @param string $resourceId PaymentTransaction 生成の元になったリソースの ID * * @return self */ @@ -775,7 +713,7 @@ public function getType(): \PAYJPV2\Model\PaymentTransactionType /** * Sets type * - * @param \PAYJPV2\Model\PaymentTransactionType $type PaymentTransactionの種類 + * @param \PAYJPV2\Model\PaymentTransactionType $type PaymentTransaction の種類 | 値 | |:---| | **payment**: 支払い | | **refund**: 返金 | | **chargeback**: チャージバック | | **chargeback_cancel**: チャージバックのキャンセル | * * @return self */ @@ -837,7 +775,7 @@ public function getTermId(): string /** * Sets termId * - * @param string $termId 期間ID + * @param string $termId 集計区間 ID * * @return self */ @@ -850,6 +788,68 @@ public function setTermId(string $termId): self return $this; } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt(): \DateTime + { + if ($this->container['createdAt'] === null) { + throw new \LogicException('Property "createdAt" is required but has not been set.'); + } + + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setCreatedAt(\DateTime $createdAt): self + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return \DateTime + */ + public function getUpdatedAt(): \DateTime + { + if ($this->container['updatedAt'] === null) { + throw new \LogicException('Property "updatedAt" is required but has not been set.'); + } + + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setUpdatedAt(\DateTime $updatedAt): self + { + if (is_null($updatedAt)) { + throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + } + $this->container['updatedAt'] = $updatedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/PriceCreateRequest.php b/lib/Model/PriceCreateRequest.php index 497de41..009ab81 100644 --- a/lib/Model/PriceCreateRequest.php +++ b/lib/Model/PriceCreateRequest.php @@ -58,14 +58,14 @@ class PriceCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ + 'productId' => 'string', + 'unitAmount' => 'int', + 'currency' => '\PAYJPV2\Model\Currency', + 'id' => 'string', + 'active' => 'bool', 'nickname' => 'string', 'lookupKey' => 'string', 'metadata' => 'array', - 'id' => 'string', - 'currency' => '\PAYJPV2\Model\Currency', - 'active' => 'bool', - 'productId' => 'string', - 'unitAmount' => 'int', ]; /** @@ -76,14 +76,14 @@ class PriceCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ + 'productId' => null, + 'unitAmount' => null, + 'currency' => null, + 'id' => null, + 'active' => null, 'nickname' => null, 'lookupKey' => null, 'metadata' => null, - 'id' => null, - 'currency' => null, - 'active' => null, - 'productId' => null, - 'unitAmount' => null, ]; /** @@ -92,14 +92,14 @@ class PriceCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializab * @var bool[] */ protected static array $openAPINullables = [ + 'productId' => false, + 'unitAmount' => false, + 'currency' => false, + 'id' => false, + 'active' => false, 'nickname' => false, 'lookupKey' => false, 'metadata' => false, - 'id' => false, - 'currency' => false, - 'active' => false, - 'productId' => false, - 'unitAmount' => false, ]; /** @@ -188,14 +188,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'productId' => 'product_id', + 'unitAmount' => 'unit_amount', + 'currency' => 'currency', + 'id' => 'id', + 'active' => 'active', 'nickname' => 'nickname', 'lookupKey' => 'lookup_key', 'metadata' => 'metadata', - 'id' => 'id', - 'currency' => 'currency', - 'active' => 'active', - 'productId' => 'product_id', - 'unitAmount' => 'unit_amount', ]; /** @@ -204,14 +204,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'productId' => 'setProductId', + 'unitAmount' => 'setUnitAmount', + 'currency' => 'setCurrency', + 'id' => 'setId', + 'active' => 'setActive', 'nickname' => 'setNickname', 'lookupKey' => 'setLookupKey', 'metadata' => 'setMetadata', - 'id' => 'setId', - 'currency' => 'setCurrency', - 'active' => 'setActive', - 'productId' => 'setProductId', - 'unitAmount' => 'setUnitAmount', ]; /** @@ -220,14 +220,14 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'productId' => 'getProductId', + 'unitAmount' => 'getUnitAmount', + 'currency' => 'getCurrency', + 'id' => 'getId', + 'active' => 'getActive', 'nickname' => 'getNickname', 'lookupKey' => 'getLookupKey', 'metadata' => 'getMetadata', - 'id' => 'getId', - 'currency' => 'getCurrency', - 'active' => 'getActive', - 'productId' => 'getProductId', - 'unitAmount' => 'getUnitAmount', ]; /** @@ -287,14 +287,14 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('productId', $data ?? [], null); + $this->setIfExists('unitAmount', $data ?? [], null); + $this->setIfExists('currency', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('active', $data ?? [], true); $this->setIfExists('nickname', $data ?? [], null); $this->setIfExists('lookupKey', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('currency', $data ?? [], null); - $this->setIfExists('active', $data ?? [], true); - $this->setIfExists('productId', $data ?? [], null); - $this->setIfExists('unitAmount', $data ?? [], null); } /** @@ -324,9 +324,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['currency'] === null) { - $invalidProperties[] = "'currency' can't be null"; - } if ($this->container['productId'] === null) { $invalidProperties[] = "'productId' can't be null"; } @@ -337,6 +334,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'unitAmount', must be bigger than or equal to 0."; } + if ($this->container['currency'] === null) { + $invalidProperties[] = "'currency' can't be null"; + } + return $invalidProperties; } @@ -353,82 +354,99 @@ public function valid() /** - * Gets nickname + * Gets productId * - * @return string|null + * @return string */ - public function getNickname(): ?string + public function getProductId(): string { - return $this->container['nickname']; + if ($this->container['productId'] === null) { + throw new \LogicException('Property "productId" is required but has not been set.'); + } + + return $this->container['productId']; } /** - * Sets nickname + * Sets productId * - * @param string|null $nickname 価格の名称。PAY.JP のダッシュボードで識別するためのもので、顧客には表示されません。 + * @param string $productId この価格が紐付く商品の ID * * @return self */ - public function setNickname(?string $nickname): self + public function setProductId(string $productId): self { - if (is_null($nickname)) { - throw new \InvalidArgumentException('non-nullable nickname cannot be null'); + if (is_null($productId)) { + throw new \InvalidArgumentException('non-nullable productId cannot be null'); } - $this->container['nickname'] = $nickname; + $this->container['productId'] = $productId; return $this; } /** - * Gets lookupKey + * Gets unitAmount * - * @return string|null + * @return int */ - public function getLookupKey(): ?string + public function getUnitAmount(): int { - return $this->container['lookupKey']; + if ($this->container['unitAmount'] === null) { + throw new \LogicException('Property "unitAmount" is required but has not been set.'); + } + + return $this->container['unitAmount']; } /** - * Sets lookupKey + * Sets unitAmount * - * @param string|null $lookupKey この価格を検索するためのキー。 + * @param int $unitAmount 価格の単価 * * @return self */ - public function setLookupKey(?string $lookupKey): self + public function setUnitAmount(int $unitAmount): self { - if (is_null($lookupKey)) { - throw new \InvalidArgumentException('non-nullable lookupKey cannot be null'); + if (is_null($unitAmount)) { + throw new \InvalidArgumentException('non-nullable unitAmount cannot be null'); } - $this->container['lookupKey'] = $lookupKey; + + if (($unitAmount < 0)) { + throw new \InvalidArgumentException('invalid value for $unitAmount when calling PriceCreateRequest., must be bigger than or equal to 0.'); + } + + $this->container['unitAmount'] = $unitAmount; return $this; } /** - * Gets metadata + * Gets currency * - * @return array|null + * @return \PAYJPV2\Model\Currency */ - public function getMetadata(): ?array + public function getCurrency(): \PAYJPV2\Model\Currency { - return $this->container['metadata']; + if ($this->container['currency'] === null) { + throw new \LogicException('Property "currency" is required but has not been set.'); + } + + return $this->container['currency']; } /** - * Sets metadata + * Sets currency * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param \PAYJPV2\Model\Currency $currency 価格の通貨。現在は `jpy` のみサポートしています。 * * @return self */ - public function setMetadata(?array $metadata): self + public function setCurrency(\PAYJPV2\Model\Currency $currency): self { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + if (is_null($currency)) { + throw new \InvalidArgumentException('non-nullable currency cannot be null'); } - $this->container['metadata'] = $metadata; + $this->container['currency'] = $currency; return $this; } @@ -446,7 +464,7 @@ public function getId(): ?string /** * Sets id * - * @param string|null $id 料金ID + * @param string|null $id 料金 ID * * @return self */ @@ -461,126 +479,109 @@ public function setId(?string $id): self } /** - * Gets currency + * Gets active * - * @return \PAYJPV2\Model\Currency + * @return bool|null */ - public function getCurrency(): \PAYJPV2\Model\Currency + public function getActive(): ?bool { - if ($this->container['currency'] === null) { - throw new \LogicException('Property "currency" is required but has not been set.'); - } - - return $this->container['currency']; + return $this->container['active']; } /** - * Sets currency + * Sets active * - * @param \PAYJPV2\Model\Currency $currency 価格の通貨。現在は `jpy` のみサポートしています。 + * @param bool|null $active 価格が有効かどうか * * @return self */ - public function setCurrency(\PAYJPV2\Model\Currency $currency): self + public function setActive(?bool $active): self { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); + if (is_null($active)) { + throw new \InvalidArgumentException('non-nullable active cannot be null'); } - $this->container['currency'] = $currency; + $this->container['active'] = $active; return $this; } /** - * Gets active + * Gets nickname * - * @return bool|null + * @return string|null */ - public function getActive(): ?bool + public function getNickname(): ?string { - return $this->container['active']; + return $this->container['nickname']; } /** - * Sets active + * Sets nickname * - * @param bool|null $active 価格が有効かどうか。デフォルトは `true`。 + * @param string|null $nickname 価格の名称。PAY.JP の管理画面で識別するためのもので、顧客には表示されません。 * * @return self */ - public function setActive(?bool $active): self + public function setNickname(?string $nickname): self { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); + if (is_null($nickname)) { + throw new \InvalidArgumentException('non-nullable nickname cannot be null'); } - $this->container['active'] = $active; + $this->container['nickname'] = $nickname; return $this; } /** - * Gets productId + * Gets lookupKey * - * @return string + * @return string|null */ - public function getProductId(): string + public function getLookupKey(): ?string { - if ($this->container['productId'] === null) { - throw new \LogicException('Property "productId" is required but has not been set.'); - } - - return $this->container['productId']; + return $this->container['lookupKey']; } /** - * Sets productId + * Sets lookupKey * - * @param string $productId この価格が紐付く商品のID。 + * @param string|null $lookupKey この価格を検索するためのキー * * @return self */ - public function setProductId(string $productId): self + public function setLookupKey(?string $lookupKey): self { - if (is_null($productId)) { - throw new \InvalidArgumentException('non-nullable productId cannot be null'); + if (is_null($lookupKey)) { + throw new \InvalidArgumentException('non-nullable lookupKey cannot be null'); } - $this->container['productId'] = $productId; + $this->container['lookupKey'] = $lookupKey; return $this; } /** - * Gets unitAmount + * Gets metadata * - * @return int + * @return array|null */ - public function getUnitAmount(): int + public function getMetadata(): ?array { - if ($this->container['unitAmount'] === null) { - throw new \LogicException('Property "unitAmount" is required but has not been set.'); - } - - return $this->container['unitAmount']; + return $this->container['metadata']; } /** - * Sets unitAmount + * Sets metadata * - * @param int $unitAmount 価格の単価。0以上の整数となります。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ - public function setUnitAmount(int $unitAmount): self + public function setMetadata(?array $metadata): self { - if (is_null($unitAmount)) { - throw new \InvalidArgumentException('non-nullable unitAmount cannot be null'); - } - - if (($unitAmount < 0)) { - throw new \InvalidArgumentException('invalid value for $unitAmount when calling PriceCreateRequest., must be bigger than or equal to 0.'); + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); } - - $this->container['unitAmount'] = $unitAmount; + $this->container['metadata'] = $metadata; return $this; } diff --git a/lib/Model/PriceDetailsResponse.php b/lib/Model/PriceDetailsResponse.php index 8ddb94d..942161e 100644 --- a/lib/Model/PriceDetailsResponse.php +++ b/lib/Model/PriceDetailsResponse.php @@ -58,17 +58,17 @@ class PriceDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', 'object' => 'string', + 'id' => 'string', 'livemode' => 'bool', + 'productId' => 'string', + 'unitAmount' => 'int', + 'currency' => '\PAYJPV2\Model\Currency', 'active' => 'bool', - 'metadata' => 'array', 'nickname' => 'string', 'type' => '\PAYJPV2\Model\PriceType', 'lookupKey' => 'string', - 'currency' => '\PAYJPV2\Model\Currency', - 'productId' => 'string', - 'unitAmount' => 'int', + 'metadata' => 'array', 'createdAt' => '\DateTime', 'updatedAt' => '\DateTime', ]; @@ -81,17 +81,17 @@ class PriceDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'object' => null, + 'id' => null, 'livemode' => null, + 'productId' => null, + 'unitAmount' => null, + 'currency' => null, 'active' => null, - 'metadata' => null, 'nickname' => null, 'type' => null, 'lookupKey' => null, - 'currency' => null, - 'productId' => null, - 'unitAmount' => null, + 'metadata' => null, 'createdAt' => 'date-time', 'updatedAt' => 'date-time', ]; @@ -102,17 +102,17 @@ class PriceDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @var bool[] */ protected static array $openAPINullables = [ - 'id' => false, 'object' => false, + 'id' => false, 'livemode' => false, + 'productId' => false, + 'unitAmount' => false, + 'currency' => false, 'active' => false, - 'metadata' => false, 'nickname' => true, 'type' => false, 'lookupKey' => true, - 'currency' => false, - 'productId' => false, - 'unitAmount' => false, + 'metadata' => false, 'createdAt' => false, 'updatedAt' => false, ]; @@ -203,17 +203,17 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'object' => 'object', + 'id' => 'id', 'livemode' => 'livemode', + 'productId' => 'product_id', + 'unitAmount' => 'unit_amount', + 'currency' => 'currency', 'active' => 'active', - 'metadata' => 'metadata', 'nickname' => 'nickname', 'type' => 'type', 'lookupKey' => 'lookup_key', - 'currency' => 'currency', - 'productId' => 'product_id', - 'unitAmount' => 'unit_amount', + 'metadata' => 'metadata', 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', ]; @@ -224,17 +224,17 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'object' => 'setObject', + 'id' => 'setId', 'livemode' => 'setLivemode', + 'productId' => 'setProductId', + 'unitAmount' => 'setUnitAmount', + 'currency' => 'setCurrency', 'active' => 'setActive', - 'metadata' => 'setMetadata', 'nickname' => 'setNickname', 'type' => 'setType', 'lookupKey' => 'setLookupKey', - 'currency' => 'setCurrency', - 'productId' => 'setProductId', - 'unitAmount' => 'setUnitAmount', + 'metadata' => 'setMetadata', 'createdAt' => 'setCreatedAt', 'updatedAt' => 'setUpdatedAt', ]; @@ -245,17 +245,17 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'object' => 'getObject', + 'id' => 'getId', 'livemode' => 'getLivemode', + 'productId' => 'getProductId', + 'unitAmount' => 'getUnitAmount', + 'currency' => 'getCurrency', 'active' => 'getActive', - 'metadata' => 'getMetadata', 'nickname' => 'getNickname', 'type' => 'getType', 'lookupKey' => 'getLookupKey', - 'currency' => 'getCurrency', - 'productId' => 'getProductId', - 'unitAmount' => 'getUnitAmount', + 'metadata' => 'getMetadata', 'createdAt' => 'getCreatedAt', 'updatedAt' => 'getUpdatedAt', ]; @@ -330,17 +330,17 @@ public function getObjectAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('object', $data ?? [], 'price'); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('livemode', $data ?? [], null); + $this->setIfExists('productId', $data ?? [], null); + $this->setIfExists('unitAmount', $data ?? [], null); + $this->setIfExists('currency', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); - $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('nickname', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('lookupKey', $data ?? [], null); - $this->setIfExists('currency', $data ?? [], null); - $this->setIfExists('productId', $data ?? [], null); - $this->setIfExists('unitAmount', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('createdAt', $data ?? [], null); $this->setIfExists('updatedAt', $data ?? [], null); } @@ -372,9 +372,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } $allowedValues = $this->getObjectAllowableValues(); if (! is_null($this->container['object']) && ! in_array($this->container['object'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -384,15 +381,24 @@ public function listInvalidProperties() ); } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } if ($this->container['livemode'] === null) { $invalidProperties[] = "'livemode' can't be null"; } + if ($this->container['productId'] === null) { + $invalidProperties[] = "'productId' can't be null"; + } + if ($this->container['unitAmount'] === null) { + $invalidProperties[] = "'unitAmount' can't be null"; + } + if ($this->container['currency'] === null) { + $invalidProperties[] = "'currency' can't be null"; + } if ($this->container['active'] === null) { $invalidProperties[] = "'active' can't be null"; } - if ($this->container['metadata'] === null) { - $invalidProperties[] = "'metadata' can't be null"; - } if ($this->container['nickname'] === null) { $invalidProperties[] = "'nickname' can't be null"; } @@ -402,14 +408,8 @@ public function listInvalidProperties() if ($this->container['lookupKey'] === null) { $invalidProperties[] = "'lookupKey' can't be null"; } - if ($this->container['currency'] === null) { - $invalidProperties[] = "'currency' can't be null"; - } - if ($this->container['productId'] === null) { - $invalidProperties[] = "'productId' can't be null"; - } - if ($this->container['unitAmount'] === null) { - $invalidProperties[] = "'unitAmount' can't be null"; + if ($this->container['metadata'] === null) { + $invalidProperties[] = "'metadata' can't be null"; } if ($this->container['createdAt'] === null) { $invalidProperties[] = "'createdAt' can't be null"; @@ -433,37 +433,6 @@ public function valid() } - /** - * Gets id - * - * @return string - */ - public function getId(): string - { - if ($this->container['id'] === null) { - throw new \LogicException('Property "id" is required but has not been set.'); - } - - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id 料金ID - * - * @return self - */ - public function setId(string $id): self - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets object * @@ -501,6 +470,37 @@ public function setObject(?string $object): self return $this; } + /** + * Gets id + * + * @return string + */ + public function getId(): string + { + if ($this->container['id'] === null) { + throw new \LogicException('Property "id" is required but has not been set.'); + } + + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id 料金 ID + * + * @return self + */ + public function setId(string $id): self + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + /** * Gets livemode * @@ -533,63 +533,125 @@ public function setLivemode(bool $livemode): self } /** - * Gets active + * Gets productId * - * @return bool + * @return string */ - public function getActive(): bool + public function getProductId(): string { - if ($this->container['active'] === null) { - throw new \LogicException('Property "active" is required but has not been set.'); + if ($this->container['productId'] === null) { + throw new \LogicException('Property "productId" is required but has not been set.'); } - return $this->container['active']; + return $this->container['productId']; } /** - * Sets active + * Sets productId * - * @param bool $active 価格が有効かどうか。デフォルトは `true`。 + * @param string $productId この価格が紐付く商品の ID * * @return self */ - public function setActive(bool $active): self + public function setProductId(string $productId): self { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); + if (is_null($productId)) { + throw new \InvalidArgumentException('non-nullable productId cannot be null'); } - $this->container['active'] = $active; + $this->container['productId'] = $productId; return $this; } /** - * Gets metadata + * Gets unitAmount * - * @return array + * @return int */ - public function getMetadata(): array + public function getUnitAmount(): int { - if ($this->container['metadata'] === null) { - throw new \LogicException('Property "metadata" is required but has not been set.'); + if ($this->container['unitAmount'] === null) { + throw new \LogicException('Property "unitAmount" is required but has not been set.'); } - return $this->container['metadata']; + return $this->container['unitAmount']; } /** - * Sets metadata + * Sets unitAmount * - * @param array $metadata メタデータ + * @param int $unitAmount 価格の単価 * * @return self */ - public function setMetadata(array $metadata): self + public function setUnitAmount(int $unitAmount): self { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + if (is_null($unitAmount)) { + throw new \InvalidArgumentException('non-nullable unitAmount cannot be null'); } - $this->container['metadata'] = $metadata; + $this->container['unitAmount'] = $unitAmount; + + return $this; + } + + /** + * Gets currency + * + * @return \PAYJPV2\Model\Currency + */ + public function getCurrency(): \PAYJPV2\Model\Currency + { + if ($this->container['currency'] === null) { + throw new \LogicException('Property "currency" is required but has not been set.'); + } + + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param \PAYJPV2\Model\Currency $currency 価格の通貨。現在は `jpy` のみサポートしています。 + * + * @return self + */ + public function setCurrency(\PAYJPV2\Model\Currency $currency): self + { + if (is_null($currency)) { + throw new \InvalidArgumentException('non-nullable currency cannot be null'); + } + $this->container['currency'] = $currency; + + return $this; + } + + /** + * Gets active + * + * @return bool + */ + public function getActive(): bool + { + if ($this->container['active'] === null) { + throw new \LogicException('Property "active" is required but has not been set.'); + } + + return $this->container['active']; + } + + /** + * Sets active + * + * @param bool $active 価格が有効かどうか + * + * @return self + */ + public function setActive(bool $active): self + { + if (is_null($active)) { + throw new \InvalidArgumentException('non-nullable active cannot be null'); + } + $this->container['active'] = $active; return $this; } @@ -645,7 +707,7 @@ public function getType(): \PAYJPV2\Model\PriceType /** * Sets type * - * @param \PAYJPV2\Model\PriceType $type 価格が一度限りの購入か、継続的な(サブスクリプション)購入かに応じて、`one_time` または `recurring` のいずれかとなります。 | 指定できる値 | |:---| | **one_time**: 1回限りの価格。 | | **recurring**: 継続的な価格。 | + * @param \PAYJPV2\Model\PriceType $type 一度限りの購入を表す `one_time` が入ります。 * * @return self */ @@ -694,94 +756,32 @@ public function setLookupKey(?string $lookupKey): self } /** - * Gets currency - * - * @return \PAYJPV2\Model\Currency - */ - public function getCurrency(): \PAYJPV2\Model\Currency - { - if ($this->container['currency'] === null) { - throw new \LogicException('Property "currency" is required but has not been set.'); - } - - return $this->container['currency']; - } - - /** - * Sets currency - * - * @param \PAYJPV2\Model\Currency $currency 価格の通貨。現在は `jpy` のみサポートしています。 - * - * @return self - */ - public function setCurrency(\PAYJPV2\Model\Currency $currency): self - { - if (is_null($currency)) { - throw new \InvalidArgumentException('non-nullable currency cannot be null'); - } - $this->container['currency'] = $currency; - - return $this; - } - - /** - * Gets productId - * - * @return string - */ - public function getProductId(): string - { - if ($this->container['productId'] === null) { - throw new \LogicException('Property "productId" is required but has not been set.'); - } - - return $this->container['productId']; - } - - /** - * Sets productId - * - * @param string $productId この価格が紐付く商品のID。 - * - * @return self - */ - public function setProductId(string $productId): self - { - if (is_null($productId)) { - throw new \InvalidArgumentException('non-nullable productId cannot be null'); - } - $this->container['productId'] = $productId; - - return $this; - } - - /** - * Gets unitAmount + * Gets metadata * - * @return int + * @return array */ - public function getUnitAmount(): int + public function getMetadata(): array { - if ($this->container['unitAmount'] === null) { - throw new \LogicException('Property "unitAmount" is required but has not been set.'); + if ($this->container['metadata'] === null) { + throw new \LogicException('Property "metadata" is required but has not been set.'); } - return $this->container['unitAmount']; + return $this->container['metadata']; } /** - * Sets unitAmount + * Sets metadata * - * @param int $unitAmount 価格の単価。0以上の整数となります。 + * @param array $metadata メタデータ * * @return self */ - public function setUnitAmount(int $unitAmount): self + public function setMetadata(array $metadata): self { - if (is_null($unitAmount)) { - throw new \InvalidArgumentException('non-nullable unitAmount cannot be null'); + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); } - $this->container['unitAmount'] = $unitAmount; + $this->container['metadata'] = $metadata; return $this; } @@ -803,7 +803,7 @@ public function getCreatedAt(): \DateTime /** * Sets createdAt * - * @param \DateTime $createdAt 支払い方法作成時の日時 (UTC, ISO 8601 形式) + * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) * * @return self */ @@ -834,7 +834,7 @@ public function getUpdatedAt(): \DateTime /** * Sets updatedAt * - * @param \DateTime $updatedAt 支払い方法更新時の日時 (UTC, ISO 8601 形式) + * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) * * @return self */ diff --git a/lib/Model/PriceUpdateRequest.php b/lib/Model/PriceUpdateRequest.php index e31cc06..fb7dae4 100644 --- a/lib/Model/PriceUpdateRequest.php +++ b/lib/Model/PriceUpdateRequest.php @@ -58,10 +58,10 @@ class PriceUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ + 'active' => 'bool', 'nickname' => 'string', 'lookupKey' => 'string', 'metadata' => 'array', - 'active' => 'bool', ]; /** @@ -72,10 +72,10 @@ class PriceUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ + 'active' => null, 'nickname' => null, 'lookupKey' => null, 'metadata' => null, - 'active' => null, ]; /** @@ -84,10 +84,10 @@ class PriceUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializab * @var bool[] */ protected static array $openAPINullables = [ + 'active' => false, 'nickname' => false, 'lookupKey' => false, 'metadata' => false, - 'active' => false, ]; /** @@ -176,10 +176,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'active' => 'active', 'nickname' => 'nickname', 'lookupKey' => 'lookup_key', 'metadata' => 'metadata', - 'active' => 'active', ]; /** @@ -188,10 +188,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'active' => 'setActive', 'nickname' => 'setNickname', 'lookupKey' => 'setLookupKey', 'metadata' => 'setMetadata', - 'active' => 'setActive', ]; /** @@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'active' => 'getActive', 'nickname' => 'getNickname', 'lookupKey' => 'getLookupKey', 'metadata' => 'getMetadata', - 'active' => 'getActive', ]; /** @@ -263,10 +263,10 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('active', $data ?? [], null); $this->setIfExists('nickname', $data ?? [], null); $this->setIfExists('lookupKey', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); - $this->setIfExists('active', $data ?? [], null); } /** @@ -311,6 +311,33 @@ public function valid() } + /** + * Gets active + * + * @return bool|null + */ + public function getActive(): ?bool + { + return $this->container['active']; + } + + /** + * Sets active + * + * @param bool|null $active 価格が有効かどうか + * + * @return self + */ + public function setActive(?bool $active): self + { + if (is_null($active)) { + throw new \InvalidArgumentException('non-nullable active cannot be null'); + } + $this->container['active'] = $active; + + return $this; + } + /** * Gets nickname * @@ -324,7 +351,7 @@ public function getNickname(): ?string /** * Sets nickname * - * @param string|null $nickname 価格の名称。PAY.JP のダッシュボードで識別するためのもので、顧客には表示されません。 + * @param string|null $nickname 価格の名称。PAY.JP の管理画面で識別するためのもので、顧客には表示されません。 * * @return self */ @@ -351,7 +378,7 @@ public function getLookupKey(): ?string /** * Sets lookupKey * - * @param string|null $lookupKey この価格を検索するためのキー。 + * @param string|null $lookupKey この価格を検索するためのキー * * @return self */ @@ -378,7 +405,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ @@ -391,33 +418,6 @@ public function setMetadata(?array $metadata): self return $this; } - - /** - * Gets active - * - * @return bool|null - */ - public function getActive(): ?bool - { - return $this->container['active']; - } - - /** - * Sets active - * - * @param bool|null $active 価格が有効かどうか。デフォルトは `true`。 - * - * @return self - */ - public function setActive(?bool $active): self - { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); - } - $this->container['active'] = $active; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/ProductCreateRequest.php b/lib/Model/ProductCreateRequest.php index 886ab1e..2586433 100644 --- a/lib/Model/ProductCreateRequest.php +++ b/lib/Model/ProductCreateRequest.php @@ -58,13 +58,12 @@ class ProductCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ - 'defaultPriceId' => 'string', + 'name' => 'string', + 'id' => 'string', + 'active' => 'bool', 'description' => 'string', 'unitLabel' => 'string', 'url' => 'string', - 'id' => 'string', - 'name' => 'string', - 'active' => 'bool', ]; /** @@ -75,13 +74,12 @@ class ProductCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ - 'defaultPriceId' => null, + 'name' => null, + 'id' => null, + 'active' => null, 'description' => null, 'unitLabel' => null, 'url' => null, - 'id' => null, - 'name' => null, - 'active' => null, ]; /** @@ -90,13 +88,12 @@ class ProductCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializ * @var bool[] */ protected static array $openAPINullables = [ - 'defaultPriceId' => false, + 'name' => false, + 'id' => false, + 'active' => false, 'description' => false, 'unitLabel' => false, 'url' => false, - 'id' => false, - 'name' => false, - 'active' => false, ]; /** @@ -185,13 +182,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'defaultPriceId' => 'default_price_id', + 'name' => 'name', + 'id' => 'id', + 'active' => 'active', 'description' => 'description', 'unitLabel' => 'unit_label', 'url' => 'url', - 'id' => 'id', - 'name' => 'name', - 'active' => 'active', ]; /** @@ -200,13 +196,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'defaultPriceId' => 'setDefaultPriceId', + 'name' => 'setName', + 'id' => 'setId', + 'active' => 'setActive', 'description' => 'setDescription', 'unitLabel' => 'setUnitLabel', 'url' => 'setUrl', - 'id' => 'setId', - 'name' => 'setName', - 'active' => 'setActive', ]; /** @@ -215,13 +210,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'defaultPriceId' => 'getDefaultPriceId', + 'name' => 'getName', + 'id' => 'getId', + 'active' => 'getActive', 'description' => 'getDescription', 'unitLabel' => 'getUnitLabel', 'url' => 'getUrl', - 'id' => 'getId', - 'name' => 'getName', - 'active' => 'getActive', ]; /** @@ -281,13 +275,12 @@ public function getModelName() */ public function __construct(?array $data = null) { - $this->setIfExists('defaultPriceId', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('active', $data ?? [], true); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('unitLabel', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); - $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('active', $data ?? [], true); } /** @@ -337,194 +330,167 @@ public function valid() /** - * Gets defaultPriceId - * - * @return string|null - */ - public function getDefaultPriceId(): ?string - { - return $this->container['defaultPriceId']; - } - - /** - * Sets defaultPriceId - * - * @param string|null $defaultPriceId この商品のデフォルト価格である価格オブジェクトのID。 + * Gets name * - * @return self + * @return string */ - public function setDefaultPriceId(?string $defaultPriceId): self + public function getName(): string { - if (is_null($defaultPriceId)) { - throw new \InvalidArgumentException('non-nullable defaultPriceId cannot be null'); + if ($this->container['name'] === null) { + throw new \LogicException('Property "name" is required but has not been set.'); } - $this->container['defaultPriceId'] = $defaultPriceId; - - return $this; - } - /** - * Gets description - * - * @return string|null - */ - public function getDescription(): ?string - { - return $this->container['description']; + return $this->container['name']; } /** - * Sets description + * Sets name * - * @param string|null $description Checkoutなどで顧客に表示される商品説明。 + * @param string $name Checkout などで顧客に表示される商品名 * * @return self */ - public function setDescription(?string $description): self + public function setName(string $name): self { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['description'] = $description; + $this->container['name'] = $name; return $this; } /** - * Gets unitLabel + * Gets id * * @return string|null */ - public function getUnitLabel(): ?string + public function getId(): ?string { - return $this->container['unitLabel']; + return $this->container['id']; } /** - * Sets unitLabel + * Sets id * - * @param string|null $unitLabel この製品の単位を表すラベル。設定すると、Checkoutや請求書などに表示されます。(例:「個」、「ライセンス」、「時間」、「回」など) + * @param string|null $id 商品 ID * * @return self */ - public function setUnitLabel(?string $unitLabel): self + public function setId(?string $id): self { - if (is_null($unitLabel)) { - throw new \InvalidArgumentException('non-nullable unitLabel cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['unitLabel'] = $unitLabel; + $this->container['id'] = $id; return $this; } /** - * Gets url + * Gets active * - * @return string|null + * @return bool|null */ - public function getUrl(): ?string + public function getActive(): ?bool { - return $this->container['url']; + return $this->container['active']; } /** - * Sets url + * Sets active * - * @param string|null $url この製品の公開されているウェブページのURL。 + * @param bool|null $active 商品が購入可能かどうか * * @return self */ - public function setUrl(?string $url): self + public function setActive(?bool $active): self { - if (is_null($url)) { - throw new \InvalidArgumentException('non-nullable url cannot be null'); + if (is_null($active)) { + throw new \InvalidArgumentException('non-nullable active cannot be null'); } - $this->container['url'] = $url; + $this->container['active'] = $active; return $this; } /** - * Gets id + * Gets description * * @return string|null */ - public function getId(): ?string + public function getDescription(): ?string { - return $this->container['id']; + return $this->container['description']; } /** - * Sets id + * Sets description * - * @param string|null $id 商品ID + * @param string|null $description Checkout などで顧客に表示される商品説明 * * @return self */ - public function setId(?string $id): self + public function setDescription(?string $description): self { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); } - $this->container['id'] = $id; + $this->container['description'] = $description; return $this; } /** - * Gets name + * Gets unitLabel * - * @return string + * @return string|null */ - public function getName(): string + public function getUnitLabel(): ?string { - if ($this->container['name'] === null) { - throw new \LogicException('Property "name" is required but has not been set.'); - } - - return $this->container['name']; + return $this->container['unitLabel']; } /** - * Sets name + * Sets unitLabel * - * @param string $name Checkoutなどで顧客に表示される商品名。 + * @param string|null $unitLabel この製品の単位を表すラベル。設定すると、Checkout などに表示されます。(例:「個」、「ライセンス」、「時間」、「回」など) * * @return self */ - public function setName(string $name): self + public function setUnitLabel(?string $unitLabel): self { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($unitLabel)) { + throw new \InvalidArgumentException('non-nullable unitLabel cannot be null'); } - $this->container['name'] = $name; + $this->container['unitLabel'] = $unitLabel; return $this; } /** - * Gets active + * Gets url * - * @return bool|null + * @return string|null */ - public function getActive(): ?bool + public function getUrl(): ?string { - return $this->container['active']; + return $this->container['url']; } /** - * Sets active + * Sets url * - * @param bool|null $active 商品が購入可能かどうか。デフォルトは `true`。 + * @param string|null $url この製品の公開されているウェブページの URL * * @return self */ - public function setActive(?bool $active): self + public function setUrl(?string $url): self { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); + if (is_null($url)) { + throw new \InvalidArgumentException('non-nullable url cannot be null'); } - $this->container['active'] = $active; + $this->container['url'] = $url; return $this; } diff --git a/lib/Model/ProductDeletedResponse.php b/lib/Model/ProductDeletedResponse.php index 5cacaf3..de55a95 100644 --- a/lib/Model/ProductDeletedResponse.php +++ b/lib/Model/ProductDeletedResponse.php @@ -58,8 +58,8 @@ class ProductDeletedResponse implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', 'object' => 'string', + 'id' => 'string', 'deleted' => 'bool', ]; @@ -71,8 +71,8 @@ class ProductDeletedResponse implements ModelInterface, ArrayAccess, \JsonSerial * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'object' => null, + 'id' => null, 'deleted' => null, ]; @@ -82,8 +82,8 @@ class ProductDeletedResponse implements ModelInterface, ArrayAccess, \JsonSerial * @var bool[] */ protected static array $openAPINullables = [ - 'id' => false, 'object' => false, + 'id' => false, 'deleted' => false, ]; @@ -173,8 +173,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'object' => 'object', + 'id' => 'id', 'deleted' => 'deleted', ]; @@ -184,8 +184,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'object' => 'setObject', + 'id' => 'setId', 'deleted' => 'setDeleted', ]; @@ -195,8 +195,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'object' => 'getObject', + 'id' => 'getId', 'deleted' => 'getDeleted', ]; @@ -270,9 +270,9 @@ public function getObjectAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('object', $data ?? [], 'product'); - $this->setIfExists('deleted', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('deleted', $data ?? [], true); } /** @@ -302,9 +302,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } $allowedValues = $this->getObjectAllowableValues(); if (! is_null($this->container['object']) && ! in_array($this->container['object'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -314,8 +311,8 @@ public function listInvalidProperties() ); } - if ($this->container['deleted'] === null) { - $invalidProperties[] = "'deleted' can't be null"; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; } return $invalidProperties; @@ -333,37 +330,6 @@ public function valid() } - /** - * Gets id - * - * @return string - */ - public function getId(): string - { - if ($this->container['id'] === null) { - throw new \LogicException('Property "id" is required but has not been set.'); - } - - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id 商品ID - * - * @return self - */ - public function setId(string $id): self - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets object * @@ -402,27 +368,54 @@ public function setObject(?string $object): self } /** - * Gets deleted + * Gets id * - * @return bool + * @return string + */ + public function getId(): string + { + if ($this->container['id'] === null) { + throw new \LogicException('Property "id" is required but has not been set.'); + } + + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id 商品 ID + * + * @return self */ - public function getDeleted(): bool + public function setId(string $id): self { - if ($this->container['deleted'] === null) { - throw new \LogicException('Property "deleted" is required but has not been set.'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } + $this->container['id'] = $id; + + return $this; + } + /** + * Gets deleted + * + * @return bool|null + */ + public function getDeleted(): ?bool + { return $this->container['deleted']; } /** * Sets deleted * - * @param bool $deleted 削除されたかどうか + * @param bool|null $deleted 削除されたかどうか * * @return self */ - public function setDeleted(bool $deleted): self + public function setDeleted(?bool $deleted): self { if (is_null($deleted)) { throw new \InvalidArgumentException('non-nullable deleted cannot be null'); diff --git a/lib/Model/ProductDetailsResponse.php b/lib/Model/ProductDetailsResponse.php index c2ad494..e1f4ef7 100644 --- a/lib/Model/ProductDetailsResponse.php +++ b/lib/Model/ProductDetailsResponse.php @@ -58,8 +58,8 @@ class ProductDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', 'object' => 'string', + 'id' => 'string', 'name' => 'string', 'active' => 'bool', 'defaultPriceId' => 'string', @@ -76,8 +76,8 @@ class ProductDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'object' => null, + 'id' => null, 'name' => null, 'active' => null, 'defaultPriceId' => null, @@ -92,8 +92,8 @@ class ProductDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial * @var bool[] */ protected static array $openAPINullables = [ - 'id' => false, 'object' => false, + 'id' => false, 'name' => false, 'active' => false, 'defaultPriceId' => true, @@ -188,8 +188,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'object' => 'object', + 'id' => 'id', 'name' => 'name', 'active' => 'active', 'defaultPriceId' => 'default_price_id', @@ -204,8 +204,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'object' => 'setObject', + 'id' => 'setId', 'name' => 'setName', 'active' => 'setActive', 'defaultPriceId' => 'setDefaultPriceId', @@ -220,8 +220,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'object' => 'getObject', + 'id' => 'getId', 'name' => 'getName', 'active' => 'getActive', 'defaultPriceId' => 'getDefaultPriceId', @@ -300,8 +300,8 @@ public function getObjectAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('object', $data ?? [], 'product'); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); $this->setIfExists('active', $data ?? [], null); $this->setIfExists('defaultPriceId', $data ?? [], null); @@ -337,9 +337,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } $allowedValues = $this->getObjectAllowableValues(); if (! is_null($this->container['object']) && ! in_array($this->container['object'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -349,6 +346,9 @@ public function listInvalidProperties() ); } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } @@ -383,37 +383,6 @@ public function valid() } - /** - * Gets id - * - * @return string - */ - public function getId(): string - { - if ($this->container['id'] === null) { - throw new \LogicException('Property "id" is required but has not been set.'); - } - - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id 商品ID - * - * @return self - */ - public function setId(string $id): self - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets object * @@ -451,6 +420,37 @@ public function setObject(?string $object): self return $this; } + /** + * Gets id + * + * @return string + */ + public function getId(): string + { + if ($this->container['id'] === null) { + throw new \LogicException('Property "id" is required but has not been set.'); + } + + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id 商品 ID + * + * @return self + */ + public function setId(string $id): self + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + /** * Gets name * @@ -468,7 +468,7 @@ public function getName(): string /** * Sets name * - * @param string $name Checkoutなどで顧客に表示される商品名。 + * @param string $name Checkout などで顧客に表示される商品名 * * @return self */ @@ -499,7 +499,7 @@ public function getActive(): bool /** * Sets active * - * @param bool $active 商品が購入可能かどうか。デフォルトは `true`。 + * @param bool $active 商品が購入可能かどうか * * @return self */ diff --git a/lib/Model/ProductUpdateRequest.php b/lib/Model/ProductUpdateRequest.php index 35825dd..530d988 100644 --- a/lib/Model/ProductUpdateRequest.php +++ b/lib/Model/ProductUpdateRequest.php @@ -58,12 +58,12 @@ class ProductUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $openAPITypes = [ + 'name' => 'string', + 'active' => 'bool', 'defaultPriceId' => 'string', 'description' => 'string', 'unitLabel' => 'string', 'url' => 'string', - 'name' => 'string', - 'active' => 'bool', ]; /** @@ -74,12 +74,12 @@ class ProductUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ + 'name' => null, + 'active' => null, 'defaultPriceId' => null, 'description' => null, 'unitLabel' => null, 'url' => null, - 'name' => null, - 'active' => null, ]; /** @@ -88,12 +88,12 @@ class ProductUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializ * @var bool[] */ protected static array $openAPINullables = [ + 'name' => false, + 'active' => false, 'defaultPriceId' => false, 'description' => false, 'unitLabel' => false, 'url' => false, - 'name' => false, - 'active' => false, ]; /** @@ -182,12 +182,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'name' => 'name', + 'active' => 'active', 'defaultPriceId' => 'default_price_id', 'description' => 'description', 'unitLabel' => 'unit_label', 'url' => 'url', - 'name' => 'name', - 'active' => 'active', ]; /** @@ -196,12 +196,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'name' => 'setName', + 'active' => 'setActive', 'defaultPriceId' => 'setDefaultPriceId', 'description' => 'setDescription', 'unitLabel' => 'setUnitLabel', 'url' => 'setUrl', - 'name' => 'setName', - 'active' => 'setActive', ]; /** @@ -210,12 +210,12 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'name' => 'getName', + 'active' => 'getActive', 'defaultPriceId' => 'getDefaultPriceId', 'description' => 'getDescription', 'unitLabel' => 'getUnitLabel', 'url' => 'getUrl', - 'name' => 'getName', - 'active' => 'getActive', ]; /** @@ -275,12 +275,12 @@ public function getModelName() */ public function __construct(?array $data = null) { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('active', $data ?? [], null); $this->setIfExists('defaultPriceId', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('unitLabel', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); - $this->setIfExists('name', $data ?? [], null); - $this->setIfExists('active', $data ?? [], null); } /** @@ -326,163 +326,163 @@ public function valid() /** - * Gets defaultPriceId + * Gets name * * @return string|null */ - public function getDefaultPriceId(): ?string + public function getName(): ?string { - return $this->container['defaultPriceId']; + return $this->container['name']; } /** - * Sets defaultPriceId + * Sets name * - * @param string|null $defaultPriceId この商品のデフォルト価格である価格オブジェクトのID。 + * @param string|null $name Checkout などで顧客に表示される商品名 * * @return self */ - public function setDefaultPriceId(?string $defaultPriceId): self + public function setName(?string $name): self { - if (is_null($defaultPriceId)) { - throw new \InvalidArgumentException('non-nullable defaultPriceId cannot be null'); + if (is_null($name)) { + throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['defaultPriceId'] = $defaultPriceId; + $this->container['name'] = $name; return $this; } /** - * Gets description + * Gets active * - * @return string|null + * @return bool|null */ - public function getDescription(): ?string + public function getActive(): ?bool { - return $this->container['description']; + return $this->container['active']; } /** - * Sets description + * Sets active * - * @param string|null $description Checkoutなどで顧客に表示される商品説明。 + * @param bool|null $active 商品が購入可能かどうか * * @return self */ - public function setDescription(?string $description): self + public function setActive(?bool $active): self { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); + if (is_null($active)) { + throw new \InvalidArgumentException('non-nullable active cannot be null'); } - $this->container['description'] = $description; + $this->container['active'] = $active; return $this; } /** - * Gets unitLabel + * Gets defaultPriceId * * @return string|null */ - public function getUnitLabel(): ?string + public function getDefaultPriceId(): ?string { - return $this->container['unitLabel']; + return $this->container['defaultPriceId']; } /** - * Sets unitLabel + * Sets defaultPriceId * - * @param string|null $unitLabel この製品の単位を表すラベル。設定すると、Checkoutや請求書などに表示されます。(例:「個」、「ライセンス」、「時間」、「回」など) + * @param string|null $defaultPriceId この商品のデフォルト価格である価格オブジェクトの ID * * @return self */ - public function setUnitLabel(?string $unitLabel): self + public function setDefaultPriceId(?string $defaultPriceId): self { - if (is_null($unitLabel)) { - throw new \InvalidArgumentException('non-nullable unitLabel cannot be null'); + if (is_null($defaultPriceId)) { + throw new \InvalidArgumentException('non-nullable defaultPriceId cannot be null'); } - $this->container['unitLabel'] = $unitLabel; + $this->container['defaultPriceId'] = $defaultPriceId; return $this; } /** - * Gets url + * Gets description * * @return string|null */ - public function getUrl(): ?string + public function getDescription(): ?string { - return $this->container['url']; + return $this->container['description']; } /** - * Sets url + * Sets description * - * @param string|null $url この製品の公開されているウェブページのURL。 + * @param string|null $description Checkout などで顧客に表示される商品説明 * * @return self */ - public function setUrl(?string $url): self + public function setDescription(?string $description): self { - if (is_null($url)) { - throw new \InvalidArgumentException('non-nullable url cannot be null'); + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); } - $this->container['url'] = $url; + $this->container['description'] = $description; return $this; } /** - * Gets name + * Gets unitLabel * * @return string|null */ - public function getName(): ?string + public function getUnitLabel(): ?string { - return $this->container['name']; + return $this->container['unitLabel']; } /** - * Sets name + * Sets unitLabel * - * @param string|null $name Checkoutなどで顧客に表示される商品名。 + * @param string|null $unitLabel この製品の単位を表すラベル。設定すると、Checkout などに表示されます。(例:「個」、「ライセンス」、「時間」、「回」など) * * @return self */ - public function setName(?string $name): self + public function setUnitLabel(?string $unitLabel): self { - if (is_null($name)) { - throw new \InvalidArgumentException('non-nullable name cannot be null'); + if (is_null($unitLabel)) { + throw new \InvalidArgumentException('non-nullable unitLabel cannot be null'); } - $this->container['name'] = $name; + $this->container['unitLabel'] = $unitLabel; return $this; } /** - * Gets active + * Gets url * - * @return bool|null + * @return string|null */ - public function getActive(): ?bool + public function getUrl(): ?string { - return $this->container['active']; + return $this->container['url']; } /** - * Sets active + * Sets url * - * @param bool|null $active 商品が購入可能かどうか。デフォルトは `true`。 + * @param string|null $url この製品の公開されているウェブページの URL * * @return self */ - public function setActive(?bool $active): self + public function setUrl(?string $url): self { - if (is_null($active)) { - throw new \InvalidArgumentException('non-nullable active cannot be null'); + if (is_null($url)) { + throw new \InvalidArgumentException('non-nullable url cannot be null'); } - $this->container['active'] = $active; + $this->container['url'] = $url; return $this; } diff --git a/lib/Model/SetupFlowCancelRequest.php b/lib/Model/SetupFlowCancelRequest.php index f215823..c0e6976 100644 --- a/lib/Model/SetupFlowCancelRequest.php +++ b/lib/Model/SetupFlowCancelRequest.php @@ -303,7 +303,7 @@ public function getCancellationReason(): ?\PAYJPV2\Model\SetupFlowCancellationRe /** * Sets cancellationReason * - * @param \PAYJPV2\Model\SetupFlowCancellationReason|null $cancellationReason この SetupFlow のキャンセル理由。 | 指定できる値 | |:---| | **abandoned**: 顧客が支払いを完了しなかった場合。 | | **requested_by_customer**: 顧客がキャンセルを要求した場合。 | | **duplicate**: 支払い方法が重複している場合。 | + * @param \PAYJPV2\Model\SetupFlowCancellationReason|null $cancellationReason この SetupFlow のキャンセル理由。 | 値 | |:---| | **abandoned**: 顧客が SetupFlow を完了しなかった場合。 | | **requested_by_customer**: 顧客がキャンセルを要求した場合。 | | **duplicate**: 支払い方法が重複している場合。 | * * @return self */ diff --git a/lib/Model/SetupFlowCreateRequest.php b/lib/Model/SetupFlowCreateRequest.php index 8ea82c7..1e8a4ae 100644 --- a/lib/Model/SetupFlowCreateRequest.php +++ b/lib/Model/SetupFlowCreateRequest.php @@ -59,11 +59,11 @@ class SetupFlowCreateRequest implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPITypes = [ 'customerId' => 'string', - 'description' => 'string', - 'metadata' => 'array', 'paymentMethodOptions' => '\PAYJPV2\Model\SetupFlowPaymentMethodOptionsRequest', 'paymentMethodTypes' => 'string[]', 'usage' => '\PAYJPV2\Model\Usage', + 'description' => 'string', + 'metadata' => 'array', ]; /** @@ -75,11 +75,11 @@ class SetupFlowCreateRequest implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPIFormats = [ 'customerId' => null, - 'description' => null, - 'metadata' => null, 'paymentMethodOptions' => null, 'paymentMethodTypes' => null, 'usage' => null, + 'description' => null, + 'metadata' => null, ]; /** @@ -89,11 +89,11 @@ class SetupFlowCreateRequest implements ModelInterface, ArrayAccess, \JsonSerial */ protected static array $openAPINullables = [ 'customerId' => false, - 'description' => false, - 'metadata' => false, 'paymentMethodOptions' => false, 'paymentMethodTypes' => false, 'usage' => false, + 'description' => false, + 'metadata' => false, ]; /** @@ -183,11 +183,11 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'customerId' => 'customer_id', - 'description' => 'description', - 'metadata' => 'metadata', 'paymentMethodOptions' => 'payment_method_options', 'paymentMethodTypes' => 'payment_method_types', 'usage' => 'usage', + 'description' => 'description', + 'metadata' => 'metadata', ]; /** @@ -197,11 +197,11 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'customerId' => 'setCustomerId', - 'description' => 'setDescription', - 'metadata' => 'setMetadata', 'paymentMethodOptions' => 'setPaymentMethodOptions', 'paymentMethodTypes' => 'setPaymentMethodTypes', 'usage' => 'setUsage', + 'description' => 'setDescription', + 'metadata' => 'setMetadata', ]; /** @@ -211,11 +211,11 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'customerId' => 'getCustomerId', - 'description' => 'getDescription', - 'metadata' => 'getMetadata', 'paymentMethodOptions' => 'getPaymentMethodOptions', 'paymentMethodTypes' => 'getPaymentMethodTypes', 'usage' => 'getUsage', + 'description' => 'getDescription', + 'metadata' => 'getMetadata', ]; /** @@ -291,11 +291,11 @@ public function getPaymentMethodTypesAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('customerId', $data ?? [], null); - $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('paymentMethodOptions', $data ?? [], null); $this->setIfExists('paymentMethodTypes', $data ?? [], null); $this->setIfExists('usage', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('metadata', $data ?? [], null); } /** @@ -353,7 +353,7 @@ public function getCustomerId(): ?string /** * Sets customerId * - * @param string|null $customerId この SetupFlow が属する顧客の ID。SetupFlow に PaymentMethod が設定されている場合、SetupFlow の設定が成功するとその PaymentMethod は顧客に紐付きます。別の顧客に紐付いている PaymentMethod をこの SetupFlow で使用することはできません。 + * @param string|null $customerId この SetupFlow に関連付ける顧客の ID。SetupFlow により作られた PaymentMethod はこの顧客に紐付きます。 * * @return self */ @@ -367,60 +367,6 @@ public function setCustomerId(?string $customerId): self return $this; } - /** - * Gets description - * - * @return string|null - */ - public function getDescription(): ?string - { - return $this->container['description']; - } - - /** - * Sets description - * - * @param string|null $description 説明。顧客に表示されます。 - * - * @return self - */ - public function setDescription(?string $description): self - { - if (is_null($description)) { - throw new \InvalidArgumentException('non-nullable description cannot be null'); - } - $this->container['description'] = $description; - - return $this; - } - - /** - * Gets metadata - * - * @return array|null - */ - public function getMetadata(): ?array - { - return $this->container['metadata']; - } - - /** - * Sets metadata - * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 - * - * @return self - */ - public function setMetadata(?array $metadata): self - { - if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); - } - $this->container['metadata'] = $metadata; - - return $this; - } - /** * Gets paymentMethodOptions * @@ -434,7 +380,7 @@ public function getPaymentMethodOptions(): ?\PAYJPV2\Model\SetupFlowPaymentMetho /** * Sets paymentMethodOptions * - * @param \PAYJPV2\Model\SetupFlowPaymentMethodOptionsRequest|null $paymentMethodOptions この SetupFlow の支払い方法の個別設定。 + * @param \PAYJPV2\Model\SetupFlowPaymentMethodOptionsRequest|null $paymentMethodOptions この SetupFlow 固有の支払い方法の設定 * * @return self */ @@ -461,7 +407,7 @@ public function getPaymentMethodTypes(): ?array /** * Sets paymentMethodTypes * - * @param string[]|null $paymentMethodTypes この SetupFlow で使用できる支払い方法の種類(カードなど)のリストです。 指定しない場合、ダッシュボードで利用可能な状態にしている支払い方法が自動的に設定されます。 + * @param string[]|null $paymentMethodTypes この SetupFlow で使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 * * @return self */ @@ -497,7 +443,7 @@ public function getUsage(): ?\PAYJPV2\Model\Usage /** * Sets usage * - * @param \PAYJPV2\Model\Usage|null $usage 支払い方法が今後どのように使用されるかを指定します。指定されていない場合、この値はデフォルトで `off_session` になります。 | 指定できる値 | |:---| | **off_session**: 定期課金など、顧客がカートなどの決済フローにいるかどうか不明な場合は `off_session` を使用してください。 | | **on_session**: 顧客がカートなどの決済フローにいる場合にのみ支払い方法を利用する場合は `on_session` を使用してください。 | + * @param \PAYJPV2\Model\Usage|null $usage 支払い方法が今後どのように使用されるかを指定します。指定されていない場合、この値はデフォルトで `off_session` になります。 | 値 | |:---| | **off_session**: 定期課金など、顧客がカートなどの決済フローにいるかどうか不明な場合は `off_session` を使用してください。 | | **on_session**: 顧客がカートなどの決済フローにいる場合にのみ支払い方法を利用する場合は `on_session` を使用してください。 | * * @return self */ @@ -510,6 +456,60 @@ public function setUsage(?\PAYJPV2\Model\Usage $usage): self return $this; } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description 説明。顧客に表示されます。 + * + * @return self + */ + public function setDescription(?string $description): self + { + if (is_null($description)) { + throw new \InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets metadata + * + * @return array|null + */ + public function getMetadata(): ?array + { + return $this->container['metadata']; + } + + /** + * Sets metadata + * + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 + * + * @return self + */ + public function setMetadata(?array $metadata): self + { + if (is_null($metadata)) { + throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + } + $this->container['metadata'] = $metadata; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/SetupFlowDataRequest.php b/lib/Model/SetupFlowDataRequest.php index 9c5f953..6136046 100644 --- a/lib/Model/SetupFlowDataRequest.php +++ b/lib/Model/SetupFlowDataRequest.php @@ -303,7 +303,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ diff --git a/lib/Model/SetupFlowPaymentMethodOptionsCardRequest.php b/lib/Model/SetupFlowPaymentMethodOptionsCardRequest.php index 063371b..2775de2 100644 --- a/lib/Model/SetupFlowPaymentMethodOptionsCardRequest.php +++ b/lib/Model/SetupFlowPaymentMethodOptionsCardRequest.php @@ -327,7 +327,7 @@ public function getRequestThreeDSecure(): ?string /** * Sets requestThreeDSecure * - * @param string|null $requestThreeDSecure 3Dセキュア認証の要求方法。 | 指定できる値 | |:---| | **any**: 3Dセキュア認証を要求します。 | | **automatic**: 必要な場合にのみ3Dセキュア認証を要求します。 | + * @param string|null $requestThreeDSecure 3D セキュア認証の要求方法。 | 値 | |:---| | **any**: 3D セキュア認証を要求します。 | | **automatic**: 必要な場合にのみ 3D セキュア認証を要求します。 | * * @return self */ diff --git a/lib/Model/SetupFlowResponse.php b/lib/Model/SetupFlowResponse.php index a7b9cc4..2752b1f 100644 --- a/lib/Model/SetupFlowResponse.php +++ b/lib/Model/SetupFlowResponse.php @@ -58,10 +58,8 @@ class SetupFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializabl * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', 'object' => 'string', - 'createdAt' => '\DateTime', - 'updatedAt' => '\DateTime', + 'id' => 'string', 'livemode' => 'bool', 'clientSecret' => 'string', 'customerId' => 'string', @@ -74,6 +72,9 @@ class SetupFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'nextAction' => 'array', 'returnUrl' => 'string', 'lastSetupError' => 'array', + 'cancellationReason' => '\PAYJPV2\Model\SetupFlowCancellationReason', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime', ]; /** @@ -84,10 +85,8 @@ class SetupFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializabl * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'object' => null, - 'createdAt' => 'date-time', - 'updatedAt' => 'date-time', + 'id' => null, 'livemode' => null, 'clientSecret' => null, 'customerId' => null, @@ -100,6 +99,9 @@ class SetupFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'nextAction' => null, 'returnUrl' => null, 'lastSetupError' => null, + 'cancellationReason' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time', ]; /** @@ -108,10 +110,8 @@ class SetupFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializabl * @var bool[] */ protected static array $openAPINullables = [ - 'id' => false, 'object' => false, - 'createdAt' => false, - 'updatedAt' => false, + 'id' => false, 'livemode' => false, 'clientSecret' => false, 'customerId' => true, @@ -124,6 +124,9 @@ class SetupFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'nextAction' => true, 'returnUrl' => true, 'lastSetupError' => true, + 'cancellationReason' => true, + 'createdAt' => false, + 'updatedAt' => false, ]; /** @@ -212,10 +215,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'object' => 'object', - 'createdAt' => 'created_at', - 'updatedAt' => 'updated_at', + 'id' => 'id', 'livemode' => 'livemode', 'clientSecret' => 'client_secret', 'customerId' => 'customer_id', @@ -228,6 +229,9 @@ public function isNullableSetToNull(string $property): bool 'nextAction' => 'next_action', 'returnUrl' => 'return_url', 'lastSetupError' => 'last_setup_error', + 'cancellationReason' => 'cancellation_reason', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', ]; /** @@ -236,10 +240,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'object' => 'setObject', - 'createdAt' => 'setCreatedAt', - 'updatedAt' => 'setUpdatedAt', + 'id' => 'setId', 'livemode' => 'setLivemode', 'clientSecret' => 'setClientSecret', 'customerId' => 'setCustomerId', @@ -252,6 +254,9 @@ public function isNullableSetToNull(string $property): bool 'nextAction' => 'setNextAction', 'returnUrl' => 'setReturnUrl', 'lastSetupError' => 'setLastSetupError', + 'cancellationReason' => 'setCancellationReason', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', ]; /** @@ -260,10 +265,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'object' => 'getObject', - 'createdAt' => 'getCreatedAt', - 'updatedAt' => 'getUpdatedAt', + 'id' => 'getId', 'livemode' => 'getLivemode', 'clientSecret' => 'getClientSecret', 'customerId' => 'getCustomerId', @@ -276,6 +279,9 @@ public function isNullableSetToNull(string $property): bool 'nextAction' => 'getNextAction', 'returnUrl' => 'getReturnUrl', 'lastSetupError' => 'getLastSetupError', + 'cancellationReason' => 'getCancellationReason', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', ]; /** @@ -348,10 +354,8 @@ public function getObjectAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('object', $data ?? [], 'setup_flow'); - $this->setIfExists('createdAt', $data ?? [], null); - $this->setIfExists('updatedAt', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('clientSecret', $data ?? [], null); $this->setIfExists('customerId', $data ?? [], null); @@ -364,6 +368,9 @@ public function __construct(?array $data = null) $this->setIfExists('nextAction', $data ?? [], null); $this->setIfExists('returnUrl', $data ?? [], null); $this->setIfExists('lastSetupError', $data ?? [], null); + $this->setIfExists('cancellationReason', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('updatedAt', $data ?? [], null); } /** @@ -393,9 +400,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } $allowedValues = $this->getObjectAllowableValues(); if (! is_null($this->container['object']) && ! in_array($this->container['object'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -405,11 +409,8 @@ public function listInvalidProperties() ); } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['updatedAt'] === null) { - $invalidProperties[] = "'updatedAt' can't be null"; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; } if ($this->container['livemode'] === null) { $invalidProperties[] = "'livemode' can't be null"; @@ -447,6 +448,15 @@ public function listInvalidProperties() if ($this->container['lastSetupError'] === null) { $invalidProperties[] = "'lastSetupError' can't be null"; } + if ($this->container['cancellationReason'] === null) { + $invalidProperties[] = "'cancellationReason' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } return $invalidProperties; } @@ -463,37 +473,6 @@ public function valid() } - /** - * Gets id - * - * @return string - */ - public function getId(): string - { - if ($this->container['id'] === null) { - throw new \LogicException('Property "id" is required but has not been set.'); - } - - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID - * - * @return self - */ - public function setId(string $id): self - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets object * @@ -532,63 +511,32 @@ public function setObject(?string $object): self } /** - * Gets createdAt - * - * @return \DateTime - */ - public function getCreatedAt(): \DateTime - { - if ($this->container['createdAt'] === null) { - throw new \LogicException('Property "createdAt" is required but has not been set.'); - } - - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) - * - * @return self - */ - public function setCreatedAt(\DateTime $createdAt): self - { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets updatedAt + * Gets id * - * @return \DateTime + * @return string */ - public function getUpdatedAt(): \DateTime + public function getId(): string { - if ($this->container['updatedAt'] === null) { - throw new \LogicException('Property "updatedAt" is required but has not been set.'); + if ($this->container['id'] === null) { + throw new \LogicException('Property "id" is required but has not been set.'); } - return $this->container['updatedAt']; + return $this->container['id']; } /** - * Sets updatedAt + * Sets id * - * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) + * @param string $id ID * * @return self */ - public function setUpdatedAt(\DateTime $updatedAt): self + public function setId(string $id): self { - if (is_null($updatedAt)) { - throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['updatedAt'] = $updatedAt; + $this->container['id'] = $id; return $this; } @@ -641,7 +589,7 @@ public function getClientSecret(): string /** * Sets clientSecret * - * @param string $clientSecret この SetupFlow のクライアントシークレットです。フロントエンドで公開鍵と合わせて使用し、SetupFlow の取得や支払い処理を行います。**この値はこの SetupFlow の支払いを行う顧客以外へ公開しないでください。 + * @param string $clientSecret この SetupFlow のクライアントシークレットです。フロントエンドで公開鍵と合わせて使用し、SetupFlow の取得や支払い方法の登録処理を行います。**この値はこの SetupFlow を利用する顧客以外へ公開しないでください。 * * @return self */ @@ -839,7 +787,7 @@ public function getPaymentMethodTypes(): array /** * Sets paymentMethodTypes * - * @param \PAYJPV2\Model\PaymentMethodTypes[] $paymentMethodTypes この SetupFlow で使用できる支払い方法の種類(カードなど)のリストです。 指定しない場合、ダッシュボードで利用可能な状態にしている支払い方法が自動的に設定されます。 + * @param \PAYJPV2\Model\PaymentMethodTypes[] $paymentMethodTypes この SetupFlow で使用できる支払い方法の種類のリスト * * @return self */ @@ -870,7 +818,7 @@ public function getStatus(): \PAYJPV2\Model\SetupFlowStatus /** * Sets status * - * @param \PAYJPV2\Model\SetupFlowStatus $status この SetupFlow のステータスです。ステータスの詳細についてはこちらをご覧ください。 | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **succeeded**: 成功しました。 | | **canceled**: キャンセルされました。 | + * @param \PAYJPV2\Model\SetupFlowStatus $status この SetupFlow のステータスです。ステータスの詳細についてはこちらをご覧ください。 | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **succeeded**: 成功しました。 | | **canceled**: キャンセルされました。 | * * @return self */ @@ -985,6 +933,102 @@ public function setLastSetupError(?array $lastSetupError): self return $this; } + + /** + * Gets cancellationReason + * + * @return \PAYJPV2\Model\SetupFlowCancellationReason|null + */ + public function getCancellationReason(): ?\PAYJPV2\Model\SetupFlowCancellationReason + { + return $this->container['cancellationReason']; + } + + /** + * Sets cancellationReason + * + * @param \PAYJPV2\Model\SetupFlowCancellationReason|null $cancellationReason cancellationReason + * + * @return self + */ + public function setCancellationReason(?\PAYJPV2\Model\SetupFlowCancellationReason $cancellationReason): self + { + if (is_null($cancellationReason)) { + array_push($this->openAPINullablesSetToNull, 'cancellationReason'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('cancellationReason', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['cancellationReason'] = $cancellationReason; + + return $this; + } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt(): \DateTime + { + if ($this->container['createdAt'] === null) { + throw new \LogicException('Property "createdAt" is required but has not been set.'); + } + + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setCreatedAt(\DateTime $createdAt): self + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return \DateTime + */ + public function getUpdatedAt(): \DateTime + { + if ($this->container['updatedAt'] === null) { + throw new \LogicException('Property "updatedAt" is required but has not been set.'); + } + + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setUpdatedAt(\DateTime $updatedAt): self + { + if (is_null($updatedAt)) { + throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + } + $this->container['updatedAt'] = $updatedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/SetupFlowUpdateRequest.php b/lib/Model/SetupFlowUpdateRequest.php index 062eb6d..23d4408 100644 --- a/lib/Model/SetupFlowUpdateRequest.php +++ b/lib/Model/SetupFlowUpdateRequest.php @@ -346,7 +346,7 @@ public function getCustomerId(): ?string /** * Sets customerId * - * @param string|null $customerId この SetupFlow が属する顧客の ID。SetupFlow に PaymentMethod が設定されている場合、SetupFlow の設定が成功するとその PaymentMethod は顧客に紐付きます。別の顧客に紐付いている PaymentMethod をこの SetupFlow で使用することはできません。 + * @param string|null $customerId この SetupFlow に関連付ける顧客の ID。SetupFlow により作られた PaymentMethod はこの顧客に紐付きます。 * * @return self */ @@ -373,7 +373,7 @@ public function getPaymentMethodOptions(): ?\PAYJPV2\Model\SetupFlowPaymentMetho /** * Sets paymentMethodOptions * - * @param \PAYJPV2\Model\SetupFlowPaymentMethodOptionsRequest|null $paymentMethodOptions この SetupFlow の支払い方法の個別設定。 + * @param \PAYJPV2\Model\SetupFlowPaymentMethodOptionsRequest|null $paymentMethodOptions この SetupFlow 固有の支払い方法の設定 * * @return self */ @@ -400,7 +400,7 @@ public function getPaymentMethodTypes(): ?array /** * Sets paymentMethodTypes * - * @param string[]|null $paymentMethodTypes この SetupFlow で使用できる支払い方法の種類(カードなど)のリストです。 指定しない場合、ダッシュボードで利用可能な状態にしている支払い方法が自動的に設定されます。 + * @param string[]|null $paymentMethodTypes この SetupFlow で使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 * * @return self */ @@ -463,7 +463,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ diff --git a/lib/Model/StatementResponse.php b/lib/Model/StatementResponse.php index c3c60c7..50df6eb 100644 --- a/lib/Model/StatementResponse.php +++ b/lib/Model/StatementResponse.php @@ -63,12 +63,12 @@ class StatementResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'livemode' => 'bool', 'title' => 'string', 'type' => '\PAYJPV2\Model\StatementType', - 'createdAt' => '\DateTime', - 'updatedAt' => '\DateTime', 'term' => '\PAYJPV2\Model\TermResponse', 'balanceId' => 'string', 'items' => '\PAYJPV2\Model\StatementItemResponse[]', 'net' => 'int', + 'createdAt' => '\DateTime', + 'updatedAt' => '\DateTime', ]; /** @@ -84,12 +84,12 @@ class StatementResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'livemode' => null, 'title' => null, 'type' => null, - 'createdAt' => 'date-time', - 'updatedAt' => 'date-time', 'term' => null, 'balanceId' => null, 'items' => null, 'net' => null, + 'createdAt' => 'date-time', + 'updatedAt' => 'date-time', ]; /** @@ -103,12 +103,12 @@ class StatementResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'livemode' => false, 'title' => true, 'type' => false, - 'createdAt' => false, - 'updatedAt' => false, 'term' => true, 'balanceId' => true, 'items' => false, 'net' => false, + 'createdAt' => false, + 'updatedAt' => false, ]; /** @@ -202,12 +202,12 @@ public function isNullableSetToNull(string $property): bool 'livemode' => 'livemode', 'title' => 'title', 'type' => 'type', - 'createdAt' => 'created_at', - 'updatedAt' => 'updated_at', 'term' => 'term', 'balanceId' => 'balance_id', 'items' => 'items', 'net' => 'net', + 'createdAt' => 'created_at', + 'updatedAt' => 'updated_at', ]; /** @@ -221,12 +221,12 @@ public function isNullableSetToNull(string $property): bool 'livemode' => 'setLivemode', 'title' => 'setTitle', 'type' => 'setType', - 'createdAt' => 'setCreatedAt', - 'updatedAt' => 'setUpdatedAt', 'term' => 'setTerm', 'balanceId' => 'setBalanceId', 'items' => 'setItems', 'net' => 'setNet', + 'createdAt' => 'setCreatedAt', + 'updatedAt' => 'setUpdatedAt', ]; /** @@ -240,12 +240,12 @@ public function isNullableSetToNull(string $property): bool 'livemode' => 'getLivemode', 'title' => 'getTitle', 'type' => 'getType', - 'createdAt' => 'getCreatedAt', - 'updatedAt' => 'getUpdatedAt', 'term' => 'getTerm', 'balanceId' => 'getBalanceId', 'items' => 'getItems', 'net' => 'getNet', + 'createdAt' => 'getCreatedAt', + 'updatedAt' => 'getUpdatedAt', ]; /** @@ -323,12 +323,12 @@ public function __construct(?array $data = null) $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('title', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('createdAt', $data ?? [], null); - $this->setIfExists('updatedAt', $data ?? [], null); $this->setIfExists('term', $data ?? [], null); $this->setIfExists('balanceId', $data ?? [], null); $this->setIfExists('items', $data ?? [], null); $this->setIfExists('net', $data ?? [], null); + $this->setIfExists('createdAt', $data ?? [], null); + $this->setIfExists('updatedAt', $data ?? [], null); } /** @@ -379,12 +379,6 @@ public function listInvalidProperties() if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } - if ($this->container['createdAt'] === null) { - $invalidProperties[] = "'createdAt' can't be null"; - } - if ($this->container['updatedAt'] === null) { - $invalidProperties[] = "'updatedAt' can't be null"; - } if ($this->container['term'] === null) { $invalidProperties[] = "'term' can't be null"; } @@ -397,6 +391,12 @@ public function listInvalidProperties() if ($this->container['net'] === null) { $invalidProperties[] = "'net' can't be null"; } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['updatedAt'] === null) { + $invalidProperties[] = "'updatedAt' can't be null"; + } return $invalidProperties; } @@ -467,7 +467,7 @@ public function getId(): string /** * Sets id * - * @param string $id 明細ID + * @param string $id 明細 ID * * @return self */ @@ -563,7 +563,7 @@ public function getType(): \PAYJPV2\Model\StatementType /** * Sets type * - * @param \PAYJPV2\Model\StatementType $type 取引明細の区分 | 名 | 区分 | 詳細 | |---| --- | --- | | **sales** | 売上 | 決済による売上、決済手数料等 | | **service_fee** | サービス利用料 | 有料プランの月額費用など、salesに含まれないサービス利用料 | | **forfeit** | 残高失効 | - | | **transfer_fee** | 振込手数料 | - | | **misc** | その他 | 調整金など | + * @param \PAYJPV2\Model\StatementType $type 取引明細の区分 | 値 | 区分 | 詳細 | |---| --- | --- | | **sales** | 売上 | 決済による売上、決済手数料等 | | **service_fee** | サービス利用料 | 有料プランの月額費用など、sales に含まれないサービス利用料 | | **forfeit** | 残高失効 | - | | **transfer_fee** | 振込手数料 | - | | **misc** | その他 | 調整金など | * * @return self */ @@ -577,68 +577,6 @@ public function setType(\PAYJPV2\Model\StatementType $type): self return $this; } - /** - * Gets createdAt - * - * @return \DateTime - */ - public function getCreatedAt(): \DateTime - { - if ($this->container['createdAt'] === null) { - throw new \LogicException('Property "createdAt" is required but has not been set.'); - } - - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param \DateTime $createdAt 更新時の日時 (UTC, ISO 8601 形式) - * - * @return self - */ - public function setCreatedAt(\DateTime $createdAt): self - { - if (is_null($createdAt)) { - throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); - } - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets updatedAt - * - * @return \DateTime - */ - public function getUpdatedAt(): \DateTime - { - if ($this->container['updatedAt'] === null) { - throw new \LogicException('Property "updatedAt" is required but has not been set.'); - } - - return $this->container['updatedAt']; - } - - /** - * Sets updatedAt - * - * @param \DateTime $updatedAt 更新時の日時 (UTC, ISO 8601 形式) - * - * @return self - */ - public function setUpdatedAt(\DateTime $updatedAt): self - { - if (is_null($updatedAt)) { - throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); - } - $this->container['updatedAt'] = $updatedAt; - - return $this; - } - /** * Gets term * @@ -755,7 +693,7 @@ public function getNet(): int /** * Sets net * - * @param int $net 含まれるstatement_itemの金額合計 + * @param int $net 含まれる statement_item の金額合計 * * @return self */ @@ -768,6 +706,68 @@ public function setNet(int $net): self return $this; } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt(): \DateTime + { + if ($this->container['createdAt'] === null) { + throw new \LogicException('Property "createdAt" is required but has not been set.'); + } + + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt 作成日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setCreatedAt(\DateTime $createdAt): self + { + if (is_null($createdAt)) { + throw new \InvalidArgumentException('non-nullable createdAt cannot be null'); + } + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets updatedAt + * + * @return \DateTime + */ + public function getUpdatedAt(): \DateTime + { + if ($this->container['updatedAt'] === null) { + throw new \LogicException('Property "updatedAt" is required but has not been set.'); + } + + return $this->container['updatedAt']; + } + + /** + * Sets updatedAt + * + * @param \DateTime $updatedAt 更新日時 (UTC, ISO 8601 形式) + * + * @return self + */ + public function setUpdatedAt(\DateTime $updatedAt): self + { + if (is_null($updatedAt)) { + throw new \InvalidArgumentException('non-nullable updatedAt cannot be null'); + } + $this->container['updatedAt'] = $updatedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/StatementURLResponse.php b/lib/Model/StatementURLResponse.php index 370ec53..c6a6bb7 100644 --- a/lib/Model/StatementURLResponse.php +++ b/lib/Model/StatementURLResponse.php @@ -387,7 +387,7 @@ public function getUrl(): string /** * Sets url * - * @param string $url 取引明細書ダウンロードURL + * @param string $url 取引明細書ダウンロード URL * * @return self */ @@ -418,7 +418,7 @@ public function getExpires(): \DateTime /** * Sets expires * - * @param \DateTime $expires 有効期限の日付。 有効期限は発行から1時間です。 + * @param \DateTime $expires 有効期限の日付 有効期限は発行から1時間です。 * * @return self */ diff --git a/lib/Model/TaxRateCreateRequest.php b/lib/Model/TaxRateCreateRequest.php index b882801..c26dbcc 100644 --- a/lib/Model/TaxRateCreateRequest.php +++ b/lib/Model/TaxRateCreateRequest.php @@ -421,7 +421,7 @@ public function getPercentage(): float /** * Sets percentage * - * @param float $percentage 税率を % 単位で指定します(例: 10%の場合は「10」と入力) + * @param float $percentage 税率を % 単位で指定します(例: 10%の場合は「10」と入力) * * @return self */ @@ -502,7 +502,7 @@ public function getDescription(): ?string /** * Sets description * - * @param string|null $description 説明。ダッシュボード内のみで表示され、顧客には表示されません。 + * @param string|null $description 説明。管理画面内のみで表示され、顧客には表示されません。 * * @return self */ @@ -529,7 +529,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ diff --git a/lib/Model/TaxRateDetailsResponse.php b/lib/Model/TaxRateDetailsResponse.php index a4f5953..3505355 100644 --- a/lib/Model/TaxRateDetailsResponse.php +++ b/lib/Model/TaxRateDetailsResponse.php @@ -447,7 +447,7 @@ public function getId(): string /** * Sets id * - * @param string $id ID + * @param string $id 税率 ID * * @return self */ @@ -540,7 +540,7 @@ public function getPercentage(): float /** * Sets percentage * - * @param float $percentage 税率を % 単位で指定します(例: 10%の場合は「10」と入力) + * @param float $percentage 税率 (% 単位) * * @return self */ @@ -571,7 +571,7 @@ public function getActive(): bool /** * Sets active * - * @param bool $active この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 + * @param bool $active この税率が有効であるかどうか * * @return self */ diff --git a/lib/Model/TaxRateUpdateRequest.php b/lib/Model/TaxRateUpdateRequest.php index f68c43b..4bcb9fe 100644 --- a/lib/Model/TaxRateUpdateRequest.php +++ b/lib/Model/TaxRateUpdateRequest.php @@ -385,7 +385,7 @@ public function getDescription(): ?string /** * Sets description * - * @param string|null $description 説明。ダッシュボード内のみで表示され、顧客には表示されません。 + * @param string|null $description 説明。管理画面内のみで表示され、顧客には表示されません。 * * @return self */ @@ -439,7 +439,7 @@ public function getMetadata(): ?array /** * Sets metadata * - * @param array|null $metadata キーバリューの任意のデータを格納できます。詳細はメタデータのドキュメントを参照してください。 + * @param array|null $metadata キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 * * @return self */ diff --git a/lib/Model/TermResponse.php b/lib/Model/TermResponse.php index 4f87b72..a1be4ef 100644 --- a/lib/Model/TermResponse.php +++ b/lib/Model/TermResponse.php @@ -58,8 +58,8 @@ class TermResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', 'object' => 'string', + 'id' => 'string', 'livemode' => 'bool', 'startAt' => '\DateTime', 'endAt' => '\DateTime', @@ -74,8 +74,8 @@ class TermResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, 'object' => null, + 'id' => null, 'livemode' => null, 'startAt' => 'date-time', 'endAt' => 'date-time', @@ -88,8 +88,8 @@ class TermResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @var bool[] */ protected static array $openAPINullables = [ - 'id' => false, 'object' => false, + 'id' => false, 'livemode' => false, 'startAt' => false, 'endAt' => false, @@ -182,8 +182,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', 'object' => 'object', + 'id' => 'id', 'livemode' => 'livemode', 'startAt' => 'start_at', 'endAt' => 'end_at', @@ -196,8 +196,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'id' => 'setId', 'object' => 'setObject', + 'id' => 'setId', 'livemode' => 'setLivemode', 'startAt' => 'setStartAt', 'endAt' => 'setEndAt', @@ -210,8 +210,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'id' => 'getId', 'object' => 'getObject', + 'id' => 'getId', 'livemode' => 'getLivemode', 'startAt' => 'getStartAt', 'endAt' => 'getEndAt', @@ -288,8 +288,8 @@ public function getObjectAllowableValues() */ public function __construct(?array $data = null) { - $this->setIfExists('id', $data ?? [], null); $this->setIfExists('object', $data ?? [], 'term'); + $this->setIfExists('id', $data ?? [], null); $this->setIfExists('livemode', $data ?? [], null); $this->setIfExists('startAt', $data ?? [], null); $this->setIfExists('endAt', $data ?? [], null); @@ -323,9 +323,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['id'] === null) { - $invalidProperties[] = "'id' can't be null"; - } $allowedValues = $this->getObjectAllowableValues(); if (! is_null($this->container['object']) && ! in_array($this->container['object'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -335,6 +332,9 @@ public function listInvalidProperties() ); } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } if ($this->container['livemode'] === null) { $invalidProperties[] = "'livemode' can't be null"; } @@ -363,37 +363,6 @@ public function valid() } - /** - * Gets id - * - * @return string - */ - public function getId(): string - { - if ($this->container['id'] === null) { - throw new \LogicException('Property "id" is required but has not been set.'); - } - - return $this->container['id']; - } - - /** - * Sets id - * - * @param string $id ID - * - * @return self - */ - public function setId(string $id): self - { - if (is_null($id)) { - throw new \InvalidArgumentException('non-nullable id cannot be null'); - } - $this->container['id'] = $id; - - return $this; - } - /** * Gets object * @@ -431,6 +400,37 @@ public function setObject(?string $object): self return $this; } + /** + * Gets id + * + * @return string + */ + public function getId(): string + { + if ($this->container['id'] === null) { + throw new \LogicException('Property "id" is required but has not been set.'); + } + + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id 集計区間 ID + * + * @return self + */ + public function setId(string $id): self + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + /** * Gets livemode * @@ -510,7 +510,7 @@ public function getEndAt(): \DateTime /** * Sets endAt * - * @param \DateTime $endAt 区間終了時刻 Termが表す区間はstart_at 以上 end_at 未満 の範囲となります。 翌サイクルのTermの場合nullを返します。 + * @param \DateTime $endAt 区間終了時刻 Term が表す区間は start_at 以上 end_at 未満の範囲となります。 翌サイクルの Term の場合 null を返します。 * * @return self */ @@ -541,7 +541,7 @@ public function getClosed(): bool /** * Sets closed * - * @param bool $closed 締め処理が完了済みならTrue + * @param bool $closed 締め処理が完了済みなら true * * @return self */ diff --git a/test/Model/BalanceResponseTest.php b/test/Model/BalanceResponseTest.php index 71438bc..6ee844a 100644 --- a/test/Model/BalanceResponseTest.php +++ b/test/Model/BalanceResponseTest.php @@ -106,24 +106,6 @@ public function testPropertyLivemode() self::markTestIncomplete('Not implemented'); } - /** - * Test attribute "createdAt" - */ - public function testPropertyCreatedAt() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "updatedAt" - */ - public function testPropertyUpdatedAt() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - /** * Test attribute "state" */ @@ -186,4 +168,22 @@ public function testPropertyBankInfo() // TODO: implement self::markTestIncomplete('Not implemented'); } + + /** + * Test attribute "createdAt" + */ + public function testPropertyCreatedAt() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "updatedAt" + */ + public function testPropertyUpdatedAt() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } } diff --git a/test/Model/CheckoutSessionCreateRequestTest.php b/test/Model/CheckoutSessionCreateRequestTest.php index 9b7f393..b6e2260 100644 --- a/test/Model/CheckoutSessionCreateRequestTest.php +++ b/test/Model/CheckoutSessionCreateRequestTest.php @@ -79,6 +79,15 @@ public function testCheckoutSessionCreateRequest() self::markTestIncomplete('Not implemented'); } + /** + * Test attribute "mode" + */ + public function testPropertyMode() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + /** * Test attribute "clientReferenceId" */ @@ -124,15 +133,6 @@ public function testPropertyLineItems() self::markTestIncomplete('Not implemented'); } - /** - * Test attribute "mode" - */ - public function testPropertyMode() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - /** * Test attribute "metadata" */ @@ -188,9 +188,9 @@ public function testPropertyLocale() } /** - * Test attribute "paymentFlowData" + * Test attribute "paymentMethodTypes" */ - public function testPropertyPaymentFlowData() + public function testPropertyPaymentMethodTypes() { // TODO: implement self::markTestIncomplete('Not implemented'); @@ -206,27 +206,27 @@ public function testPropertyPaymentMethodOptions() } /** - * Test attribute "paymentMethodTypes" + * Test attribute "paymentFlowData" */ - public function testPropertyPaymentMethodTypes() + public function testPropertyPaymentFlowData() { // TODO: implement self::markTestIncomplete('Not implemented'); } /** - * Test attribute "setupFlowData" + * Test attribute "submitType" */ - public function testPropertySetupFlowData() + public function testPropertySubmitType() { // TODO: implement self::markTestIncomplete('Not implemented'); } /** - * Test attribute "submitType" + * Test attribute "setupFlowData" */ - public function testPropertySubmitType() + public function testPropertySetupFlowData() { // TODO: implement self::markTestIncomplete('Not implemented'); diff --git a/test/Model/CheckoutSessionCustomerDetailsAddressResponseTest.php b/test/Model/CheckoutSessionCustomerDetailsAddressResponseTest.php new file mode 100644 index 0000000..8305ca7 --- /dev/null +++ b/test/Model/CheckoutSessionCustomerDetailsAddressResponseTest.php @@ -0,0 +1,135 @@ +