diff --git a/README.md b/README.md index 7978d6f..b920fe7 100644 --- a/README.md +++ b/README.md @@ -246,6 +246,8 @@ Class | Method | HTTP request | Description - [ProductDetailsResponse](docs/Model/ProductDetailsResponse.md) - [ProductListResponse](docs/Model/ProductListResponse.md) - [ProductUpdateRequest](docs/Model/ProductUpdateRequest.md) +- [RedirectOptionsRequest](docs/Model/RedirectOptionsRequest.md) +- [RedirectOptionsResponse](docs/Model/RedirectOptionsResponse.md) - [SetupFlowCancelRequest](docs/Model/SetupFlowCancelRequest.md) - [SetupFlowCancellationReason](docs/Model/SetupFlowCancellationReason.md) - [SetupFlowCreateRequest](docs/Model/SetupFlowCreateRequest.md) @@ -266,6 +268,7 @@ Class | Method | HTTP request | Description - [TaxRateDetailsResponse](docs/Model/TaxRateDetailsResponse.md) - [TaxRateListResponse](docs/Model/TaxRateListResponse.md) - [TaxRateUpdateRequest](docs/Model/TaxRateUpdateRequest.md) +- [TaxType](docs/Model/TaxType.md) - [TermListResponse](docs/Model/TermListResponse.md) - [TermResponse](docs/Model/TermResponse.md) - [Usage](docs/Model/Usage.md) diff --git a/docs/Model/CheckoutSessionCreateRequest.md b/docs/Model/CheckoutSessionCreateRequest.md index 6d261a4..f7d21e2 100644 --- a/docs/Model/CheckoutSessionCreateRequest.md +++ b/docs/Model/CheckoutSessionCreateRequest.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **metadata** | **array** | キーバリューの任意のデータを格納できます。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] +**redirectOptions** | [**\PAYJPV2\Model\RedirectOptionsRequest**](RedirectOptionsRequest.md) | Checkout から success_url へリダイレクトする際のオプション。Checkout が作成する PaymentFlow / SetupFlow に引き継がれます。 | [optional] **currency** | [**\PAYJPV2\Model\Currency**](Currency.md) | 価格の通貨。現在は `jpy` のみサポートしています。 | [optional] **expiresAt** | **\DateTime** | Checkout Session の有効期限が失効する日時 | [optional] **locale** | [**\PAYJPV2\Model\Locale**](Locale.md) | Checkout 画面の表示言語を指定します。 | 指定できる値 | |:---| | **ja**: 日本語で表示します。 | | [optional] diff --git a/docs/Model/CheckoutSessionDetailsResponse.md b/docs/Model/CheckoutSessionDetailsResponse.md index ec29900..94b8312 100644 --- a/docs/Model/CheckoutSessionDetailsResponse.md +++ b/docs/Model/CheckoutSessionDetailsResponse.md @@ -25,6 +25,7 @@ Name | Type | Description | Notes **status** | [**\PAYJPV2\Model\CheckoutSessionStatus**](CheckoutSessionStatus.md) | チェックアウトセッションのステータス | **successUrl** | **string** | | **cancelUrl** | **string** | | +**redirectOptions** | [**\PAYJPV2\Model\RedirectOptionsResponse**](RedirectOptionsResponse.md) | success_url へリダイレクトする際のオプション | **url** | **string** | URL | **metadata** | **array** | メタデータ | **createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | diff --git a/docs/Model/PaymentFlowCreateRequest.md b/docs/Model/PaymentFlowCreateRequest.md index c1d6a4d..9ad20b4 100644 --- a/docs/Model/PaymentFlowCreateRequest.md +++ b/docs/Model/PaymentFlowCreateRequest.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **captureMethod** | [**\PAYJPV2\Model\CaptureMethod**](CaptureMethod.md) | 支払いの確定方法を指定します。 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Payment Flow の Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | [optional] **confirm** | **bool** | 「true」に設定すると、この PaymentFlow を直ちに確定しようと試みます。 | [optional] [default to false] **returnUrl** | **string** | 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。confirm=true の場合のみ指定できます。 | [optional] +**redirectOptions** | [**\PAYJPV2\Model\RedirectOptionsRequest**](RedirectOptionsRequest.md) | return_url へリダイレクトする際のオプション | [optional] **description** | **string** | オブジェクトにセットする任意の文字列。 | [optional] **metadata** | **array** | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] diff --git a/docs/Model/PaymentFlowResponse.md b/docs/Model/PaymentFlowResponse.md index 7f37944..94780ed 100644 --- a/docs/Model/PaymentFlowResponse.md +++ b/docs/Model/PaymentFlowResponse.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **status** | [**\PAYJPV2\Model\PaymentFlowStatus**](PaymentFlowStatus.md) | この PaymentFlow のステータス。 | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **requires_capture**: 確定が必要です。 | | **canceled**: キャンセルされました。 | | **succeeded**: 成功しました。 | | **nextAction** | **array** | | **returnUrl** | **string** | | +**redirectOptions** | [**\PAYJPV2\Model\RedirectOptionsResponse**](RedirectOptionsResponse.md) | return_url へリダイレクトする際のオプション | **captureMethod** | [**\PAYJPV2\Model\CaptureMethod**](CaptureMethod.md) | 支払いの確定方法 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | **lastPaymentError** | **array** | | **cancellationReason** | [**\PAYJPV2\Model\PaymentFlowCancellationReason**](PaymentFlowCancellationReason.md) | | diff --git a/docs/Model/PaymentFlowUpdateRequest.md b/docs/Model/PaymentFlowUpdateRequest.md index ad0e306..119f68d 100644 --- a/docs/Model/PaymentFlowUpdateRequest.md +++ b/docs/Model/PaymentFlowUpdateRequest.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **paymentMethodOptions** | [**\PAYJPV2\Model\PaymentFlowPaymentMethodOptionsRequest**](PaymentFlowPaymentMethodOptionsRequest.md) | この PaymentFlow 固有の支払い方法の設定 | [optional] **paymentMethodTypes** | [**\PAYJPV2\Model\PaymentMethodTypes[]**](PaymentMethodTypes.md) | この PaymentFlow で使用できる支払い方法の種類のリスト。指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] **returnUrl** | **string** | 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。 | [optional] +**redirectOptions** | [**\PAYJPV2\Model\RedirectOptionsRequest**](RedirectOptionsRequest.md) | return_url へリダイレクトする際のオプション | [optional] **description** | **string** | オブジェクトにセットする任意の文字列。 | [optional] **metadata** | **array** | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] diff --git a/docs/Model/RedirectOptionsRequest.md b/docs/Model/RedirectOptionsRequest.md new file mode 100644 index 0000000..3410877 --- /dev/null +++ b/docs/Model/RedirectOptionsRequest.md @@ -0,0 +1,9 @@ +# # RedirectOptionsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**includeClientSecret** | **bool** | return_url へリダイレクトする際、クエリパラメーターに client_secret を付与するかどうか。デフォルトは `true` です。 | [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/RedirectOptionsResponse.md b/docs/Model/RedirectOptionsResponse.md new file mode 100644 index 0000000..844fc2a --- /dev/null +++ b/docs/Model/RedirectOptionsResponse.md @@ -0,0 +1,9 @@ +# # RedirectOptionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**includeClientSecret** | **bool** | return_url へリダイレクトする際、クエリパラメーターに client_secret を付与するかどうか。デフォルトは `true` です。 | [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/SetupFlowCreateRequest.md b/docs/Model/SetupFlowCreateRequest.md index 22c63b4..71e02d7 100644 --- a/docs/Model/SetupFlowCreateRequest.md +++ b/docs/Model/SetupFlowCreateRequest.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **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] +**redirectOptions** | [**\PAYJPV2\Model\RedirectOptionsRequest**](RedirectOptionsRequest.md) | return_url へリダイレクトする際のオプション | [optional] **description** | **string** | 説明。 | [optional] **metadata** | **array** | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] diff --git a/docs/Model/SetupFlowResponse.md b/docs/Model/SetupFlowResponse.md index 58f9b38..e2d94c6 100644 --- a/docs/Model/SetupFlowResponse.md +++ b/docs/Model/SetupFlowResponse.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **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** | | +**redirectOptions** | [**\PAYJPV2\Model\RedirectOptionsResponse**](RedirectOptionsResponse.md) | return_url へリダイレクトする際のオプション | **lastSetupError** | **array** | | **cancellationReason** | [**\PAYJPV2\Model\SetupFlowCancellationReason**](SetupFlowCancellationReason.md) | | **createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | diff --git a/docs/Model/SetupFlowUpdateRequest.md b/docs/Model/SetupFlowUpdateRequest.md index 23cd820..891473a 100644 --- a/docs/Model/SetupFlowUpdateRequest.md +++ b/docs/Model/SetupFlowUpdateRequest.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **customerId** | **string** | この SetupFlow に関連付ける顧客の ID。SetupFlow により作られた PaymentMethod はこの顧客に紐付きます。 | [optional] **paymentMethodOptions** | [**\PAYJPV2\Model\SetupFlowPaymentMethodOptionsRequest**](SetupFlowPaymentMethodOptionsRequest.md) | この SetupFlow 固有の支払い方法の設定 | [optional] **paymentMethodTypes** | **string[]** | この SetupFlow で使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] +**redirectOptions** | [**\PAYJPV2\Model\RedirectOptionsRequest**](RedirectOptionsRequest.md) | return_url へリダイレクトする際のオプション | [optional] **description** | **string** | 説明。 | [optional] **metadata** | **array** | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] diff --git a/docs/Model/TaxRateCreateRequest.md b/docs/Model/TaxRateCreateRequest.md index a68445c..3147e0c 100644 --- a/docs/Model/TaxRateCreateRequest.md +++ b/docs/Model/TaxRateCreateRequest.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **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] +**taxType** | [**\PAYJPV2\Model\TaxType**](TaxType.md) | | [optional] **metadata** | **array** | キーバリューの任意のデータを格納できます。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 973a347..1cf54b7 100644 --- a/docs/Model/TaxRateDetailsResponse.md +++ b/docs/Model/TaxRateDetailsResponse.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **active** | **bool** | この税率が有効であるかどうか | **country** | [**\PAYJPV2\Model\Country**](Country.md) | | **description** | **string** | | +**taxType** | [**\PAYJPV2\Model\TaxType**](TaxType.md) | | **createdAt** | **\DateTime** | 作成日時 (UTC, ISO 8601 形式) | **updatedAt** | **\DateTime** | 更新日時 (UTC, ISO 8601 形式) | **metadata** | **array** | メタデータ | diff --git a/docs/Model/TaxRateUpdateRequest.md b/docs/Model/TaxRateUpdateRequest.md index 31e8843..88749d8 100644 --- a/docs/Model/TaxRateUpdateRequest.md +++ b/docs/Model/TaxRateUpdateRequest.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **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] **displayName** | **string** | 表示名。顧客に表示されます。 | [optional] +**taxType** | [**\PAYJPV2\Model\TaxType**](TaxType.md) | | [optional] **metadata** | **array** | キーバリューの任意のデータを格納できます。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/TaxType.md b/docs/Model/TaxType.md new file mode 100644 index 0000000..084726f --- /dev/null +++ b/docs/Model/TaxType.md @@ -0,0 +1,8 @@ +# # TaxType + +## 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/lib/Model/CheckoutSessionCreateRequest.php b/lib/Model/CheckoutSessionCreateRequest.php index 2366278..f42d79e 100644 --- a/lib/Model/CheckoutSessionCreateRequest.php +++ b/lib/Model/CheckoutSessionCreateRequest.php @@ -67,6 +67,7 @@ class CheckoutSessionCreateRequest implements ModelInterface, ArrayAccess, \Json 'metadata' => 'array', 'successUrl' => 'string', 'cancelUrl' => 'string', + 'redirectOptions' => '\PAYJPV2\Model\RedirectOptionsRequest', 'currency' => '\PAYJPV2\Model\Currency', 'expiresAt' => '\DateTime', 'locale' => '\PAYJPV2\Model\Locale', @@ -95,6 +96,7 @@ class CheckoutSessionCreateRequest implements ModelInterface, ArrayAccess, \Json 'metadata' => null, 'successUrl' => null, 'cancelUrl' => null, + 'redirectOptions' => null, 'currency' => null, 'expiresAt' => 'date-time', 'locale' => null, @@ -121,6 +123,7 @@ class CheckoutSessionCreateRequest implements ModelInterface, ArrayAccess, \Json 'metadata' => false, 'successUrl' => false, 'cancelUrl' => false, + 'redirectOptions' => false, 'currency' => false, 'expiresAt' => false, 'locale' => false, @@ -227,6 +230,7 @@ public function isNullableSetToNull(string $property): bool 'metadata' => 'metadata', 'successUrl' => 'success_url', 'cancelUrl' => 'cancel_url', + 'redirectOptions' => 'redirect_options', 'currency' => 'currency', 'expiresAt' => 'expires_at', 'locale' => 'locale', @@ -253,6 +257,7 @@ public function isNullableSetToNull(string $property): bool 'metadata' => 'setMetadata', 'successUrl' => 'setSuccessUrl', 'cancelUrl' => 'setCancelUrl', + 'redirectOptions' => 'setRedirectOptions', 'currency' => 'setCurrency', 'expiresAt' => 'setExpiresAt', 'locale' => 'setLocale', @@ -279,6 +284,7 @@ public function isNullableSetToNull(string $property): bool 'metadata' => 'getMetadata', 'successUrl' => 'getSuccessUrl', 'cancelUrl' => 'getCancelUrl', + 'redirectOptions' => 'getRedirectOptions', 'currency' => 'getCurrency', 'expiresAt' => 'getExpiresAt', 'locale' => 'getLocale', @@ -356,6 +362,7 @@ public function __construct(?array $data = null) $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('successUrl', $data ?? [], null); $this->setIfExists('cancelUrl', $data ?? [], null); + $this->setIfExists('redirectOptions', $data ?? [], null); $this->setIfExists('currency', $data ?? [], null); $this->setIfExists('expiresAt', $data ?? [], null); $this->setIfExists('locale', $data ?? [], null); @@ -667,6 +674,33 @@ public function setCancelUrl(?string $cancelUrl): self return $this; } + /** + * Gets redirectOptions + * + * @return \PAYJPV2\Model\RedirectOptionsRequest|null + */ + public function getRedirectOptions(): ?\PAYJPV2\Model\RedirectOptionsRequest + { + return $this->container['redirectOptions']; + } + + /** + * Sets redirectOptions + * + * @param \PAYJPV2\Model\RedirectOptionsRequest|null $redirectOptions Checkout から success_url へリダイレクトする際のオプション。Checkout が作成する PaymentFlow / SetupFlow に引き継がれます。 + * + * @return self + */ + public function setRedirectOptions(?\PAYJPV2\Model\RedirectOptionsRequest $redirectOptions): self + { + if (is_null($redirectOptions)) { + throw new \InvalidArgumentException('non-nullable redirectOptions cannot be null'); + } + $this->container['redirectOptions'] = $redirectOptions; + + return $this; + } + /** * Gets currency * diff --git a/lib/Model/CheckoutSessionDetailsResponse.php b/lib/Model/CheckoutSessionDetailsResponse.php index ba7573b..cbc60fc 100644 --- a/lib/Model/CheckoutSessionDetailsResponse.php +++ b/lib/Model/CheckoutSessionDetailsResponse.php @@ -79,6 +79,7 @@ class CheckoutSessionDetailsResponse implements ModelInterface, ArrayAccess, \Js 'status' => '\PAYJPV2\Model\CheckoutSessionStatus', 'successUrl' => 'string', 'cancelUrl' => 'string', + 'redirectOptions' => '\PAYJPV2\Model\RedirectOptionsResponse', 'url' => 'string', 'metadata' => 'array', 'createdAt' => '\DateTime', @@ -114,6 +115,7 @@ class CheckoutSessionDetailsResponse implements ModelInterface, ArrayAccess, \Js 'status' => null, 'successUrl' => null, 'cancelUrl' => null, + 'redirectOptions' => null, 'url' => null, 'metadata' => null, 'createdAt' => 'date-time', @@ -147,6 +149,7 @@ class CheckoutSessionDetailsResponse implements ModelInterface, ArrayAccess, \Js 'status' => false, 'successUrl' => true, 'cancelUrl' => true, + 'redirectOptions' => false, 'url' => false, 'metadata' => false, 'createdAt' => false, @@ -260,6 +263,7 @@ public function isNullableSetToNull(string $property): bool 'status' => 'status', 'successUrl' => 'success_url', 'cancelUrl' => 'cancel_url', + 'redirectOptions' => 'redirect_options', 'url' => 'url', 'metadata' => 'metadata', 'createdAt' => 'created_at', @@ -293,6 +297,7 @@ public function isNullableSetToNull(string $property): bool 'status' => 'setStatus', 'successUrl' => 'setSuccessUrl', 'cancelUrl' => 'setCancelUrl', + 'redirectOptions' => 'setRedirectOptions', 'url' => 'setUrl', 'metadata' => 'setMetadata', 'createdAt' => 'setCreatedAt', @@ -326,6 +331,7 @@ public function isNullableSetToNull(string $property): bool 'status' => 'getStatus', 'successUrl' => 'getSuccessUrl', 'cancelUrl' => 'getCancelUrl', + 'redirectOptions' => 'getRedirectOptions', 'url' => 'getUrl', 'metadata' => 'getMetadata', 'createdAt' => 'getCreatedAt', @@ -423,6 +429,7 @@ public function __construct(?array $data = null) $this->setIfExists('status', $data ?? [], null); $this->setIfExists('successUrl', $data ?? [], null); $this->setIfExists('cancelUrl', $data ?? [], null); + $this->setIfExists('redirectOptions', $data ?? [], null); $this->setIfExists('url', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); $this->setIfExists('createdAt', $data ?? [], null); @@ -516,6 +523,9 @@ public function listInvalidProperties() if ($this->container['cancelUrl'] === null) { $invalidProperties[] = "'cancelUrl' can't be null"; } + if ($this->container['redirectOptions'] === null) { + $invalidProperties[] = "'redirectOptions' can't be null"; + } if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } @@ -1243,6 +1253,37 @@ public function setCancelUrl(?string $cancelUrl): self return $this; } + /** + * Gets redirectOptions + * + * @return \PAYJPV2\Model\RedirectOptionsResponse + */ + public function getRedirectOptions(): \PAYJPV2\Model\RedirectOptionsResponse + { + if ($this->container['redirectOptions'] === null) { + throw new \LogicException('Property "redirectOptions" is required but has not been set.'); + } + + return $this->container['redirectOptions']; + } + + /** + * Sets redirectOptions + * + * @param \PAYJPV2\Model\RedirectOptionsResponse $redirectOptions success_url へリダイレクトする際のオプション + * + * @return self + */ + public function setRedirectOptions(\PAYJPV2\Model\RedirectOptionsResponse $redirectOptions): self + { + if (is_null($redirectOptions)) { + throw new \InvalidArgumentException('non-nullable redirectOptions cannot be null'); + } + $this->container['redirectOptions'] = $redirectOptions; + + return $this; + } + /** * Gets url * diff --git a/lib/Model/PaymentFlowCreateRequest.php b/lib/Model/PaymentFlowCreateRequest.php index 6db0049..cd788d5 100644 --- a/lib/Model/PaymentFlowCreateRequest.php +++ b/lib/Model/PaymentFlowCreateRequest.php @@ -67,6 +67,7 @@ class PaymentFlowCreateRequest implements ModelInterface, ArrayAccess, \JsonSeri 'captureMethod' => '\PAYJPV2\Model\CaptureMethod', 'confirm' => 'bool', 'returnUrl' => 'string', + 'redirectOptions' => '\PAYJPV2\Model\RedirectOptionsRequest', 'description' => 'string', 'metadata' => 'array', ]; @@ -88,6 +89,7 @@ class PaymentFlowCreateRequest implements ModelInterface, ArrayAccess, \JsonSeri 'captureMethod' => null, 'confirm' => null, 'returnUrl' => null, + 'redirectOptions' => null, 'description' => null, 'metadata' => null, ]; @@ -107,6 +109,7 @@ class PaymentFlowCreateRequest implements ModelInterface, ArrayAccess, \JsonSeri 'captureMethod' => false, 'confirm' => false, 'returnUrl' => false, + 'redirectOptions' => false, 'description' => false, 'metadata' => false, ]; @@ -206,6 +209,7 @@ public function isNullableSetToNull(string $property): bool 'captureMethod' => 'capture_method', 'confirm' => 'confirm', 'returnUrl' => 'return_url', + 'redirectOptions' => 'redirect_options', 'description' => 'description', 'metadata' => 'metadata', ]; @@ -225,6 +229,7 @@ public function isNullableSetToNull(string $property): bool 'captureMethod' => 'setCaptureMethod', 'confirm' => 'setConfirm', 'returnUrl' => 'setReturnUrl', + 'redirectOptions' => 'setRedirectOptions', 'description' => 'setDescription', 'metadata' => 'setMetadata', ]; @@ -244,6 +249,7 @@ public function isNullableSetToNull(string $property): bool 'captureMethod' => 'getCaptureMethod', 'confirm' => 'getConfirm', 'returnUrl' => 'getReturnUrl', + 'redirectOptions' => 'getRedirectOptions', 'description' => 'getDescription', 'metadata' => 'getMetadata', ]; @@ -314,6 +320,7 @@ public function __construct(?array $data = null) $this->setIfExists('captureMethod', $data ?? [], null); $this->setIfExists('confirm', $data ?? [], false); $this->setIfExists('returnUrl', $data ?? [], null); + $this->setIfExists('redirectOptions', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); } @@ -634,6 +641,33 @@ public function setReturnUrl(?string $returnUrl): self return $this; } + /** + * Gets redirectOptions + * + * @return \PAYJPV2\Model\RedirectOptionsRequest|null + */ + public function getRedirectOptions(): ?\PAYJPV2\Model\RedirectOptionsRequest + { + return $this->container['redirectOptions']; + } + + /** + * Sets redirectOptions + * + * @param \PAYJPV2\Model\RedirectOptionsRequest|null $redirectOptions return_url へリダイレクトする際のオプション + * + * @return self + */ + public function setRedirectOptions(?\PAYJPV2\Model\RedirectOptionsRequest $redirectOptions): self + { + if (is_null($redirectOptions)) { + throw new \InvalidArgumentException('non-nullable redirectOptions cannot be null'); + } + $this->container['redirectOptions'] = $redirectOptions; + + return $this; + } + /** * Gets description * diff --git a/lib/Model/PaymentFlowResponse.php b/lib/Model/PaymentFlowResponse.php index d2a87c2..df95df3 100644 --- a/lib/Model/PaymentFlowResponse.php +++ b/lib/Model/PaymentFlowResponse.php @@ -74,6 +74,7 @@ class PaymentFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'status' => '\PAYJPV2\Model\PaymentFlowStatus', 'nextAction' => 'array', 'returnUrl' => 'string', + 'redirectOptions' => '\PAYJPV2\Model\RedirectOptionsResponse', 'captureMethod' => '\PAYJPV2\Model\CaptureMethod', 'lastPaymentError' => 'array', 'cancellationReason' => '\PAYJPV2\Model\PaymentFlowCancellationReason', @@ -108,6 +109,7 @@ class PaymentFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'status' => null, 'nextAction' => null, 'returnUrl' => null, + 'redirectOptions' => null, 'captureMethod' => null, 'lastPaymentError' => null, 'cancellationReason' => null, @@ -140,6 +142,7 @@ class PaymentFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'status' => false, 'nextAction' => true, 'returnUrl' => true, + 'redirectOptions' => false, 'captureMethod' => false, 'lastPaymentError' => true, 'cancellationReason' => true, @@ -252,6 +255,7 @@ public function isNullableSetToNull(string $property): bool 'status' => 'status', 'nextAction' => 'next_action', 'returnUrl' => 'return_url', + 'redirectOptions' => 'redirect_options', 'captureMethod' => 'capture_method', 'lastPaymentError' => 'last_payment_error', 'cancellationReason' => 'cancellation_reason', @@ -284,6 +288,7 @@ public function isNullableSetToNull(string $property): bool 'status' => 'setStatus', 'nextAction' => 'setNextAction', 'returnUrl' => 'setReturnUrl', + 'redirectOptions' => 'setRedirectOptions', 'captureMethod' => 'setCaptureMethod', 'lastPaymentError' => 'setLastPaymentError', 'cancellationReason' => 'setCancellationReason', @@ -316,6 +321,7 @@ public function isNullableSetToNull(string $property): bool 'status' => 'getStatus', 'nextAction' => 'getNextAction', 'returnUrl' => 'getReturnUrl', + 'redirectOptions' => 'getRedirectOptions', 'captureMethod' => 'getCaptureMethod', 'lastPaymentError' => 'getLastPaymentError', 'cancellationReason' => 'getCancellationReason', @@ -412,6 +418,7 @@ public function __construct(?array $data = null) $this->setIfExists('status', $data ?? [], null); $this->setIfExists('nextAction', $data ?? [], null); $this->setIfExists('returnUrl', $data ?? [], null); + $this->setIfExists('redirectOptions', $data ?? [], null); $this->setIfExists('captureMethod', $data ?? [], null); $this->setIfExists('lastPaymentError', $data ?? [], null); $this->setIfExists('cancellationReason', $data ?? [], null); @@ -503,6 +510,9 @@ public function listInvalidProperties() if ($this->container['returnUrl'] === null) { $invalidProperties[] = "'returnUrl' can't be null"; } + if ($this->container['redirectOptions'] === null) { + $invalidProperties[] = "'redirectOptions' can't be null"; + } if ($this->container['captureMethod'] === null) { $invalidProperties[] = "'captureMethod' can't be null"; } @@ -1066,6 +1076,37 @@ public function setReturnUrl(?string $returnUrl): self return $this; } + /** + * Gets redirectOptions + * + * @return \PAYJPV2\Model\RedirectOptionsResponse + */ + public function getRedirectOptions(): \PAYJPV2\Model\RedirectOptionsResponse + { + if ($this->container['redirectOptions'] === null) { + throw new \LogicException('Property "redirectOptions" is required but has not been set.'); + } + + return $this->container['redirectOptions']; + } + + /** + * Sets redirectOptions + * + * @param \PAYJPV2\Model\RedirectOptionsResponse $redirectOptions return_url へリダイレクトする際のオプション + * + * @return self + */ + public function setRedirectOptions(\PAYJPV2\Model\RedirectOptionsResponse $redirectOptions): self + { + if (is_null($redirectOptions)) { + throw new \InvalidArgumentException('non-nullable redirectOptions cannot be null'); + } + $this->container['redirectOptions'] = $redirectOptions; + + return $this; + } + /** * Gets captureMethod * diff --git a/lib/Model/PaymentFlowUpdateRequest.php b/lib/Model/PaymentFlowUpdateRequest.php index 492854b..d44677b 100644 --- a/lib/Model/PaymentFlowUpdateRequest.php +++ b/lib/Model/PaymentFlowUpdateRequest.php @@ -64,6 +64,7 @@ class PaymentFlowUpdateRequest implements ModelInterface, ArrayAccess, \JsonSeri 'paymentMethodOptions' => '\PAYJPV2\Model\PaymentFlowPaymentMethodOptionsRequest', 'paymentMethodTypes' => '\PAYJPV2\Model\PaymentMethodTypes[]', 'returnUrl' => 'string', + 'redirectOptions' => '\PAYJPV2\Model\RedirectOptionsRequest', 'description' => 'string', 'metadata' => 'array', ]; @@ -82,6 +83,7 @@ class PaymentFlowUpdateRequest implements ModelInterface, ArrayAccess, \JsonSeri 'paymentMethodOptions' => null, 'paymentMethodTypes' => null, 'returnUrl' => null, + 'redirectOptions' => null, 'description' => null, 'metadata' => null, ]; @@ -98,6 +100,7 @@ class PaymentFlowUpdateRequest implements ModelInterface, ArrayAccess, \JsonSeri 'paymentMethodOptions' => false, 'paymentMethodTypes' => false, 'returnUrl' => false, + 'redirectOptions' => false, 'description' => false, 'metadata' => false, ]; @@ -194,6 +197,7 @@ public function isNullableSetToNull(string $property): bool 'paymentMethodOptions' => 'payment_method_options', 'paymentMethodTypes' => 'payment_method_types', 'returnUrl' => 'return_url', + 'redirectOptions' => 'redirect_options', 'description' => 'description', 'metadata' => 'metadata', ]; @@ -210,6 +214,7 @@ public function isNullableSetToNull(string $property): bool 'paymentMethodOptions' => 'setPaymentMethodOptions', 'paymentMethodTypes' => 'setPaymentMethodTypes', 'returnUrl' => 'setReturnUrl', + 'redirectOptions' => 'setRedirectOptions', 'description' => 'setDescription', 'metadata' => 'setMetadata', ]; @@ -226,6 +231,7 @@ public function isNullableSetToNull(string $property): bool 'paymentMethodOptions' => 'getPaymentMethodOptions', 'paymentMethodTypes' => 'getPaymentMethodTypes', 'returnUrl' => 'getReturnUrl', + 'redirectOptions' => 'getRedirectOptions', 'description' => 'getDescription', 'metadata' => 'getMetadata', ]; @@ -293,6 +299,7 @@ public function __construct(?array $data = null) $this->setIfExists('paymentMethodOptions', $data ?? [], null); $this->setIfExists('paymentMethodTypes', $data ?? [], null); $this->setIfExists('returnUrl', $data ?? [], null); + $this->setIfExists('redirectOptions', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); } @@ -517,6 +524,33 @@ public function setReturnUrl(?string $returnUrl): self return $this; } + /** + * Gets redirectOptions + * + * @return \PAYJPV2\Model\RedirectOptionsRequest|null + */ + public function getRedirectOptions(): ?\PAYJPV2\Model\RedirectOptionsRequest + { + return $this->container['redirectOptions']; + } + + /** + * Sets redirectOptions + * + * @param \PAYJPV2\Model\RedirectOptionsRequest|null $redirectOptions return_url へリダイレクトする際のオプション + * + * @return self + */ + public function setRedirectOptions(?\PAYJPV2\Model\RedirectOptionsRequest $redirectOptions): self + { + if (is_null($redirectOptions)) { + throw new \InvalidArgumentException('non-nullable redirectOptions cannot be null'); + } + $this->container['redirectOptions'] = $redirectOptions; + + return $this; + } + /** * Gets description * diff --git a/lib/Model/RedirectOptionsRequest.php b/lib/Model/RedirectOptionsRequest.php new file mode 100644 index 0000000..94a96bf --- /dev/null +++ b/lib/Model/RedirectOptionsRequest.php @@ -0,0 +1,408 @@ + + */ +class RedirectOptionsRequest implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'RedirectOptionsRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'includeClientSecret' => 'bool', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'includeClientSecret' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'includeClientSecret' => false, + ]; + + /** + * 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 = [ + 'includeClientSecret' => 'include_client_secret', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'includeClientSecret' => 'setIncludeClientSecret', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'includeClientSecret' => 'getIncludeClientSecret', + ]; + + /** + * 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('includeClientSecret', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets includeClientSecret + * + * @return bool|null + */ + public function getIncludeClientSecret(): ?bool + { + return $this->container['includeClientSecret']; + } + + /** + * Sets includeClientSecret + * + * @param bool|null $includeClientSecret return_url へリダイレクトする際、クエリパラメーターに client_secret を付与するかどうか。デフォルトは `true` です。 + * + * @return self + */ + public function setIncludeClientSecret(?bool $includeClientSecret): self + { + if (is_null($includeClientSecret)) { + throw new \InvalidArgumentException('non-nullable includeClientSecret cannot be null'); + } + $this->container['includeClientSecret'] = $includeClientSecret; + + 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/RedirectOptionsResponse.php b/lib/Model/RedirectOptionsResponse.php new file mode 100644 index 0000000..d35beea --- /dev/null +++ b/lib/Model/RedirectOptionsResponse.php @@ -0,0 +1,408 @@ + + */ +class RedirectOptionsResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'RedirectOptionsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'includeClientSecret' => 'bool', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'includeClientSecret' => null, + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ + protected static array $openAPINullables = [ + 'includeClientSecret' => false, + ]; + + /** + * 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 = [ + 'includeClientSecret' => 'include_client_secret', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'includeClientSecret' => 'setIncludeClientSecret', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'includeClientSecret' => 'getIncludeClientSecret', + ]; + + /** + * 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('includeClientSecret', $data ?? [], true); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets includeClientSecret + * + * @return bool|null + */ + public function getIncludeClientSecret(): ?bool + { + return $this->container['includeClientSecret']; + } + + /** + * Sets includeClientSecret + * + * @param bool|null $includeClientSecret return_url へリダイレクトする際、クエリパラメーターに client_secret を付与するかどうか。デフォルトは `true` です。 + * + * @return self + */ + public function setIncludeClientSecret(?bool $includeClientSecret): self + { + if (is_null($includeClientSecret)) { + throw new \InvalidArgumentException('non-nullable includeClientSecret cannot be null'); + } + $this->container['includeClientSecret'] = $includeClientSecret; + + 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/SetupFlowCreateRequest.php b/lib/Model/SetupFlowCreateRequest.php index 0b65161..7f8fd71 100644 --- a/lib/Model/SetupFlowCreateRequest.php +++ b/lib/Model/SetupFlowCreateRequest.php @@ -62,6 +62,7 @@ class SetupFlowCreateRequest implements ModelInterface, ArrayAccess, \JsonSerial 'paymentMethodOptions' => '\PAYJPV2\Model\SetupFlowPaymentMethodOptionsRequest', 'paymentMethodTypes' => 'string[]', 'usage' => '\PAYJPV2\Model\Usage', + 'redirectOptions' => '\PAYJPV2\Model\RedirectOptionsRequest', 'description' => 'string', 'metadata' => 'array', ]; @@ -78,6 +79,7 @@ class SetupFlowCreateRequest implements ModelInterface, ArrayAccess, \JsonSerial 'paymentMethodOptions' => null, 'paymentMethodTypes' => null, 'usage' => null, + 'redirectOptions' => null, 'description' => null, 'metadata' => null, ]; @@ -92,6 +94,7 @@ class SetupFlowCreateRequest implements ModelInterface, ArrayAccess, \JsonSerial 'paymentMethodOptions' => false, 'paymentMethodTypes' => false, 'usage' => false, + 'redirectOptions' => false, 'description' => false, 'metadata' => false, ]; @@ -186,6 +189,7 @@ public function isNullableSetToNull(string $property): bool 'paymentMethodOptions' => 'payment_method_options', 'paymentMethodTypes' => 'payment_method_types', 'usage' => 'usage', + 'redirectOptions' => 'redirect_options', 'description' => 'description', 'metadata' => 'metadata', ]; @@ -200,6 +204,7 @@ public function isNullableSetToNull(string $property): bool 'paymentMethodOptions' => 'setPaymentMethodOptions', 'paymentMethodTypes' => 'setPaymentMethodTypes', 'usage' => 'setUsage', + 'redirectOptions' => 'setRedirectOptions', 'description' => 'setDescription', 'metadata' => 'setMetadata', ]; @@ -214,6 +219,7 @@ public function isNullableSetToNull(string $property): bool 'paymentMethodOptions' => 'getPaymentMethodOptions', 'paymentMethodTypes' => 'getPaymentMethodTypes', 'usage' => 'getUsage', + 'redirectOptions' => 'getRedirectOptions', 'description' => 'getDescription', 'metadata' => 'getMetadata', ]; @@ -292,6 +298,7 @@ public function __construct(?array $data = null) $this->setIfExists('paymentMethodOptions', $data ?? [], null); $this->setIfExists('paymentMethodTypes', $data ?? [], null); $this->setIfExists('usage', $data ?? [], null); + $this->setIfExists('redirectOptions', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); } @@ -455,6 +462,33 @@ public function setUsage(?\PAYJPV2\Model\Usage $usage): self return $this; } + /** + * Gets redirectOptions + * + * @return \PAYJPV2\Model\RedirectOptionsRequest|null + */ + public function getRedirectOptions(): ?\PAYJPV2\Model\RedirectOptionsRequest + { + return $this->container['redirectOptions']; + } + + /** + * Sets redirectOptions + * + * @param \PAYJPV2\Model\RedirectOptionsRequest|null $redirectOptions return_url へリダイレクトする際のオプション + * + * @return self + */ + public function setRedirectOptions(?\PAYJPV2\Model\RedirectOptionsRequest $redirectOptions): self + { + if (is_null($redirectOptions)) { + throw new \InvalidArgumentException('non-nullable redirectOptions cannot be null'); + } + $this->container['redirectOptions'] = $redirectOptions; + + return $this; + } + /** * Gets description * diff --git a/lib/Model/SetupFlowResponse.php b/lib/Model/SetupFlowResponse.php index 4cf0135..71bfab3 100644 --- a/lib/Model/SetupFlowResponse.php +++ b/lib/Model/SetupFlowResponse.php @@ -71,6 +71,7 @@ class SetupFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'status' => '\PAYJPV2\Model\SetupFlowStatus', 'nextAction' => 'array', 'returnUrl' => 'string', + 'redirectOptions' => '\PAYJPV2\Model\RedirectOptionsResponse', 'lastSetupError' => 'array', 'cancellationReason' => '\PAYJPV2\Model\SetupFlowCancellationReason', 'createdAt' => '\DateTime', @@ -98,6 +99,7 @@ class SetupFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'status' => null, 'nextAction' => null, 'returnUrl' => null, + 'redirectOptions' => null, 'lastSetupError' => null, 'cancellationReason' => null, 'createdAt' => 'date-time', @@ -123,6 +125,7 @@ class SetupFlowResponse implements ModelInterface, ArrayAccess, \JsonSerializabl 'status' => false, 'nextAction' => true, 'returnUrl' => true, + 'redirectOptions' => false, 'lastSetupError' => true, 'cancellationReason' => true, 'createdAt' => false, @@ -228,6 +231,7 @@ public function isNullableSetToNull(string $property): bool 'status' => 'status', 'nextAction' => 'next_action', 'returnUrl' => 'return_url', + 'redirectOptions' => 'redirect_options', 'lastSetupError' => 'last_setup_error', 'cancellationReason' => 'cancellation_reason', 'createdAt' => 'created_at', @@ -253,6 +257,7 @@ public function isNullableSetToNull(string $property): bool 'status' => 'setStatus', 'nextAction' => 'setNextAction', 'returnUrl' => 'setReturnUrl', + 'redirectOptions' => 'setRedirectOptions', 'lastSetupError' => 'setLastSetupError', 'cancellationReason' => 'setCancellationReason', 'createdAt' => 'setCreatedAt', @@ -278,6 +283,7 @@ public function isNullableSetToNull(string $property): bool 'status' => 'getStatus', 'nextAction' => 'getNextAction', 'returnUrl' => 'getReturnUrl', + 'redirectOptions' => 'getRedirectOptions', 'lastSetupError' => 'getLastSetupError', 'cancellationReason' => 'getCancellationReason', 'createdAt' => 'getCreatedAt', @@ -367,6 +373,7 @@ public function __construct(?array $data = null) $this->setIfExists('status', $data ?? [], null); $this->setIfExists('nextAction', $data ?? [], null); $this->setIfExists('returnUrl', $data ?? [], null); + $this->setIfExists('redirectOptions', $data ?? [], null); $this->setIfExists('lastSetupError', $data ?? [], null); $this->setIfExists('cancellationReason', $data ?? [], null); $this->setIfExists('createdAt', $data ?? [], null); @@ -445,6 +452,9 @@ public function listInvalidProperties() if ($this->container['returnUrl'] === null) { $invalidProperties[] = "'returnUrl' can't be null"; } + if ($this->container['redirectOptions'] === null) { + $invalidProperties[] = "'redirectOptions' can't be null"; + } if ($this->container['lastSetupError'] === null) { $invalidProperties[] = "'lastSetupError' can't be null"; } @@ -900,6 +910,37 @@ public function setReturnUrl(?string $returnUrl): self return $this; } + /** + * Gets redirectOptions + * + * @return \PAYJPV2\Model\RedirectOptionsResponse + */ + public function getRedirectOptions(): \PAYJPV2\Model\RedirectOptionsResponse + { + if ($this->container['redirectOptions'] === null) { + throw new \LogicException('Property "redirectOptions" is required but has not been set.'); + } + + return $this->container['redirectOptions']; + } + + /** + * Sets redirectOptions + * + * @param \PAYJPV2\Model\RedirectOptionsResponse $redirectOptions return_url へリダイレクトする際のオプション + * + * @return self + */ + public function setRedirectOptions(\PAYJPV2\Model\RedirectOptionsResponse $redirectOptions): self + { + if (is_null($redirectOptions)) { + throw new \InvalidArgumentException('non-nullable redirectOptions cannot be null'); + } + $this->container['redirectOptions'] = $redirectOptions; + + return $this; + } + /** * Gets lastSetupError * diff --git a/lib/Model/SetupFlowUpdateRequest.php b/lib/Model/SetupFlowUpdateRequest.php index 25f76e6..9662b29 100644 --- a/lib/Model/SetupFlowUpdateRequest.php +++ b/lib/Model/SetupFlowUpdateRequest.php @@ -61,6 +61,7 @@ class SetupFlowUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerial 'customerId' => 'string', 'paymentMethodOptions' => '\PAYJPV2\Model\SetupFlowPaymentMethodOptionsRequest', 'paymentMethodTypes' => 'string[]', + 'redirectOptions' => '\PAYJPV2\Model\RedirectOptionsRequest', 'description' => 'string', 'metadata' => 'array', ]; @@ -76,6 +77,7 @@ class SetupFlowUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerial 'customerId' => null, 'paymentMethodOptions' => null, 'paymentMethodTypes' => null, + 'redirectOptions' => null, 'description' => null, 'metadata' => null, ]; @@ -89,6 +91,7 @@ class SetupFlowUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerial 'customerId' => false, 'paymentMethodOptions' => false, 'paymentMethodTypes' => false, + 'redirectOptions' => false, 'description' => false, 'metadata' => false, ]; @@ -182,6 +185,7 @@ public function isNullableSetToNull(string $property): bool 'customerId' => 'customer_id', 'paymentMethodOptions' => 'payment_method_options', 'paymentMethodTypes' => 'payment_method_types', + 'redirectOptions' => 'redirect_options', 'description' => 'description', 'metadata' => 'metadata', ]; @@ -195,6 +199,7 @@ public function isNullableSetToNull(string $property): bool 'customerId' => 'setCustomerId', 'paymentMethodOptions' => 'setPaymentMethodOptions', 'paymentMethodTypes' => 'setPaymentMethodTypes', + 'redirectOptions' => 'setRedirectOptions', 'description' => 'setDescription', 'metadata' => 'setMetadata', ]; @@ -208,6 +213,7 @@ public function isNullableSetToNull(string $property): bool 'customerId' => 'getCustomerId', 'paymentMethodOptions' => 'getPaymentMethodOptions', 'paymentMethodTypes' => 'getPaymentMethodTypes', + 'redirectOptions' => 'getRedirectOptions', 'description' => 'getDescription', 'metadata' => 'getMetadata', ]; @@ -285,6 +291,7 @@ public function __construct(?array $data = null) $this->setIfExists('customerId', $data ?? [], null); $this->setIfExists('paymentMethodOptions', $data ?? [], null); $this->setIfExists('paymentMethodTypes', $data ?? [], null); + $this->setIfExists('redirectOptions', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); } @@ -421,6 +428,33 @@ public function setPaymentMethodTypes(?array $paymentMethodTypes): self return $this; } + /** + * Gets redirectOptions + * + * @return \PAYJPV2\Model\RedirectOptionsRequest|null + */ + public function getRedirectOptions(): ?\PAYJPV2\Model\RedirectOptionsRequest + { + return $this->container['redirectOptions']; + } + + /** + * Sets redirectOptions + * + * @param \PAYJPV2\Model\RedirectOptionsRequest|null $redirectOptions return_url へリダイレクトする際のオプション + * + * @return self + */ + public function setRedirectOptions(?\PAYJPV2\Model\RedirectOptionsRequest $redirectOptions): self + { + if (is_null($redirectOptions)) { + throw new \InvalidArgumentException('non-nullable redirectOptions cannot be null'); + } + $this->container['redirectOptions'] = $redirectOptions; + + return $this; + } + /** * Gets description * diff --git a/lib/Model/TaxRateCreateRequest.php b/lib/Model/TaxRateCreateRequest.php index c7618e9..fba9611 100644 --- a/lib/Model/TaxRateCreateRequest.php +++ b/lib/Model/TaxRateCreateRequest.php @@ -64,6 +64,7 @@ class TaxRateCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'active' => 'bool', 'country' => '\PAYJPV2\Model\Country', 'description' => 'string', + 'taxType' => '\PAYJPV2\Model\TaxType', 'metadata' => 'array', ]; @@ -81,6 +82,7 @@ class TaxRateCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'active' => null, 'country' => null, 'description' => null, + 'taxType' => null, 'metadata' => null, ]; @@ -96,6 +98,7 @@ class TaxRateCreateRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'active' => false, 'country' => false, 'description' => false, + 'taxType' => true, 'metadata' => false, ]; @@ -191,6 +194,7 @@ public function isNullableSetToNull(string $property): bool 'active' => 'active', 'country' => 'country', 'description' => 'description', + 'taxType' => 'tax_type', 'metadata' => 'metadata', ]; @@ -206,6 +210,7 @@ public function isNullableSetToNull(string $property): bool 'active' => 'setActive', 'country' => 'setCountry', 'description' => 'setDescription', + 'taxType' => 'setTaxType', 'metadata' => 'setMetadata', ]; @@ -221,6 +226,7 @@ public function isNullableSetToNull(string $property): bool 'active' => 'getActive', 'country' => 'getCountry', 'description' => 'getDescription', + 'taxType' => 'getTaxType', 'metadata' => 'getMetadata', ]; @@ -287,6 +293,7 @@ public function __construct(?array $data = null) $this->setIfExists('active', $data ?? [], true); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('taxType', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); } @@ -531,6 +538,40 @@ public function setDescription(?string $description): self return $this; } + /** + * Gets taxType + * + * @return \PAYJPV2\Model\TaxType|null + */ + public function getTaxType(): ?\PAYJPV2\Model\TaxType + { + return $this->container['taxType']; + } + + /** + * Sets taxType + * + * @param \PAYJPV2\Model\TaxType|null $taxType taxType + * + * @return self + */ + public function setTaxType(?\PAYJPV2\Model\TaxType $taxType): self + { + if (is_null($taxType)) { + array_push($this->openAPINullablesSetToNull, 'taxType'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('taxType', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['taxType'] = $taxType; + + return $this; + } + /** * Gets metadata * diff --git a/lib/Model/TaxRateDetailsResponse.php b/lib/Model/TaxRateDetailsResponse.php index c6971a5..78e17f2 100644 --- a/lib/Model/TaxRateDetailsResponse.php +++ b/lib/Model/TaxRateDetailsResponse.php @@ -67,6 +67,7 @@ class TaxRateDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial 'active' => 'bool', 'country' => '\PAYJPV2\Model\Country', 'description' => 'string', + 'taxType' => '\PAYJPV2\Model\TaxType', 'createdAt' => '\DateTime', 'updatedAt' => '\DateTime', 'metadata' => 'array', @@ -89,6 +90,7 @@ class TaxRateDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial 'active' => null, 'country' => null, 'description' => null, + 'taxType' => null, 'createdAt' => 'date-time', 'updatedAt' => 'date-time', 'metadata' => null, @@ -109,6 +111,7 @@ class TaxRateDetailsResponse implements ModelInterface, ArrayAccess, \JsonSerial 'active' => false, 'country' => true, 'description' => true, + 'taxType' => true, 'createdAt' => false, 'updatedAt' => false, 'metadata' => false, @@ -209,6 +212,7 @@ public function isNullableSetToNull(string $property): bool 'active' => 'active', 'country' => 'country', 'description' => 'description', + 'taxType' => 'tax_type', 'createdAt' => 'created_at', 'updatedAt' => 'updated_at', 'metadata' => 'metadata', @@ -229,6 +233,7 @@ public function isNullableSetToNull(string $property): bool 'active' => 'setActive', 'country' => 'setCountry', 'description' => 'setDescription', + 'taxType' => 'setTaxType', 'createdAt' => 'setCreatedAt', 'updatedAt' => 'setUpdatedAt', 'metadata' => 'setMetadata', @@ -249,6 +254,7 @@ public function isNullableSetToNull(string $property): bool 'active' => 'getActive', 'country' => 'getCountry', 'description' => 'getDescription', + 'taxType' => 'getTaxType', 'createdAt' => 'getCreatedAt', 'updatedAt' => 'getUpdatedAt', 'metadata' => 'getMetadata', @@ -333,6 +339,7 @@ public function __construct(?array $data = null) $this->setIfExists('active', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('taxType', $data ?? [], null); $this->setIfExists('createdAt', $data ?? [], null); $this->setIfExists('updatedAt', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); @@ -398,6 +405,9 @@ public function listInvalidProperties() if ($this->container['description'] === null) { $invalidProperties[] = "'description' can't be null"; } + if ($this->container['taxType'] === null) { + $invalidProperties[] = "'taxType' can't be null"; + } if ($this->container['createdAt'] === null) { $invalidProperties[] = "'createdAt' can't be null"; } @@ -714,6 +724,40 @@ public function setDescription(?string $description): self return $this; } + /** + * Gets taxType + * + * @return \PAYJPV2\Model\TaxType|null + */ + public function getTaxType(): ?\PAYJPV2\Model\TaxType + { + return $this->container['taxType']; + } + + /** + * Sets taxType + * + * @param \PAYJPV2\Model\TaxType|null $taxType taxType + * + * @return self + */ + public function setTaxType(?\PAYJPV2\Model\TaxType $taxType): self + { + if (is_null($taxType)) { + array_push($this->openAPINullablesSetToNull, 'taxType'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('taxType', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['taxType'] = $taxType; + + return $this; + } + /** * Gets createdAt * diff --git a/lib/Model/TaxRateUpdateRequest.php b/lib/Model/TaxRateUpdateRequest.php index 933f4c2..905738a 100644 --- a/lib/Model/TaxRateUpdateRequest.php +++ b/lib/Model/TaxRateUpdateRequest.php @@ -62,6 +62,7 @@ class TaxRateUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'country' => '\PAYJPV2\Model\Country', 'description' => 'string', 'displayName' => 'string', + 'taxType' => '\PAYJPV2\Model\TaxType', 'metadata' => 'array', ]; @@ -77,6 +78,7 @@ class TaxRateUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'country' => null, 'description' => null, 'displayName' => null, + 'taxType' => null, 'metadata' => null, ]; @@ -90,6 +92,7 @@ class TaxRateUpdateRequest implements ModelInterface, ArrayAccess, \JsonSerializ 'country' => false, 'description' => false, 'displayName' => false, + 'taxType' => true, 'metadata' => false, ]; @@ -183,6 +186,7 @@ public function isNullableSetToNull(string $property): bool 'country' => 'country', 'description' => 'description', 'displayName' => 'display_name', + 'taxType' => 'tax_type', 'metadata' => 'metadata', ]; @@ -196,6 +200,7 @@ public function isNullableSetToNull(string $property): bool 'country' => 'setCountry', 'description' => 'setDescription', 'displayName' => 'setDisplayName', + 'taxType' => 'setTaxType', 'metadata' => 'setMetadata', ]; @@ -209,6 +214,7 @@ public function isNullableSetToNull(string $property): bool 'country' => 'getCountry', 'description' => 'getDescription', 'displayName' => 'getDisplayName', + 'taxType' => 'getTaxType', 'metadata' => 'getMetadata', ]; @@ -273,6 +279,7 @@ public function __construct(?array $data = null) $this->setIfExists('country', $data ?? [], null); $this->setIfExists('description', $data ?? [], null); $this->setIfExists('displayName', $data ?? [], null); + $this->setIfExists('taxType', $data ?? [], null); $this->setIfExists('metadata', $data ?? [], null); } @@ -426,6 +433,40 @@ public function setDisplayName(?string $displayName): self return $this; } + /** + * Gets taxType + * + * @return \PAYJPV2\Model\TaxType|null + */ + public function getTaxType(): ?\PAYJPV2\Model\TaxType + { + return $this->container['taxType']; + } + + /** + * Sets taxType + * + * @param \PAYJPV2\Model\TaxType|null $taxType taxType + * + * @return self + */ + public function setTaxType(?\PAYJPV2\Model\TaxType $taxType): self + { + if (is_null($taxType)) { + array_push($this->openAPINullablesSetToNull, 'taxType'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('taxType', $nullablesSetToNull); + if ($index !== false) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['taxType'] = $taxType; + + return $this; + } + /** * Gets metadata * diff --git a/lib/Model/TaxType.php b/lib/Model/TaxType.php new file mode 100644 index 0000000..a43c7aa --- /dev/null +++ b/lib/Model/TaxType.php @@ -0,0 +1,52 @@ +