From 7f6b18a3fd6ca3b8131c249e6c793218181d42cb Mon Sep 17 00:00:00 2001 From: SDK Distribution Bot Date: Fri, 2 Oct 2026 04:39:57 +0000 Subject: [PATCH] feat: Update SDK from generator (2026-10-02) --- README.md | 3 + docs/CheckoutSessionCreateRequest.md | 2 + docs/CheckoutSessionDetailsResponse.md | 2 + docs/PaymentFlowCreateRequest.md | 2 + docs/PaymentFlowResponse.md | 2 + docs/PaymentFlowUpdateRequest.md | 2 + docs/RedirectOptionsRequest.md | 18 ++ docs/RedirectOptionsResponse.md | 18 ++ docs/SetupFlowCreateRequest.md | 2 + docs/SetupFlowResponse.md | 2 + docs/SetupFlowUpdateRequest.md | 2 + docs/TaxRateCreateRequest.md | 2 + docs/TaxRateDetailsResponse.md | 2 + docs/TaxRateUpdateRequest.md | 2 + docs/TaxType.md | 15 ++ lib/payjpv2.rb | 3 + .../models/checkout_session_create_request.rb | 12 +- .../checkout_session_details_response.rb | 24 +- .../models/payment_flow_create_request.rb | 12 +- lib/payjpv2/models/payment_flow_response.rb | 24 +- .../models/payment_flow_update_request.rb | 12 +- .../models/redirect_options_request.rb | 206 +++++++++++++++++ .../models/redirect_options_response.rb | 208 ++++++++++++++++++ .../models/setup_flow_create_request.rb | 12 +- lib/payjpv2/models/setup_flow_response.rb | 24 +- .../models/setup_flow_update_request.rb | 12 +- lib/payjpv2/models/tax_rate_create_request.rb | 12 +- .../models/tax_rate_details_response.rb | 14 +- lib/payjpv2/models/tax_rate_update_request.rb | 12 +- lib/payjpv2/models/tax_type.rb | 39 ++++ .../checkout_session_create_request_spec.rb | 6 + .../checkout_session_details_response_spec.rb | 6 + .../payment_flow_create_request_spec.rb | 6 + spec/models/payment_flow_response_spec.rb | 6 + .../payment_flow_update_request_spec.rb | 6 + spec/models/redirect_options_request_spec.rb | 36 +++ spec/models/redirect_options_response_spec.rb | 36 +++ spec/models/setup_flow_create_request_spec.rb | 6 + spec/models/setup_flow_response_spec.rb | 6 + spec/models/setup_flow_update_request_spec.rb | 6 + spec/models/tax_rate_create_request_spec.rb | 6 + spec/models/tax_rate_details_response_spec.rb | 6 + spec/models/tax_rate_update_request_spec.rb | 6 + spec/models/tax_type_spec.rb | 30 +++ 44 files changed, 859 insertions(+), 11 deletions(-) create mode 100644 docs/RedirectOptionsRequest.md create mode 100644 docs/RedirectOptionsResponse.md create mode 100644 docs/TaxType.md create mode 100644 lib/payjpv2/models/redirect_options_request.rb create mode 100644 lib/payjpv2/models/redirect_options_response.rb create mode 100644 lib/payjpv2/models/tax_type.rb create mode 100644 spec/models/redirect_options_request_spec.rb create mode 100644 spec/models/redirect_options_response_spec.rb create mode 100644 spec/models/tax_type_spec.rb diff --git a/README.md b/README.md index 698bee4..ee9df65 100644 --- a/README.md +++ b/README.md @@ -362,6 +362,8 @@ Class | Method | HTTP request | Description - [PAYJPv2::ProductDetailsResponse](docs/ProductDetailsResponse.md) - [PAYJPv2::ProductListResponse](docs/ProductListResponse.md) - [PAYJPv2::ProductUpdateRequest](docs/ProductUpdateRequest.md) + - [PAYJPv2::RedirectOptionsRequest](docs/RedirectOptionsRequest.md) + - [PAYJPv2::RedirectOptionsResponse](docs/RedirectOptionsResponse.md) - [PAYJPv2::SetupFlowCancelRequest](docs/SetupFlowCancelRequest.md) - [PAYJPv2::SetupFlowCancellationReason](docs/SetupFlowCancellationReason.md) - [PAYJPv2::SetupFlowCreateRequest](docs/SetupFlowCreateRequest.md) @@ -382,6 +384,7 @@ Class | Method | HTTP request | Description - [PAYJPv2::TaxRateDetailsResponse](docs/TaxRateDetailsResponse.md) - [PAYJPv2::TaxRateListResponse](docs/TaxRateListResponse.md) - [PAYJPv2::TaxRateUpdateRequest](docs/TaxRateUpdateRequest.md) + - [PAYJPv2::TaxType](docs/TaxType.md) - [PAYJPv2::TermListResponse](docs/TermListResponse.md) - [PAYJPv2::TermResponse](docs/TermResponse.md) - [PAYJPv2::Usage](docs/Usage.md) diff --git a/docs/CheckoutSessionCreateRequest.md b/docs/CheckoutSessionCreateRequest.md index 2376611..99be2ff 100644 --- a/docs/CheckoutSessionCreateRequest.md +++ b/docs/CheckoutSessionCreateRequest.md @@ -13,6 +13,7 @@ | **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] | | **success_url** | **String** | 支払いや設定が完了した際に、PAY.JP が顧客をリダイレクトする URL。成功した Checkout Session からの情報をページで使用したい場合は、成功ページのカスタマイズに関するガイドをお読みください。 | [optional] | | **cancel_url** | **String** | キャンセル時のリダイレクト URL | [optional] | +| **redirect_options** | [**RedirectOptionsRequest**](RedirectOptionsRequest.md) | Checkout から success_url へリダイレクトする際のオプション。Checkout が作成する PaymentFlow / SetupFlow に引き継がれます。 | [optional] | | **currency** | [**Currency**](Currency.md) | 価格の通貨。現在は `jpy` のみサポートしています。 | [optional] | | **expires_at** | **Time** | Checkout Session の有効期限が失効する日時 | [optional] | | **locale** | [**Locale**](Locale.md) | Checkout 画面の表示言語を指定します。 | 指定できる値 | |:---| | **ja**: 日本語で表示します。 | | [optional] | @@ -38,6 +39,7 @@ instance = PAYJPv2::CheckoutSessionCreateRequest.new( metadata: null, success_url: null, cancel_url: null, + redirect_options: null, currency: null, expires_at: null, locale: null, diff --git a/docs/CheckoutSessionDetailsResponse.md b/docs/CheckoutSessionDetailsResponse.md index f0d9b33..fca22c0 100644 --- a/docs/CheckoutSessionDetailsResponse.md +++ b/docs/CheckoutSessionDetailsResponse.md @@ -25,6 +25,7 @@ | **status** | [**CheckoutSessionStatus**](CheckoutSessionStatus.md) | チェックアウトセッションのステータス | | | **success_url** | **String** | | | | **cancel_url** | **String** | | | +| **redirect_options** | [**RedirectOptionsResponse**](RedirectOptionsResponse.md) | success_url へリダイレクトする際のオプション | | | **url** | **String** | URL | | | **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | メタデータ | | | **created_at** | **Time** | 作成日時 (UTC, ISO 8601 形式) | | @@ -57,6 +58,7 @@ instance = PAYJPv2::CheckoutSessionDetailsResponse.new( status: null, success_url: null, cancel_url: null, + redirect_options: null, url: null, metadata: null, created_at: null, diff --git a/docs/PaymentFlowCreateRequest.md b/docs/PaymentFlowCreateRequest.md index 05589a2..d420b79 100644 --- a/docs/PaymentFlowCreateRequest.md +++ b/docs/PaymentFlowCreateRequest.md @@ -13,6 +13,7 @@ | **capture_method** | [**CaptureMethod**](CaptureMethod.md) | 支払いの確定方法を指定します。 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Payment Flow の Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | [optional] | | **confirm** | **Boolean** | 「true」に設定すると、この PaymentFlow を直ちに確定しようと試みます。 | [optional][default to false] | | **return_url** | **String** | 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。confirm=true の場合のみ指定できます。 | [optional] | +| **redirect_options** | [**RedirectOptionsRequest**](RedirectOptionsRequest.md) | return_url へリダイレクトする際のオプション | [optional] | | **description** | **String** | オブジェクトにセットする任意の文字列。 | [optional] | | **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] | @@ -31,6 +32,7 @@ instance = PAYJPv2::PaymentFlowCreateRequest.new( capture_method: null, confirm: null, return_url: null, + redirect_options: null, description: null, metadata: null ) diff --git a/docs/PaymentFlowResponse.md b/docs/PaymentFlowResponse.md index 5652f2b..a401ba5 100644 --- a/docs/PaymentFlowResponse.md +++ b/docs/PaymentFlowResponse.md @@ -20,6 +20,7 @@ | **status** | [**PaymentFlowStatus**](PaymentFlowStatus.md) | この PaymentFlow のステータス。 | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **requires_capture**: 確定が必要です。 | | **canceled**: キャンセルされました。 | | **succeeded**: 成功しました。 | | | | **next_action** | **Hash<String, Object>** | | | | **return_url** | **String** | | | +| **redirect_options** | [**RedirectOptionsResponse**](RedirectOptionsResponse.md) | return_url へリダイレクトする際のオプション | | | **capture_method** | [**CaptureMethod**](CaptureMethod.md) | 支払いの確定方法 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | | | **last_payment_error** | **Hash<String, Object>** | | | | **cancellation_reason** | [**PaymentFlowCancellationReason**](PaymentFlowCancellationReason.md) | | | @@ -51,6 +52,7 @@ instance = PAYJPv2::PaymentFlowResponse.new( status: null, next_action: null, return_url: null, + redirect_options: null, capture_method: null, last_payment_error: null, cancellation_reason: null, diff --git a/docs/PaymentFlowUpdateRequest.md b/docs/PaymentFlowUpdateRequest.md index 2c32000..1bd9621 100644 --- a/docs/PaymentFlowUpdateRequest.md +++ b/docs/PaymentFlowUpdateRequest.md @@ -10,6 +10,7 @@ | **payment_method_options** | [**PaymentFlowPaymentMethodOptionsRequest**](PaymentFlowPaymentMethodOptionsRequest.md) | この PaymentFlow 固有の支払い方法の設定 | [optional] | | **payment_method_types** | [**Array<PaymentMethodTypes>**](PaymentMethodTypes.md) | この PaymentFlow で使用できる支払い方法の種類のリスト。指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] | | **return_url** | **String** | 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。 | [optional] | +| **redirect_options** | [**RedirectOptionsRequest**](RedirectOptionsRequest.md) | return_url へリダイレクトする際のオプション | [optional] | | **description** | **String** | オブジェクトにセットする任意の文字列。 | [optional] | | **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] | @@ -25,6 +26,7 @@ instance = PAYJPv2::PaymentFlowUpdateRequest.new( payment_method_options: null, payment_method_types: null, return_url: null, + redirect_options: null, description: null, metadata: null ) diff --git a/docs/RedirectOptionsRequest.md b/docs/RedirectOptionsRequest.md new file mode 100644 index 0000000..6c692f9 --- /dev/null +++ b/docs/RedirectOptionsRequest.md @@ -0,0 +1,18 @@ +# PAYJPv2::RedirectOptionsRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **include_client_secret** | **Boolean** | return_url へリダイレクトする際、クエリパラメーターに client_secret を付与するかどうか。デフォルトは `true` です。 | [optional] | + +## Example + +```ruby +require 'payjpv2' + +instance = PAYJPv2::RedirectOptionsRequest.new( + include_client_secret: null +) +``` + diff --git a/docs/RedirectOptionsResponse.md b/docs/RedirectOptionsResponse.md new file mode 100644 index 0000000..d6ad8cb --- /dev/null +++ b/docs/RedirectOptionsResponse.md @@ -0,0 +1,18 @@ +# PAYJPv2::RedirectOptionsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **include_client_secret** | **Boolean** | return_url へリダイレクトする際、クエリパラメーターに client_secret を付与するかどうか。デフォルトは `true` です。 | [optional][default to true] | + +## Example + +```ruby +require 'payjpv2' + +instance = PAYJPv2::RedirectOptionsResponse.new( + include_client_secret: null +) +``` + diff --git a/docs/SetupFlowCreateRequest.md b/docs/SetupFlowCreateRequest.md index c72c412..cabac20 100644 --- a/docs/SetupFlowCreateRequest.md +++ b/docs/SetupFlowCreateRequest.md @@ -8,6 +8,7 @@ | **payment_method_options** | [**SetupFlowPaymentMethodOptionsRequest**](SetupFlowPaymentMethodOptionsRequest.md) | この SetupFlow 固有の支払い方法の設定 | [optional] | | **payment_method_types** | **Array<String>** | この SetupFlow で使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] | | **usage** | [**Usage**](Usage.md) | 支払い方法が今後どのように使用されるかを指定します。指定されていない場合、この値はデフォルトで `off_session` になります。 | 値 | |:---| | **off_session**: 定期課金など、顧客がカートなどの決済フローにいるかどうか不明な場合は `off_session` を使用してください。 | | **on_session**: 顧客がカートなどの決済フローにいる場合にのみ支払い方法を利用する場合は `on_session` を使用してください。 | | [optional] | +| **redirect_options** | [**RedirectOptionsRequest**](RedirectOptionsRequest.md) | return_url へリダイレクトする際のオプション | [optional] | | **description** | **String** | 説明。 | [optional] | | **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] | @@ -21,6 +22,7 @@ instance = PAYJPv2::SetupFlowCreateRequest.new( payment_method_options: null, payment_method_types: null, usage: null, + redirect_options: null, description: null, metadata: null ) diff --git a/docs/SetupFlowResponse.md b/docs/SetupFlowResponse.md index fd18411..d80b4ab 100644 --- a/docs/SetupFlowResponse.md +++ b/docs/SetupFlowResponse.md @@ -17,6 +17,7 @@ | **status** | [**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**: キャンセルされました。 | | | | **next_action** | **Hash<String, Object>** | | | | **return_url** | **String** | | | +| **redirect_options** | [**RedirectOptionsResponse**](RedirectOptionsResponse.md) | return_url へリダイレクトする際のオプション | | | **last_setup_error** | **Hash<String, Object>** | | | | **cancellation_reason** | [**SetupFlowCancellationReason**](SetupFlowCancellationReason.md) | | | | **created_at** | **Time** | 作成日時 (UTC, ISO 8601 形式) | | @@ -41,6 +42,7 @@ instance = PAYJPv2::SetupFlowResponse.new( status: null, next_action: null, return_url: null, + redirect_options: null, last_setup_error: null, cancellation_reason: null, created_at: null, diff --git a/docs/SetupFlowUpdateRequest.md b/docs/SetupFlowUpdateRequest.md index 2e18a52..5a9037b 100644 --- a/docs/SetupFlowUpdateRequest.md +++ b/docs/SetupFlowUpdateRequest.md @@ -7,6 +7,7 @@ | **customer_id** | **String** | この SetupFlow に関連付ける顧客の ID。SetupFlow により作られた PaymentMethod はこの顧客に紐付きます。 | [optional] | | **payment_method_options** | [**SetupFlowPaymentMethodOptionsRequest**](SetupFlowPaymentMethodOptionsRequest.md) | この SetupFlow 固有の支払い方法の設定 | [optional] | | **payment_method_types** | **Array<String>** | この SetupFlow で使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] | +| **redirect_options** | [**RedirectOptionsRequest**](RedirectOptionsRequest.md) | return_url へリダイレクトする際のオプション | [optional] | | **description** | **String** | 説明。 | [optional] | | **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] | @@ -19,6 +20,7 @@ instance = PAYJPv2::SetupFlowUpdateRequest.new( customer_id: null, payment_method_options: null, payment_method_types: null, + redirect_options: null, description: null, metadata: null ) diff --git a/docs/TaxRateCreateRequest.md b/docs/TaxRateCreateRequest.md index 6d5a439..e0d39c2 100644 --- a/docs/TaxRateCreateRequest.md +++ b/docs/TaxRateCreateRequest.md @@ -10,6 +10,7 @@ | **active** | **Boolean** | この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 | [optional][default to true] | | **country** | [**Country**](Country.md) | 有効な2文字の <a href=\"https://ja.wikipedia.org/wiki/ISO_3166-1\" target=\"_blank\">ISO 国コード</a> | [optional] | | **description** | **String** | 説明。管理画面内のみで表示され、顧客には表示されません。 | [optional] | +| **tax_type** | [**TaxType**](TaxType.md) | | [optional] | | **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] | ## Example @@ -24,6 +25,7 @@ instance = PAYJPv2::TaxRateCreateRequest.new( active: null, country: null, description: null, + tax_type: null, metadata: null ) ``` diff --git a/docs/TaxRateDetailsResponse.md b/docs/TaxRateDetailsResponse.md index a371e74..8ef4459 100644 --- a/docs/TaxRateDetailsResponse.md +++ b/docs/TaxRateDetailsResponse.md @@ -13,6 +13,7 @@ | **active** | **Boolean** | この税率が有効であるかどうか | | | **country** | [**Country**](Country.md) | | | | **description** | **String** | | | +| **tax_type** | [**TaxType**](TaxType.md) | | | | **created_at** | **Time** | 作成日時 (UTC, ISO 8601 形式) | | | **updated_at** | **Time** | 更新日時 (UTC, ISO 8601 形式) | | | **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | メタデータ | | @@ -32,6 +33,7 @@ instance = PAYJPv2::TaxRateDetailsResponse.new( active: null, country: null, description: null, + tax_type: null, created_at: null, updated_at: null, metadata: null diff --git a/docs/TaxRateUpdateRequest.md b/docs/TaxRateUpdateRequest.md index 2da1874..f051b40 100644 --- a/docs/TaxRateUpdateRequest.md +++ b/docs/TaxRateUpdateRequest.md @@ -8,6 +8,7 @@ | **country** | [**Country**](Country.md) | 有効な2文字の <a href=\"https://ja.wikipedia.org/wiki/ISO_3166-1\" target=\"_blank\">ISO 国コード</a> | [optional] | | **description** | **String** | 説明。管理画面内のみで表示され、顧客には表示されません。 | [optional] | | **display_name** | **String** | 表示名。顧客に表示されます。 | [optional] | +| **tax_type** | [**TaxType**](TaxType.md) | | [optional] | | **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] | ## Example @@ -20,6 +21,7 @@ instance = PAYJPv2::TaxRateUpdateRequest.new( country: null, description: null, display_name: null, + tax_type: null, metadata: null ) ``` diff --git a/docs/TaxType.md b/docs/TaxType.md new file mode 100644 index 0000000..b2e5352 --- /dev/null +++ b/docs/TaxType.md @@ -0,0 +1,15 @@ +# PAYJPv2::TaxType + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'payjpv2' + +instance = PAYJPv2::TaxType.new() +``` + diff --git a/lib/payjpv2.rb b/lib/payjpv2.rb index 2e71bca..f5db68c 100644 --- a/lib/payjpv2.rb +++ b/lib/payjpv2.rb @@ -117,6 +117,8 @@ require 'payjpv2/models/product_details_response' require 'payjpv2/models/product_list_response' require 'payjpv2/models/product_update_request' +require 'payjpv2/models/redirect_options_request' +require 'payjpv2/models/redirect_options_response' require 'payjpv2/models/setup_flow_cancel_request' require 'payjpv2/models/setup_flow_cancellation_reason' require 'payjpv2/models/setup_flow_create_request' @@ -137,6 +139,7 @@ require 'payjpv2/models/tax_rate_details_response' require 'payjpv2/models/tax_rate_list_response' require 'payjpv2/models/tax_rate_update_request' +require 'payjpv2/models/tax_type' require 'payjpv2/models/term_list_response' require 'payjpv2/models/term_response' require 'payjpv2/models/usage' diff --git a/lib/payjpv2/models/checkout_session_create_request.rb b/lib/payjpv2/models/checkout_session_create_request.rb index fcb18eb..71d8baf 100644 --- a/lib/payjpv2/models/checkout_session_create_request.rb +++ b/lib/payjpv2/models/checkout_session_create_request.rb @@ -42,6 +42,9 @@ class CheckoutSessionCreateRequest # キャンセル時のリダイレクト URL attr_accessor :cancel_url + # Checkout から success_url へリダイレクトする際のオプション。Checkout が作成する PaymentFlow / SetupFlow に引き継がれます。 + attr_accessor :redirect_options + # 価格の通貨。現在は `jpy` のみサポートしています。 attr_accessor :currency @@ -103,6 +106,7 @@ def self.attribute_map :metadata => :metadata, :success_url => :success_url, :cancel_url => :cancel_url, + :redirect_options => :redirect_options, :currency => :currency, :expires_at => :expires_at, :locale => :locale, @@ -137,6 +141,7 @@ def self.openapi_types :metadata => :'Hash', :success_url => :'String', :cancel_url => :'String', + :redirect_options => :'RedirectOptionsRequest', :currency => :'Currency', :expires_at => :'Time', :locale => :'Locale', @@ -213,6 +218,10 @@ def initialize(attributes = {}) self.cancel_url = attributes[:cancel_url] end + if attributes.key?(:redirect_options) + self.redirect_options = attributes[:redirect_options] + end + if attributes.key?(:currency) self.currency = attributes[:currency] end @@ -290,6 +299,7 @@ def ==(o) metadata == o.metadata && success_url == o.success_url && cancel_url == o.cancel_url && + redirect_options == o.redirect_options && currency == o.currency && expires_at == o.expires_at && locale == o.locale && @@ -310,7 +320,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [mode, client_reference_id, customer_id, customer_email, customer_creation, line_items, metadata, success_url, cancel_url, currency, expires_at, locale, payment_method_types, payment_method_options, payment_flow_data, submit_type, setup_flow_data, ui_mode].hash + [mode, client_reference_id, customer_id, customer_email, customer_creation, line_items, metadata, success_url, cancel_url, redirect_options, currency, expires_at, locale, payment_method_types, payment_method_options, payment_flow_data, submit_type, setup_flow_data, ui_mode].hash end # Builds the object from hash diff --git a/lib/payjpv2/models/checkout_session_details_response.rb b/lib/payjpv2/models/checkout_session_details_response.rb index 6b5c2a3..6fa10e8 100644 --- a/lib/payjpv2/models/checkout_session_details_response.rb +++ b/lib/payjpv2/models/checkout_session_details_response.rb @@ -63,6 +63,9 @@ class CheckoutSessionDetailsResponse attr_accessor :cancel_url + # success_url へリダイレクトする際のオプション + attr_accessor :redirect_options + # URL attr_accessor :url @@ -121,6 +124,7 @@ def self.attribute_map :status => :status, :success_url => :success_url, :cancel_url => :cancel_url, + :redirect_options => :redirect_options, :url => :url, :metadata => :metadata, :created_at => :created_at, @@ -162,6 +166,7 @@ def self.openapi_types :status => :'CheckoutSessionStatus', :success_url => :'String', :cancel_url => :'String', + :redirect_options => :'RedirectOptionsResponse', :url => :'String', :metadata => :'Hash', :created_at => :'Time', @@ -329,6 +334,12 @@ def initialize(attributes = {}) self.cancel_url = nil end + if attributes.key?(:redirect_options) + self.redirect_options = attributes[:redirect_options] + else + self.redirect_options = nil + end + if attributes.key?(:url) self.url = attributes[:url] else @@ -426,6 +437,16 @@ def status=(status) @status = status end + # Custom attribute writer method with validation + # @param [Object] redirect_options Value to be assigned + def redirect_options=(redirect_options) + if redirect_options.nil? + raise ArgumentError, 'redirect_options cannot be nil' + end + + @redirect_options = redirect_options + end + # Custom attribute writer method with validation # @param [Object] url Value to be assigned def url=(url) @@ -492,6 +513,7 @@ def ==(o) status == o.status && success_url == o.success_url && cancel_url == o.cancel_url && + redirect_options == o.redirect_options && url == o.url && metadata == o.metadata && created_at == o.created_at && @@ -507,7 +529,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [object, id, livemode, amount_subtotal, amount_total, customer_id, customer_email, customer_details, expires_at, currency, locale, payment_flow_id, payment_method_types, payment_method_options, setup_flow_id, submit_type, mode, ui_mode, status, success_url, cancel_url, url, metadata, created_at, updated_at].hash + [object, id, livemode, amount_subtotal, amount_total, customer_id, customer_email, customer_details, expires_at, currency, locale, payment_flow_id, payment_method_types, payment_method_options, setup_flow_id, submit_type, mode, ui_mode, status, success_url, cancel_url, redirect_options, url, metadata, created_at, updated_at].hash end # Builds the object from hash diff --git a/lib/payjpv2/models/payment_flow_create_request.rb b/lib/payjpv2/models/payment_flow_create_request.rb index f1d59d6..a0c7535 100644 --- a/lib/payjpv2/models/payment_flow_create_request.rb +++ b/lib/payjpv2/models/payment_flow_create_request.rb @@ -42,6 +42,9 @@ class PaymentFlowCreateRequest # 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。confirm=true の場合のみ指定できます。 attr_accessor :return_url + # return_url へリダイレクトする際のオプション + attr_accessor :redirect_options + # オブジェクトにセットする任意の文字列。 attr_accessor :description @@ -82,6 +85,7 @@ def self.attribute_map :capture_method => :capture_method, :confirm => :confirm, :return_url => :return_url, + :redirect_options => :redirect_options, :description => :description, :metadata => :metadata } @@ -109,6 +113,7 @@ def self.openapi_types :capture_method => :'CaptureMethod', :confirm => :'Boolean', :return_url => :'String', + :redirect_options => :'RedirectOptionsRequest', :description => :'String', :metadata => :'Hash' } @@ -180,6 +185,10 @@ def initialize(attributes = {}) self.return_url = attributes[:return_url] end + if attributes.key?(:redirect_options) + self.redirect_options = attributes[:redirect_options] + end + if attributes.key?(:description) self.description = attributes[:description] end @@ -233,6 +242,7 @@ def ==(o) capture_method == o.capture_method && confirm == o.confirm && return_url == o.return_url && + redirect_options == o.redirect_options && description == o.description && metadata == o.metadata end @@ -246,7 +256,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [amount, customer_id, payment_method_id, payment_method_options, payment_method_types, currency, capture_method, confirm, return_url, description, metadata].hash + [amount, customer_id, payment_method_id, payment_method_options, payment_method_types, currency, capture_method, confirm, return_url, redirect_options, description, metadata].hash end # Builds the object from hash diff --git a/lib/payjpv2/models/payment_flow_response.rb b/lib/payjpv2/models/payment_flow_response.rb index 28e54b9..4872f34 100644 --- a/lib/payjpv2/models/payment_flow_response.rb +++ b/lib/payjpv2/models/payment_flow_response.rb @@ -54,6 +54,9 @@ class PaymentFlowResponse attr_accessor :return_url + # return_url へリダイレクトする際のオプション + attr_accessor :redirect_options + # 支払いの確定方法 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | attr_accessor :capture_method @@ -115,6 +118,7 @@ def self.attribute_map :status => :status, :next_action => :next_action, :return_url => :return_url, + :redirect_options => :redirect_options, :capture_method => :capture_method, :last_payment_error => :last_payment_error, :cancellation_reason => :cancellation_reason, @@ -155,6 +159,7 @@ def self.openapi_types :status => :'PaymentFlowStatus', :next_action => :'Hash', :return_url => :'String', + :redirect_options => :'RedirectOptionsResponse', :capture_method => :'CaptureMethod', :last_payment_error => :'Hash', :cancellation_reason => :'PaymentFlowCancellationReason', @@ -302,6 +307,12 @@ def initialize(attributes = {}) self.return_url = nil end + if attributes.key?(:redirect_options) + self.redirect_options = attributes[:redirect_options] + else + self.redirect_options = nil + end + if attributes.key?(:capture_method) self.capture_method = attributes[:capture_method] else @@ -433,6 +444,16 @@ def status=(status) @status = status end + # Custom attribute writer method with validation + # @param [Object] redirect_options Value to be assigned + def redirect_options=(redirect_options) + if redirect_options.nil? + raise ArgumentError, 'redirect_options cannot be nil' + end + + @redirect_options = redirect_options + end + # Custom attribute writer method with validation # @param [Object] capture_method Value to be assigned def capture_method=(capture_method) @@ -494,6 +515,7 @@ def ==(o) status == o.status && next_action == o.next_action && return_url == o.return_url && + redirect_options == o.redirect_options && capture_method == o.capture_method && last_payment_error == o.last_payment_error && cancellation_reason == o.cancellation_reason && @@ -513,7 +535,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [object, id, livemode, amount, currency, amount_capturable, amount_received, client_secret, customer_id, description, payment_method_id, payment_method_options, payment_method_types, status, next_action, return_url, capture_method, last_payment_error, cancellation_reason, canceled_at, expired_at, metadata, created_at, updated_at].hash + [object, id, livemode, amount, currency, amount_capturable, amount_received, client_secret, customer_id, description, payment_method_id, payment_method_options, payment_method_types, status, next_action, return_url, redirect_options, capture_method, last_payment_error, cancellation_reason, canceled_at, expired_at, metadata, created_at, updated_at].hash end # Builds the object from hash diff --git a/lib/payjpv2/models/payment_flow_update_request.rb b/lib/payjpv2/models/payment_flow_update_request.rb index 567a4a1..3d50a50 100644 --- a/lib/payjpv2/models/payment_flow_update_request.rb +++ b/lib/payjpv2/models/payment_flow_update_request.rb @@ -33,6 +33,9 @@ class PaymentFlowUpdateRequest # 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。 attr_accessor :return_url + # return_url へリダイレクトする際のオプション + attr_accessor :redirect_options + # オブジェクトにセットする任意の文字列。 attr_accessor :description @@ -48,6 +51,7 @@ def self.attribute_map :payment_method_options => :payment_method_options, :payment_method_types => :payment_method_types, :return_url => :return_url, + :redirect_options => :redirect_options, :description => :description, :metadata => :metadata } @@ -72,6 +76,7 @@ def self.openapi_types :payment_method_options => :'PaymentFlowPaymentMethodOptionsRequest', :payment_method_types => :'Array', :return_url => :'String', + :redirect_options => :'RedirectOptionsRequest', :description => :'String', :metadata => :'Hash' } @@ -125,6 +130,10 @@ def initialize(attributes = {}) self.return_url = attributes[:return_url] end + if attributes.key?(:redirect_options) + self.redirect_options = attributes[:redirect_options] + end + if attributes.key?(:description) self.description = attributes[:description] end @@ -165,6 +174,7 @@ def ==(o) payment_method_options == o.payment_method_options && payment_method_types == o.payment_method_types && return_url == o.return_url && + redirect_options == o.redirect_options && description == o.description && metadata == o.metadata end @@ -178,7 +188,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [amount, customer_id, payment_method_id, payment_method_options, payment_method_types, return_url, description, metadata].hash + [amount, customer_id, payment_method_id, payment_method_options, payment_method_types, return_url, redirect_options, description, metadata].hash end # Builds the object from hash diff --git a/lib/payjpv2/models/redirect_options_request.rb b/lib/payjpv2/models/redirect_options_request.rb new file mode 100644 index 0000000..b1fb309 --- /dev/null +++ b/lib/payjpv2/models/redirect_options_request.rb @@ -0,0 +1,206 @@ +=begin +#PAY.JP API v2 + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 2.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module PAYJPv2 + class RedirectOptionsRequest + # return_url へリダイレクトする際、クエリパラメーターに client_secret を付与するかどうか。デフォルトは `true` です。 + attr_accessor :include_client_secret + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :include_client_secret => :include_client_secret + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :include_client_secret => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + raise ArgumentError, "The input argument (attributes) must be a hash in `PAYJPv2::RedirectOptionsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + raise ArgumentError, "`#{k}` is not a valid attribute in `PAYJPv2::RedirectOptionsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:include_client_secret) + self.include_client_secret = attributes[:include_client_secret] + end + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + include_client_secret == o.include_client_secret + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [include_client_secret].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PAYJPv2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/payjpv2/models/redirect_options_response.rb b/lib/payjpv2/models/redirect_options_response.rb new file mode 100644 index 0000000..9c290d7 --- /dev/null +++ b/lib/payjpv2/models/redirect_options_response.rb @@ -0,0 +1,208 @@ +=begin +#PAY.JP API v2 + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 2.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module PAYJPv2 + class RedirectOptionsResponse + # return_url へリダイレクトする際、クエリパラメーターに client_secret を付与するかどうか。デフォルトは `true` です。 + attr_accessor :include_client_secret + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :include_client_secret => :include_client_secret + } + end + + # Returns attribute mapping this model knows about + def self.acceptable_attribute_map + attribute_map + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + acceptable_attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :include_client_secret => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + raise ArgumentError, "The input argument (attributes) must be a hash in `PAYJPv2::RedirectOptionsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + acceptable_attribute_map = self.class.acceptable_attribute_map + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!acceptable_attribute_map.key?(k.to_sym)) + raise ArgumentError, "`#{k}` is not a valid attribute in `PAYJPv2::RedirectOptionsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:include_client_secret) + self.include_client_secret = attributes[:include_client_secret] + else + self.include_client_secret = true + end + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + include_client_secret == o.include_client_secret + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [include_client_secret].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PAYJPv2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/payjpv2/models/setup_flow_create_request.rb b/lib/payjpv2/models/setup_flow_create_request.rb index b3d74eb..fd3e098 100644 --- a/lib/payjpv2/models/setup_flow_create_request.rb +++ b/lib/payjpv2/models/setup_flow_create_request.rb @@ -27,6 +27,9 @@ class SetupFlowCreateRequest # 支払い方法が今後どのように使用されるかを指定します。指定されていない場合、この値はデフォルトで `off_session` になります。 | 値 | |:---| | **off_session**: 定期課金など、顧客がカートなどの決済フローにいるかどうか不明な場合は `off_session` を使用してください。 | | **on_session**: 顧客がカートなどの決済フローにいる場合にのみ支払い方法を利用する場合は `on_session` を使用してください。 | attr_accessor :usage + # return_url へリダイレクトする際のオプション + attr_accessor :redirect_options + # 説明。 attr_accessor :description @@ -62,6 +65,7 @@ def self.attribute_map :payment_method_options => :payment_method_options, :payment_method_types => :payment_method_types, :usage => :usage, + :redirect_options => :redirect_options, :description => :description, :metadata => :metadata } @@ -84,6 +88,7 @@ def self.openapi_types :payment_method_options => :'SetupFlowPaymentMethodOptionsRequest', :payment_method_types => :'Array', :usage => :'Usage', + :redirect_options => :'RedirectOptionsRequest', :description => :'String', :metadata => :'Hash' } @@ -129,6 +134,10 @@ def initialize(attributes = {}) self.usage = attributes[:usage] end + if attributes.key?(:redirect_options) + self.redirect_options = attributes[:redirect_options] + end + if attributes.key?(:description) self.description = attributes[:description] end @@ -149,6 +158,7 @@ def ==(o) payment_method_options == o.payment_method_options && payment_method_types == o.payment_method_types && usage == o.usage && + redirect_options == o.redirect_options && description == o.description && metadata == o.metadata end @@ -162,7 +172,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [customer_id, payment_method_options, payment_method_types, usage, description, metadata].hash + [customer_id, payment_method_options, payment_method_types, usage, redirect_options, description, metadata].hash end # Builds the object from hash diff --git a/lib/payjpv2/models/setup_flow_response.rb b/lib/payjpv2/models/setup_flow_response.rb index 2aa0f7e..9141052 100644 --- a/lib/payjpv2/models/setup_flow_response.rb +++ b/lib/payjpv2/models/setup_flow_response.rb @@ -47,6 +47,9 @@ class SetupFlowResponse attr_accessor :return_url + # return_url へリダイレクトする際のオプション + attr_accessor :redirect_options + attr_accessor :last_setup_error attr_accessor :cancellation_reason @@ -95,6 +98,7 @@ def self.attribute_map :status => :status, :next_action => :next_action, :return_url => :return_url, + :redirect_options => :redirect_options, :last_setup_error => :last_setup_error, :cancellation_reason => :cancellation_reason, :created_at => :created_at, @@ -128,6 +132,7 @@ def self.openapi_types :status => :'SetupFlowStatus', :next_action => :'Hash', :return_url => :'String', + :redirect_options => :'RedirectOptionsResponse', :last_setup_error => :'Hash', :cancellation_reason => :'SetupFlowCancellationReason', :created_at => :'Time', @@ -251,6 +256,12 @@ def initialize(attributes = {}) self.return_url = nil end + if attributes.key?(:redirect_options) + self.redirect_options = attributes[:redirect_options] + else + self.redirect_options = nil + end + if attributes.key?(:last_setup_error) if (value = attributes[:last_setup_error]).is_a?(Hash) self.last_setup_error = value @@ -348,6 +359,16 @@ def status=(status) @status = status end + # Custom attribute writer method with validation + # @param [Object] redirect_options Value to be assigned + def redirect_options=(redirect_options) + if redirect_options.nil? + raise ArgumentError, 'redirect_options cannot be nil' + end + + @redirect_options = redirect_options + end + # Custom attribute writer method with validation # @param [Object] created_at Value to be assigned def created_at=(created_at) @@ -386,6 +407,7 @@ def ==(o) status == o.status && next_action == o.next_action && return_url == o.return_url && + redirect_options == o.redirect_options && last_setup_error == o.last_setup_error && cancellation_reason == o.cancellation_reason && created_at == o.created_at && @@ -401,7 +423,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [object, id, livemode, client_secret, customer_id, description, metadata, payment_method_id, payment_method_options, payment_method_types, status, next_action, return_url, last_setup_error, cancellation_reason, created_at, updated_at].hash + [object, id, livemode, client_secret, customer_id, description, metadata, payment_method_id, payment_method_options, payment_method_types, status, next_action, return_url, redirect_options, last_setup_error, cancellation_reason, created_at, updated_at].hash end # Builds the object from hash diff --git a/lib/payjpv2/models/setup_flow_update_request.rb b/lib/payjpv2/models/setup_flow_update_request.rb index ddad697..667b1db 100644 --- a/lib/payjpv2/models/setup_flow_update_request.rb +++ b/lib/payjpv2/models/setup_flow_update_request.rb @@ -24,6 +24,9 @@ class SetupFlowUpdateRequest # この SetupFlow で使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 attr_accessor :payment_method_types + # return_url へリダイレクトする際のオプション + attr_accessor :redirect_options + # 説明。 attr_accessor :description @@ -58,6 +61,7 @@ def self.attribute_map :customer_id => :customer_id, :payment_method_options => :payment_method_options, :payment_method_types => :payment_method_types, + :redirect_options => :redirect_options, :description => :description, :metadata => :metadata } @@ -79,6 +83,7 @@ def self.openapi_types :customer_id => :'String', :payment_method_options => :'SetupFlowPaymentMethodOptionsRequest', :payment_method_types => :'Array', + :redirect_options => :'RedirectOptionsRequest', :description => :'String', :metadata => :'Hash' } @@ -120,6 +125,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:redirect_options) + self.redirect_options = attributes[:redirect_options] + end + if attributes.key?(:description) self.description = attributes[:description] end @@ -139,6 +148,7 @@ def ==(o) customer_id == o.customer_id && payment_method_options == o.payment_method_options && payment_method_types == o.payment_method_types && + redirect_options == o.redirect_options && description == o.description && metadata == o.metadata end @@ -152,7 +162,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [customer_id, payment_method_options, payment_method_types, description, metadata].hash + [customer_id, payment_method_options, payment_method_types, redirect_options, description, metadata].hash end # Builds the object from hash diff --git a/lib/payjpv2/models/tax_rate_create_request.rb b/lib/payjpv2/models/tax_rate_create_request.rb index 02a6856..1d68042 100644 --- a/lib/payjpv2/models/tax_rate_create_request.rb +++ b/lib/payjpv2/models/tax_rate_create_request.rb @@ -33,6 +33,8 @@ class TaxRateCreateRequest # 説明。管理画面内のみで表示され、顧客には表示されません。 attr_accessor :description + attr_accessor :tax_type + # キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 attr_accessor :metadata @@ -67,6 +69,7 @@ def self.attribute_map :active => :active, :country => :country, :description => :description, + :tax_type => :tax_type, :metadata => :metadata } end @@ -90,6 +93,7 @@ def self.openapi_types :active => :'Boolean', :country => :'Country', :description => :'String', + :tax_type => :'TaxType', :metadata => :'Hash' } end @@ -97,6 +101,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :tax_type, ]) end @@ -148,6 +153,10 @@ def initialize(attributes = {}) self.description = attributes[:description] end + if attributes.key?(:tax_type) + self.tax_type = attributes[:tax_type] + end + if attributes.key?(:metadata) if (value = attributes[:metadata]).is_a?(Hash) self.metadata = value @@ -204,6 +213,7 @@ def ==(o) active == o.active && country == o.country && description == o.description && + tax_type == o.tax_type && metadata == o.metadata end @@ -216,7 +226,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [display_name, inclusive, percentage, active, country, description, metadata].hash + [display_name, inclusive, percentage, active, country, description, tax_type, metadata].hash end # Builds the object from hash diff --git a/lib/payjpv2/models/tax_rate_details_response.rb b/lib/payjpv2/models/tax_rate_details_response.rb index c7655d1..58ed7d0 100644 --- a/lib/payjpv2/models/tax_rate_details_response.rb +++ b/lib/payjpv2/models/tax_rate_details_response.rb @@ -39,6 +39,8 @@ class TaxRateDetailsResponse attr_accessor :description + attr_accessor :tax_type + # 作成日時 (UTC, ISO 8601 形式) attr_accessor :created_at @@ -82,6 +84,7 @@ def self.attribute_map :active => :active, :country => :country, :description => :description, + :tax_type => :tax_type, :created_at => :created_at, :updated_at => :updated_at, :metadata => :metadata @@ -110,6 +113,7 @@ def self.openapi_types :active => :'Boolean', :country => :'Country', :description => :'String', + :tax_type => :'TaxType', :created_at => :'Time', :updated_at => :'Time', :metadata => :'Hash' @@ -121,6 +125,7 @@ def self.openapi_nullable Set.new([ :country, :description, + :tax_type, ]) end @@ -194,6 +199,12 @@ def initialize(attributes = {}) self.description = nil end + if attributes.key?(:tax_type) + self.tax_type = attributes[:tax_type] + else + self.tax_type = nil + end + if attributes.key?(:created_at) self.created_at = attributes[:created_at] else @@ -329,6 +340,7 @@ def ==(o) active == o.active && country == o.country && description == o.description && + tax_type == o.tax_type && created_at == o.created_at && updated_at == o.updated_at && metadata == o.metadata @@ -343,7 +355,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [object, id, livemode, display_name, inclusive, percentage, active, country, description, created_at, updated_at, metadata].hash + [object, id, livemode, display_name, inclusive, percentage, active, country, description, tax_type, created_at, updated_at, metadata].hash end # Builds the object from hash diff --git a/lib/payjpv2/models/tax_rate_update_request.rb b/lib/payjpv2/models/tax_rate_update_request.rb index e60aec3..416ee64 100644 --- a/lib/payjpv2/models/tax_rate_update_request.rb +++ b/lib/payjpv2/models/tax_rate_update_request.rb @@ -27,6 +27,8 @@ class TaxRateUpdateRequest # 表示名。顧客に表示されます。 attr_accessor :display_name + attr_accessor :tax_type + # キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。詳細はメタデータのドキュメントを参照してください。 attr_accessor :metadata @@ -59,6 +61,7 @@ def self.attribute_map :country => :country, :description => :description, :display_name => :display_name, + :tax_type => :tax_type, :metadata => :metadata } end @@ -80,6 +83,7 @@ def self.openapi_types :country => :'Country', :description => :'String', :display_name => :'String', + :tax_type => :'TaxType', :metadata => :'Hash' } end @@ -87,6 +91,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :tax_type, ]) end @@ -122,6 +127,10 @@ def initialize(attributes = {}) self.display_name = attributes[:display_name] end + if attributes.key?(:tax_type) + self.tax_type = attributes[:tax_type] + end + if attributes.key?(:metadata) if (value = attributes[:metadata]).is_a?(Hash) self.metadata = value @@ -138,6 +147,7 @@ def ==(o) country == o.country && description == o.description && display_name == o.display_name && + tax_type == o.tax_type && metadata == o.metadata end @@ -150,7 +160,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [active, country, description, display_name, metadata].hash + [active, country, description, display_name, tax_type, metadata].hash end # Builds the object from hash diff --git a/lib/payjpv2/models/tax_type.rb b/lib/payjpv2/models/tax_type.rb new file mode 100644 index 0000000..8b3f34b --- /dev/null +++ b/lib/payjpv2/models/tax_type.rb @@ -0,0 +1,39 @@ +=begin +#PAY.JP API v2 + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 2.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'date' +require 'time' + +module PAYJPv2 + class TaxType + JCT = "jct".freeze + + def self.all_vars + @all_vars ||= [JCT].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if TaxType.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #TaxType" + end + end +end diff --git a/spec/models/checkout_session_create_request_spec.rb b/spec/models/checkout_session_create_request_spec.rb index 9da8714..16fef99 100644 --- a/spec/models/checkout_session_create_request_spec.rb +++ b/spec/models/checkout_session_create_request_spec.rb @@ -81,6 +81,12 @@ end end + describe 'test attribute "redirect_options"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "currency"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/checkout_session_details_response_spec.rb b/spec/models/checkout_session_details_response_spec.rb index f4f6b31..2724fa8 100644 --- a/spec/models/checkout_session_details_response_spec.rb +++ b/spec/models/checkout_session_details_response_spec.rb @@ -157,6 +157,12 @@ end end + describe 'test attribute "redirect_options"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "url"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/payment_flow_create_request_spec.rb b/spec/models/payment_flow_create_request_spec.rb index 16af171..c98ff76 100644 --- a/spec/models/payment_flow_create_request_spec.rb +++ b/spec/models/payment_flow_create_request_spec.rb @@ -81,6 +81,12 @@ end end + describe 'test attribute "redirect_options"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "description"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/payment_flow_response_spec.rb b/spec/models/payment_flow_response_spec.rb index 95f1019..d2e4677 100644 --- a/spec/models/payment_flow_response_spec.rb +++ b/spec/models/payment_flow_response_spec.rb @@ -127,6 +127,12 @@ end end + describe 'test attribute "redirect_options"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "capture_method"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/payment_flow_update_request_spec.rb b/spec/models/payment_flow_update_request_spec.rb index 7c42849..28cdafb 100644 --- a/spec/models/payment_flow_update_request_spec.rb +++ b/spec/models/payment_flow_update_request_spec.rb @@ -63,6 +63,12 @@ end end + describe 'test attribute "redirect_options"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "description"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/redirect_options_request_spec.rb b/spec/models/redirect_options_request_spec.rb new file mode 100644 index 0000000..0894728 --- /dev/null +++ b/spec/models/redirect_options_request_spec.rb @@ -0,0 +1,36 @@ +=begin +#PAY.JP API v2 + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 2.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PAYJPv2::RedirectOptionsRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PAYJPv2::RedirectOptionsRequest do + let(:instance) { PAYJPv2::RedirectOptionsRequest.new } + + describe 'test an instance of RedirectOptionsRequest' do + it 'should create an instance of RedirectOptionsRequest' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(PAYJPv2::RedirectOptionsRequest) + end + end + + describe 'test attribute "include_client_secret"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/redirect_options_response_spec.rb b/spec/models/redirect_options_response_spec.rb new file mode 100644 index 0000000..4c7ced5 --- /dev/null +++ b/spec/models/redirect_options_response_spec.rb @@ -0,0 +1,36 @@ +=begin +#PAY.JP API v2 + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 2.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PAYJPv2::RedirectOptionsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PAYJPv2::RedirectOptionsResponse do + let(:instance) { PAYJPv2::RedirectOptionsResponse.new } + + describe 'test an instance of RedirectOptionsResponse' do + it 'should create an instance of RedirectOptionsResponse' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(PAYJPv2::RedirectOptionsResponse) + end + end + + describe 'test attribute "include_client_secret"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/setup_flow_create_request_spec.rb b/spec/models/setup_flow_create_request_spec.rb index a729314..6eaa5bc 100644 --- a/spec/models/setup_flow_create_request_spec.rb +++ b/spec/models/setup_flow_create_request_spec.rb @@ -55,6 +55,12 @@ end end + describe 'test attribute "redirect_options"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "description"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/setup_flow_response_spec.rb b/spec/models/setup_flow_response_spec.rb index cd6044d..314ae7d 100644 --- a/spec/models/setup_flow_response_spec.rb +++ b/spec/models/setup_flow_response_spec.rb @@ -109,6 +109,12 @@ end end + describe 'test attribute "redirect_options"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "last_setup_error"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/setup_flow_update_request_spec.rb b/spec/models/setup_flow_update_request_spec.rb index 19dc4af..4312260 100644 --- a/spec/models/setup_flow_update_request_spec.rb +++ b/spec/models/setup_flow_update_request_spec.rb @@ -49,6 +49,12 @@ end end + describe 'test attribute "redirect_options"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "description"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/tax_rate_create_request_spec.rb b/spec/models/tax_rate_create_request_spec.rb index 682cee0..69bfe6a 100644 --- a/spec/models/tax_rate_create_request_spec.rb +++ b/spec/models/tax_rate_create_request_spec.rb @@ -63,6 +63,12 @@ end end + describe 'test attribute "tax_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "metadata"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/tax_rate_details_response_spec.rb b/spec/models/tax_rate_details_response_spec.rb index ca05504..7538ddf 100644 --- a/spec/models/tax_rate_details_response_spec.rb +++ b/spec/models/tax_rate_details_response_spec.rb @@ -85,6 +85,12 @@ end end + describe 'test attribute "tax_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "created_at"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/tax_rate_update_request_spec.rb b/spec/models/tax_rate_update_request_spec.rb index 66049bd..66db9f3 100644 --- a/spec/models/tax_rate_update_request_spec.rb +++ b/spec/models/tax_rate_update_request_spec.rb @@ -51,6 +51,12 @@ end end + describe 'test attribute "tax_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "metadata"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/tax_type_spec.rb b/spec/models/tax_type_spec.rb new file mode 100644 index 0000000..635fd81 --- /dev/null +++ b/spec/models/tax_type_spec.rb @@ -0,0 +1,30 @@ +=begin +#PAY.JP API v2 + +#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +The version of the OpenAPI document: 2.0.0 + +Generated by: https://openapi-generator.tech +Generator version: 7.14.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PAYJPv2::TaxType +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PAYJPv2::TaxType do + let(:instance) { PAYJPv2::TaxType.new } + + describe 'test an instance of TaxType' do + it 'should create an instance of TaxType' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(PAYJPv2::TaxType) + end + end + +end