payjpv2 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -2
- data/docs/CheckoutSessionCreateRequest.md +2 -0
- data/docs/CheckoutSessionDetailsResponse.md +2 -0
- data/docs/CheckoutSessionsApi.md +70 -0
- data/docs/PaymentFlowCreateRequest.md +2 -0
- data/docs/PaymentFlowResponse.md +2 -0
- data/docs/PaymentFlowUpdateRequest.md +2 -0
- data/docs/RedirectOptionsRequest.md +18 -0
- data/docs/RedirectOptionsResponse.md +18 -0
- data/docs/SetupFlowCancelRequest.md +1 -1
- data/docs/SetupFlowCreateRequest.md +2 -0
- data/docs/SetupFlowResponse.md +2 -0
- data/docs/SetupFlowUpdateRequest.md +2 -0
- data/docs/TaxRateCreateRequest.md +2 -0
- data/docs/TaxRateDetailsResponse.md +2 -0
- data/docs/TaxRateUpdateRequest.md +2 -0
- data/docs/TaxType.md +15 -0
- data/lib/payjpv2/api/checkout_sessions_api.rb +60 -0
- data/lib/payjpv2/models/checkout_session_create_request.rb +11 -1
- data/lib/payjpv2/models/checkout_session_details_response.rb +23 -1
- data/lib/payjpv2/models/line_item_request.rb +14 -0
- data/lib/payjpv2/models/payment_flow_create_request.rb +11 -1
- data/lib/payjpv2/models/payment_flow_response.rb +23 -1
- data/lib/payjpv2/models/payment_flow_update_request.rb +11 -1
- data/lib/payjpv2/models/redirect_options_request.rb +206 -0
- data/lib/payjpv2/models/redirect_options_response.rb +208 -0
- data/lib/payjpv2/models/setup_flow_cancel_request.rb +1 -1
- data/lib/payjpv2/models/setup_flow_cancellation_reason.rb +2 -1
- data/lib/payjpv2/models/setup_flow_create_request.rb +11 -1
- data/lib/payjpv2/models/setup_flow_response.rb +23 -1
- data/lib/payjpv2/models/setup_flow_update_request.rb +11 -1
- data/lib/payjpv2/models/tax_rate_create_request.rb +11 -1
- data/lib/payjpv2/models/tax_rate_details_response.rb +13 -1
- data/lib/payjpv2/models/tax_rate_update_request.rb +11 -1
- data/lib/payjpv2/models/tax_type.rb +39 -0
- data/lib/payjpv2/version.rb +1 -1
- data/lib/payjpv2.rb +3 -0
- data/spec/api/checkout_sessions_api_spec.rb +33 -0
- data/spec/models/checkout_session_create_request_spec.rb +6 -0
- data/spec/models/checkout_session_details_response_spec.rb +6 -0
- data/spec/models/payment_flow_create_request_spec.rb +6 -0
- data/spec/models/payment_flow_response_spec.rb +6 -0
- data/spec/models/payment_flow_update_request_spec.rb +6 -0
- data/spec/models/redirect_options_request_spec.rb +36 -0
- data/spec/models/redirect_options_response_spec.rb +36 -0
- data/spec/models/setup_flow_create_request_spec.rb +6 -0
- data/spec/models/setup_flow_response_spec.rb +6 -0
- data/spec/models/setup_flow_update_request_spec.rb +6 -0
- data/spec/models/tax_rate_create_request_spec.rb +6 -0
- data/spec/models/tax_rate_details_response_spec.rb +6 -0
- data/spec/models/tax_rate_update_request_spec.rb +6 -0
- data/spec/models/tax_type_spec.rb +30 -0
- metadata +13 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1adc7d026ccaef72c538d6f2e3aabc01a2e27ab5680c8cff1cb59b1a21b44fcd
|
|
4
|
+
data.tar.gz: 2ce80c6529f7349b9f34ab68e79454eb3be81f6dd8eba78e26a2be3af58dce01
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3740c61fa0cfb295cda26ea3b646554f921e950025fe6d84689d6ebba79e3ff8e3d44d2416cd2a91ce2efc4d5b31693b4424d9a0b5d96846d8af77c167193332
|
|
7
|
+
data.tar.gz: fb6e82a820caa9a9896510f77dc9c23e064e1a2faa70f232be91c3de7d652745157b30f6b757ccc177955b13f66a1e904daa05d20c5c5d0ec43562b18aef8499
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -5,7 +5,7 @@ A Ruby client library for the PAY.JP v2 API. This SDK provides a convenient way
|
|
|
5
5
|
This Ruby gem is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
6
6
|
|
|
7
7
|
- API version: 2.0.0
|
|
8
|
-
- Package version: 1.
|
|
8
|
+
- Package version: 1.2.0
|
|
9
9
|
- Generator version: 7.14.0
|
|
10
10
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
11
11
|
|
|
@@ -26,7 +26,7 @@ gem install payjpv2
|
|
|
26
26
|
Add this line to your application's Gemfile:
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
|
-
gem 'payjpv2', '~> 1.
|
|
29
|
+
gem 'payjpv2', '~> 1.2.0'
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Then execute:
|
|
@@ -196,6 +196,7 @@ Class | Method | HTTP request | Description
|
|
|
196
196
|
*PAYJPv2::BalancesApi* | [**get_all_balances**](docs/BalancesApi.md#get_all_balances) | **GET** /v2/balances | Get All Balances
|
|
197
197
|
*PAYJPv2::BalancesApi* | [**get_balance**](docs/BalancesApi.md#get_balance) | **GET** /v2/balances/{balance_id} | Get Balance
|
|
198
198
|
*PAYJPv2::CheckoutSessionsApi* | [**create_checkout_session**](docs/CheckoutSessionsApi.md#create_checkout_session) | **POST** /v2/checkout/sessions | Create Checkout Session
|
|
199
|
+
*PAYJPv2::CheckoutSessionsApi* | [**expire_checkout_session**](docs/CheckoutSessionsApi.md#expire_checkout_session) | **POST** /v2/checkout/sessions/{checkout_session_id}/expire | Expire Checkout Session
|
|
199
200
|
*PAYJPv2::CheckoutSessionsApi* | [**get_all_checkout_session_line_items**](docs/CheckoutSessionsApi.md#get_all_checkout_session_line_items) | **GET** /v2/checkout/sessions/{checkout_session_id}/line_items | Get All Checkout Session Line Items
|
|
200
201
|
*PAYJPv2::CheckoutSessionsApi* | [**get_all_checkout_sessions**](docs/CheckoutSessionsApi.md#get_all_checkout_sessions) | **GET** /v2/checkout/sessions | Get All Checkout Sessions
|
|
201
202
|
*PAYJPv2::CheckoutSessionsApi* | [**get_checkout_session**](docs/CheckoutSessionsApi.md#get_checkout_session) | **GET** /v2/checkout/sessions/{checkout_session_id} | Get Checkout Session
|
|
@@ -361,6 +362,8 @@ Class | Method | HTTP request | Description
|
|
|
361
362
|
- [PAYJPv2::ProductDetailsResponse](docs/ProductDetailsResponse.md)
|
|
362
363
|
- [PAYJPv2::ProductListResponse](docs/ProductListResponse.md)
|
|
363
364
|
- [PAYJPv2::ProductUpdateRequest](docs/ProductUpdateRequest.md)
|
|
365
|
+
- [PAYJPv2::RedirectOptionsRequest](docs/RedirectOptionsRequest.md)
|
|
366
|
+
- [PAYJPv2::RedirectOptionsResponse](docs/RedirectOptionsResponse.md)
|
|
364
367
|
- [PAYJPv2::SetupFlowCancelRequest](docs/SetupFlowCancelRequest.md)
|
|
365
368
|
- [PAYJPv2::SetupFlowCancellationReason](docs/SetupFlowCancellationReason.md)
|
|
366
369
|
- [PAYJPv2::SetupFlowCreateRequest](docs/SetupFlowCreateRequest.md)
|
|
@@ -381,6 +384,7 @@ Class | Method | HTTP request | Description
|
|
|
381
384
|
- [PAYJPv2::TaxRateDetailsResponse](docs/TaxRateDetailsResponse.md)
|
|
382
385
|
- [PAYJPv2::TaxRateListResponse](docs/TaxRateListResponse.md)
|
|
383
386
|
- [PAYJPv2::TaxRateUpdateRequest](docs/TaxRateUpdateRequest.md)
|
|
387
|
+
- [PAYJPv2::TaxType](docs/TaxType.md)
|
|
384
388
|
- [PAYJPv2::TermListResponse](docs/TermListResponse.md)
|
|
385
389
|
- [PAYJPv2::TermResponse](docs/TermResponse.md)
|
|
386
390
|
- [PAYJPv2::Usage](docs/Usage.md)
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
| **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] |
|
|
14
14
|
| **success_url** | **String** | 支払いや設定が完了した際に、PAY.JP が顧客をリダイレクトする URL。成功した Checkout Session からの情報をページで使用したい場合は、成功ページのカスタマイズに関するガイドをお読みください。 | [optional] |
|
|
15
15
|
| **cancel_url** | **String** | キャンセル時のリダイレクト URL | [optional] |
|
|
16
|
+
| **redirect_options** | [**RedirectOptionsRequest**](RedirectOptionsRequest.md) | Checkout から success_url へリダイレクトする際のオプション。Checkout が作成する PaymentFlow / SetupFlow に引き継がれます。 | [optional] |
|
|
16
17
|
| **currency** | [**Currency**](Currency.md) | 価格の通貨。現在は `jpy` のみサポートしています。 | [optional] |
|
|
17
18
|
| **expires_at** | **Time** | Checkout Session の有効期限が失効する日時 | [optional] |
|
|
18
19
|
| **locale** | [**Locale**](Locale.md) | Checkout 画面の表示言語を指定します。 | 指定できる値 | |:---| | **ja**: 日本語で表示します。 | | [optional] |
|
|
@@ -38,6 +39,7 @@ instance = PAYJPv2::CheckoutSessionCreateRequest.new(
|
|
|
38
39
|
metadata: null,
|
|
39
40
|
success_url: null,
|
|
40
41
|
cancel_url: null,
|
|
42
|
+
redirect_options: null,
|
|
41
43
|
currency: null,
|
|
42
44
|
expires_at: null,
|
|
43
45
|
locale: null,
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
| **status** | [**CheckoutSessionStatus**](CheckoutSessionStatus.md) | チェックアウトセッションのステータス | |
|
|
26
26
|
| **success_url** | **String** | | |
|
|
27
27
|
| **cancel_url** | **String** | | |
|
|
28
|
+
| **redirect_options** | [**RedirectOptionsResponse**](RedirectOptionsResponse.md) | success_url へリダイレクトする際のオプション | |
|
|
28
29
|
| **url** | **String** | URL | |
|
|
29
30
|
| **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | メタデータ | |
|
|
30
31
|
| **created_at** | **Time** | 作成日時 (UTC, ISO 8601 形式) | |
|
|
@@ -57,6 +58,7 @@ instance = PAYJPv2::CheckoutSessionDetailsResponse.new(
|
|
|
57
58
|
status: null,
|
|
58
59
|
success_url: null,
|
|
59
60
|
cancel_url: null,
|
|
61
|
+
redirect_options: null,
|
|
60
62
|
url: null,
|
|
61
63
|
metadata: null,
|
|
62
64
|
created_at: null,
|
data/docs/CheckoutSessionsApi.md
CHANGED
|
@@ -5,6 +5,7 @@ All URIs are relative to *http://localhost*
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
7
|
| [**create_checkout_session**](CheckoutSessionsApi.md#create_checkout_session) | **POST** /v2/checkout/sessions | Create Checkout Session |
|
|
8
|
+
| [**expire_checkout_session**](CheckoutSessionsApi.md#expire_checkout_session) | **POST** /v2/checkout/sessions/{checkout_session_id}/expire | Expire Checkout Session |
|
|
8
9
|
| [**get_all_checkout_session_line_items**](CheckoutSessionsApi.md#get_all_checkout_session_line_items) | **GET** /v2/checkout/sessions/{checkout_session_id}/line_items | Get All Checkout Session Line Items |
|
|
9
10
|
| [**get_all_checkout_sessions**](CheckoutSessionsApi.md#get_all_checkout_sessions) | **GET** /v2/checkout/sessions | Get All Checkout Sessions |
|
|
10
11
|
| [**get_checkout_session**](CheckoutSessionsApi.md#get_checkout_session) | **GET** /v2/checkout/sessions/{checkout_session_id} | Get Checkout Session |
|
|
@@ -80,6 +81,75 @@ end
|
|
|
80
81
|
- **Accept**: application/json, application/problem+json
|
|
81
82
|
|
|
82
83
|
|
|
84
|
+
## expire_checkout_session
|
|
85
|
+
|
|
86
|
+
> <CheckoutSessionDetailsResponse> expire_checkout_session(checkout_session_id)
|
|
87
|
+
|
|
88
|
+
Expire Checkout Session
|
|
89
|
+
|
|
90
|
+
### Examples
|
|
91
|
+
|
|
92
|
+
```ruby
|
|
93
|
+
require 'time'
|
|
94
|
+
require 'payjpv2'
|
|
95
|
+
# setup authorization
|
|
96
|
+
PAYJPv2.configure do |config|
|
|
97
|
+
# Configure HTTP basic authorization: HTTPBasic
|
|
98
|
+
config.username = 'YOUR USERNAME'
|
|
99
|
+
config.password = 'YOUR PASSWORD'
|
|
100
|
+
|
|
101
|
+
# Configure Bearer authorization: HTTPBearer
|
|
102
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
api_instance = PAYJPv2::CheckoutSessionsApi.new
|
|
106
|
+
checkout_session_id = 'checkout_session_id_example' # String |
|
|
107
|
+
|
|
108
|
+
begin
|
|
109
|
+
# Expire Checkout Session
|
|
110
|
+
result = api_instance.expire_checkout_session(checkout_session_id)
|
|
111
|
+
p result
|
|
112
|
+
rescue PAYJPv2::ApiError => e
|
|
113
|
+
puts "Error when calling CheckoutSessionsApi->expire_checkout_session: #{e}"
|
|
114
|
+
end
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
#### Using the include_http_info option
|
|
118
|
+
|
|
119
|
+
To get response data along with status code and headers, use the `include_http_info: true` option.
|
|
120
|
+
|
|
121
|
+
```ruby
|
|
122
|
+
begin
|
|
123
|
+
# Expire Checkout Session
|
|
124
|
+
data, status_code, headers = api_instance.expire_checkout_session(checkout_session_id, { include_http_info: true })
|
|
125
|
+
p status_code # => 2xx
|
|
126
|
+
p headers # => { ... }
|
|
127
|
+
p data # => <CheckoutSessionDetailsResponse>
|
|
128
|
+
rescue PAYJPv2::ApiError => e
|
|
129
|
+
puts "Error when calling CheckoutSessionsApi->expire_checkout_session: #{e}"
|
|
130
|
+
end
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Parameters
|
|
134
|
+
|
|
135
|
+
| Name | Type | Description | Notes |
|
|
136
|
+
| ---- | ---- | ----------- | ----- |
|
|
137
|
+
| **checkout_session_id** | **String** | | |
|
|
138
|
+
|
|
139
|
+
### Return type
|
|
140
|
+
|
|
141
|
+
[**CheckoutSessionDetailsResponse**](CheckoutSessionDetailsResponse.md)
|
|
142
|
+
|
|
143
|
+
### Authorization
|
|
144
|
+
|
|
145
|
+
[HTTPBasic](../README.md#HTTPBasic), [HTTPBearer](../README.md#HTTPBearer)
|
|
146
|
+
|
|
147
|
+
### HTTP request headers
|
|
148
|
+
|
|
149
|
+
- **Content-Type**: Not defined
|
|
150
|
+
- **Accept**: application/json, application/problem+json
|
|
151
|
+
|
|
152
|
+
|
|
83
153
|
## get_all_checkout_session_line_items
|
|
84
154
|
|
|
85
155
|
> <CheckoutSessionLineItemListResponse> get_all_checkout_session_line_items(checkout_session_id, opts)
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
| **capture_method** | [**CaptureMethod**](CaptureMethod.md) | 支払いの確定方法を指定します。 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Payment Flow の Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | [optional] |
|
|
14
14
|
| **confirm** | **Boolean** | 「true」に設定すると、この PaymentFlow を直ちに確定しようと試みます。 | [optional][default to false] |
|
|
15
15
|
| **return_url** | **String** | 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。confirm=true の場合のみ指定できます。 | [optional] |
|
|
16
|
+
| **redirect_options** | [**RedirectOptionsRequest**](RedirectOptionsRequest.md) | return_url へリダイレクトする際のオプション | [optional] |
|
|
16
17
|
| **description** | **String** | オブジェクトにセットする任意の文字列。 | [optional] |
|
|
17
18
|
| **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] |
|
|
18
19
|
|
|
@@ -31,6 +32,7 @@ instance = PAYJPv2::PaymentFlowCreateRequest.new(
|
|
|
31
32
|
capture_method: null,
|
|
32
33
|
confirm: null,
|
|
33
34
|
return_url: null,
|
|
35
|
+
redirect_options: null,
|
|
34
36
|
description: null,
|
|
35
37
|
metadata: null
|
|
36
38
|
)
|
data/docs/PaymentFlowResponse.md
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
| **status** | [**PaymentFlowStatus**](PaymentFlowStatus.md) | この PaymentFlow のステータス。 | 値 | |:---| | **requires_payment_method**: 支払い方法が必要です。 | | **requires_confirmation**: 確認が必要です。 | | **requires_action**: 顧客のアクションが必要です。 | | **processing**: 処理中です。 | | **requires_capture**: 確定が必要です。 | | **canceled**: キャンセルされました。 | | **succeeded**: 成功しました。 | | |
|
|
21
21
|
| **next_action** | **Hash<String, Object>** | | |
|
|
22
22
|
| **return_url** | **String** | | |
|
|
23
|
+
| **redirect_options** | [**RedirectOptionsResponse**](RedirectOptionsResponse.md) | return_url へリダイレクトする際のオプション | |
|
|
23
24
|
| **capture_method** | [**CaptureMethod**](CaptureMethod.md) | 支払いの確定方法 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 | | |
|
|
24
25
|
| **last_payment_error** | **Hash<String, Object>** | | |
|
|
25
26
|
| **cancellation_reason** | [**PaymentFlowCancellationReason**](PaymentFlowCancellationReason.md) | | |
|
|
@@ -51,6 +52,7 @@ instance = PAYJPv2::PaymentFlowResponse.new(
|
|
|
51
52
|
status: null,
|
|
52
53
|
next_action: null,
|
|
53
54
|
return_url: null,
|
|
55
|
+
redirect_options: null,
|
|
54
56
|
capture_method: null,
|
|
55
57
|
last_payment_error: null,
|
|
56
58
|
cancellation_reason: null,
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
| **payment_method_options** | [**PaymentFlowPaymentMethodOptionsRequest**](PaymentFlowPaymentMethodOptionsRequest.md) | この PaymentFlow 固有の支払い方法の設定 | [optional] |
|
|
11
11
|
| **payment_method_types** | [**Array<PaymentMethodTypes>**](PaymentMethodTypes.md) | この PaymentFlow で使用できる支払い方法の種類のリスト。指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] |
|
|
12
12
|
| **return_url** | **String** | 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。 | [optional] |
|
|
13
|
+
| **redirect_options** | [**RedirectOptionsRequest**](RedirectOptionsRequest.md) | return_url へリダイレクトする際のオプション | [optional] |
|
|
13
14
|
| **description** | **String** | オブジェクトにセットする任意の文字列。 | [optional] |
|
|
14
15
|
| **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] |
|
|
15
16
|
|
|
@@ -25,6 +26,7 @@ instance = PAYJPv2::PaymentFlowUpdateRequest.new(
|
|
|
25
26
|
payment_method_options: null,
|
|
26
27
|
payment_method_types: null,
|
|
27
28
|
return_url: null,
|
|
29
|
+
redirect_options: null,
|
|
28
30
|
description: null,
|
|
29
31
|
metadata: null
|
|
30
32
|
)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# PAYJPv2::RedirectOptionsRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **include_client_secret** | **Boolean** | return_url へリダイレクトする際、クエリパラメーターに client_secret を付与するかどうか。デフォルトは `true` です。 | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'payjpv2'
|
|
13
|
+
|
|
14
|
+
instance = PAYJPv2::RedirectOptionsRequest.new(
|
|
15
|
+
include_client_secret: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# PAYJPv2::RedirectOptionsResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **include_client_secret** | **Boolean** | return_url へリダイレクトする際、クエリパラメーターに client_secret を付与するかどうか。デフォルトは `true` です。 | [optional][default to true] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'payjpv2'
|
|
13
|
+
|
|
14
|
+
instance = PAYJPv2::RedirectOptionsResponse.new(
|
|
15
|
+
include_client_secret: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **cancellation_reason** | [**SetupFlowCancellationReason**](SetupFlowCancellationReason.md) | この SetupFlow のキャンセル理由。 | 値 | |:---| | **abandoned**: 顧客が SetupFlow を完了しなかった場合。 | | **requested_by_customer**: 顧客がキャンセルを要求した場合。 | | **duplicate**: 支払い方法が重複している場合。 | | [optional] |
|
|
7
|
+
| **cancellation_reason** | [**SetupFlowCancellationReason**](SetupFlowCancellationReason.md) | この SetupFlow のキャンセル理由。 | 値 | |:---| | **abandoned**: 顧客が SetupFlow を完了しなかった場合。 | | **requested_by_customer**: 顧客がキャンセルを要求した場合。 | | **duplicate**: 支払い方法が重複している場合。 | `expired` はシステムが自動的に設定する値のため、リクエストでは指定できません。 | [optional] |
|
|
8
8
|
|
|
9
9
|
## Example
|
|
10
10
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
| **payment_method_options** | [**SetupFlowPaymentMethodOptionsRequest**](SetupFlowPaymentMethodOptionsRequest.md) | この SetupFlow 固有の支払い方法の設定 | [optional] |
|
|
9
9
|
| **payment_method_types** | **Array<String>** | この SetupFlow で使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] |
|
|
10
10
|
| **usage** | [**Usage**](Usage.md) | 支払い方法が今後どのように使用されるかを指定します。指定されていない場合、この値はデフォルトで `off_session` になります。 | 値 | |:---| | **off_session**: 定期課金など、顧客がカートなどの決済フローにいるかどうか不明な場合は `off_session` を使用してください。 | | **on_session**: 顧客がカートなどの決済フローにいる場合にのみ支払い方法を利用する場合は `on_session` を使用してください。 | | [optional] |
|
|
11
|
+
| **redirect_options** | [**RedirectOptionsRequest**](RedirectOptionsRequest.md) | return_url へリダイレクトする際のオプション | [optional] |
|
|
11
12
|
| **description** | **String** | 説明。 | [optional] |
|
|
12
13
|
| **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] |
|
|
13
14
|
|
|
@@ -21,6 +22,7 @@ instance = PAYJPv2::SetupFlowCreateRequest.new(
|
|
|
21
22
|
payment_method_options: null,
|
|
22
23
|
payment_method_types: null,
|
|
23
24
|
usage: null,
|
|
25
|
+
redirect_options: null,
|
|
24
26
|
description: null,
|
|
25
27
|
metadata: null
|
|
26
28
|
)
|
data/docs/SetupFlowResponse.md
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
| **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**: キャンセルされました。 | | |
|
|
18
18
|
| **next_action** | **Hash<String, Object>** | | |
|
|
19
19
|
| **return_url** | **String** | | |
|
|
20
|
+
| **redirect_options** | [**RedirectOptionsResponse**](RedirectOptionsResponse.md) | return_url へリダイレクトする際のオプション | |
|
|
20
21
|
| **last_setup_error** | **Hash<String, Object>** | | |
|
|
21
22
|
| **cancellation_reason** | [**SetupFlowCancellationReason**](SetupFlowCancellationReason.md) | | |
|
|
22
23
|
| **created_at** | **Time** | 作成日時 (UTC, ISO 8601 形式) | |
|
|
@@ -41,6 +42,7 @@ instance = PAYJPv2::SetupFlowResponse.new(
|
|
|
41
42
|
status: null,
|
|
42
43
|
next_action: null,
|
|
43
44
|
return_url: null,
|
|
45
|
+
redirect_options: null,
|
|
44
46
|
last_setup_error: null,
|
|
45
47
|
cancellation_reason: null,
|
|
46
48
|
created_at: null,
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
| **customer_id** | **String** | この SetupFlow に関連付ける顧客の ID。SetupFlow により作られた PaymentMethod はこの顧客に紐付きます。 | [optional] |
|
|
8
8
|
| **payment_method_options** | [**SetupFlowPaymentMethodOptionsRequest**](SetupFlowPaymentMethodOptionsRequest.md) | この SetupFlow 固有の支払い方法の設定 | [optional] |
|
|
9
9
|
| **payment_method_types** | **Array<String>** | この SetupFlow で使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。 | [optional] |
|
|
10
|
+
| **redirect_options** | [**RedirectOptionsRequest**](RedirectOptionsRequest.md) | return_url へリダイレクトする際のオプション | [optional] |
|
|
10
11
|
| **description** | **String** | 説明。 | [optional] |
|
|
11
12
|
| **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] |
|
|
12
13
|
|
|
@@ -19,6 +20,7 @@ instance = PAYJPv2::SetupFlowUpdateRequest.new(
|
|
|
19
20
|
customer_id: null,
|
|
20
21
|
payment_method_options: null,
|
|
21
22
|
payment_method_types: null,
|
|
23
|
+
redirect_options: null,
|
|
22
24
|
description: null,
|
|
23
25
|
metadata: null
|
|
24
26
|
)
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
| **active** | **Boolean** | この税率が有効であるかどうか。無効にした場合でも、すでに設定されている定期課金などでは使用可能です。 | [optional][default to true] |
|
|
11
11
|
| **country** | [**Country**](Country.md) | 有効な2文字の <a href=\"https://ja.wikipedia.org/wiki/ISO_3166-1\" target=\"_blank\">ISO 国コード</a> | [optional] |
|
|
12
12
|
| **description** | **String** | 説明。管理画面内のみで表示され、顧客には表示されません。 | [optional] |
|
|
13
|
+
| **tax_type** | [**TaxType**](TaxType.md) | | [optional] |
|
|
13
14
|
| **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] |
|
|
14
15
|
|
|
15
16
|
## Example
|
|
@@ -24,6 +25,7 @@ instance = PAYJPv2::TaxRateCreateRequest.new(
|
|
|
24
25
|
active: null,
|
|
25
26
|
country: null,
|
|
26
27
|
description: null,
|
|
28
|
+
tax_type: null,
|
|
27
29
|
metadata: null
|
|
28
30
|
)
|
|
29
31
|
```
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
| **active** | **Boolean** | この税率が有効であるかどうか | |
|
|
14
14
|
| **country** | [**Country**](Country.md) | | |
|
|
15
15
|
| **description** | **String** | | |
|
|
16
|
+
| **tax_type** | [**TaxType**](TaxType.md) | | |
|
|
16
17
|
| **created_at** | **Time** | 作成日時 (UTC, ISO 8601 形式) | |
|
|
17
18
|
| **updated_at** | **Time** | 更新日時 (UTC, ISO 8601 形式) | |
|
|
18
19
|
| **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | メタデータ | |
|
|
@@ -32,6 +33,7 @@ instance = PAYJPv2::TaxRateDetailsResponse.new(
|
|
|
32
33
|
active: null,
|
|
33
34
|
country: null,
|
|
34
35
|
description: null,
|
|
36
|
+
tax_type: null,
|
|
35
37
|
created_at: null,
|
|
36
38
|
updated_at: null,
|
|
37
39
|
metadata: null
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
| **country** | [**Country**](Country.md) | 有効な2文字の <a href=\"https://ja.wikipedia.org/wiki/ISO_3166-1\" target=\"_blank\">ISO 国コード</a> | [optional] |
|
|
9
9
|
| **description** | **String** | 説明。管理画面内のみで表示され、顧客には表示されません。 | [optional] |
|
|
10
10
|
| **display_name** | **String** | 表示名。顧客に表示されます。 | [optional] |
|
|
11
|
+
| **tax_type** | [**TaxType**](TaxType.md) | | [optional] |
|
|
11
12
|
| **metadata** | [**Hash<String, MetadataValue>**](MetadataValue.md) | キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a> | [optional] |
|
|
12
13
|
|
|
13
14
|
## Example
|
|
@@ -20,6 +21,7 @@ instance = PAYJPv2::TaxRateUpdateRequest.new(
|
|
|
20
21
|
country: null,
|
|
21
22
|
description: null,
|
|
22
23
|
display_name: null,
|
|
24
|
+
tax_type: null,
|
|
23
25
|
metadata: null
|
|
24
26
|
)
|
|
25
27
|
```
|
data/docs/TaxType.md
ADDED
|
@@ -84,6 +84,66 @@ module PAYJPv2
|
|
|
84
84
|
end
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
+
# Expire Checkout Session
|
|
88
|
+
# @param checkout_session_id [String]
|
|
89
|
+
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @option opts [String] :idempotency_key Idempotency key for the request
|
|
91
|
+
# @option opts [Boolean] :include_http_info If true, returns [data, status_code, headers] instead of just data
|
|
92
|
+
# @return [CheckoutSessionDetailsResponse, Array] Returns data or [data, status_code, headers] if include_http_info is true
|
|
93
|
+
def expire_checkout_session(checkout_session_id, opts = {})
|
|
94
|
+
if @api_client.config.debugging
|
|
95
|
+
@api_client.config.logger.debug 'Calling API: CheckoutSessionsApi.expire_checkout_session ...'
|
|
96
|
+
end
|
|
97
|
+
# verify the required parameter 'checkout_session_id' is set
|
|
98
|
+
if @api_client.config.client_side_validation && checkout_session_id.nil?
|
|
99
|
+
raise ArgumentError, "Missing the required parameter 'checkout_session_id' when calling CheckoutSessionsApi.expire_checkout_session"
|
|
100
|
+
end
|
|
101
|
+
# resource path
|
|
102
|
+
local_var_path = '/v2/checkout/sessions/{checkout_session_id}/expire'.sub('{' + 'checkout_session_id' + '}', CGI.escape(checkout_session_id.to_s))
|
|
103
|
+
|
|
104
|
+
# query parameters
|
|
105
|
+
query_params = opts[:query_params] || {}
|
|
106
|
+
|
|
107
|
+
# header parameters
|
|
108
|
+
header_params = opts[:header_params] || {}
|
|
109
|
+
header_params['Idempotency-Key'] = opts[:idempotency_key] if opts[:idempotency_key]
|
|
110
|
+
# HTTP header 'Accept' (if needed)
|
|
111
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
112
|
+
|
|
113
|
+
# form parameters
|
|
114
|
+
form_params = opts[:form_params] || {}
|
|
115
|
+
|
|
116
|
+
# http body (model)
|
|
117
|
+
post_body = opts[:debug_body]
|
|
118
|
+
|
|
119
|
+
# return_type
|
|
120
|
+
return_type = opts[:debug_return_type] || 'CheckoutSessionDetailsResponse'
|
|
121
|
+
|
|
122
|
+
# auth_names
|
|
123
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBasic', 'HTTPBearer']
|
|
124
|
+
|
|
125
|
+
new_options = opts.merge(
|
|
126
|
+
:operation => :"CheckoutSessionsApi.expire_checkout_session",
|
|
127
|
+
:header_params => header_params,
|
|
128
|
+
:query_params => query_params,
|
|
129
|
+
:form_params => form_params,
|
|
130
|
+
:body => post_body,
|
|
131
|
+
:auth_names => auth_names,
|
|
132
|
+
:return_type => return_type
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
136
|
+
if @api_client.config.debugging
|
|
137
|
+
@api_client.config.logger.debug "API called: CheckoutSessionsApi#expire_checkout_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if opts[:include_http_info]
|
|
141
|
+
[data, status_code, headers]
|
|
142
|
+
else
|
|
143
|
+
data
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
87
147
|
# Get All Checkout Session Line Items
|
|
88
148
|
# @param checkout_session_id [String]
|
|
89
149
|
# @param [Hash] opts the optional parameters
|
|
@@ -42,6 +42,9 @@ module PAYJPv2
|
|
|
42
42
|
# キャンセル時のリダイレクト URL
|
|
43
43
|
attr_accessor :cancel_url
|
|
44
44
|
|
|
45
|
+
# Checkout から success_url へリダイレクトする際のオプション。Checkout が作成する PaymentFlow / SetupFlow に引き継がれます。
|
|
46
|
+
attr_accessor :redirect_options
|
|
47
|
+
|
|
45
48
|
# 価格の通貨。現在は `jpy` のみサポートしています。
|
|
46
49
|
attr_accessor :currency
|
|
47
50
|
|
|
@@ -103,6 +106,7 @@ module PAYJPv2
|
|
|
103
106
|
:metadata => :metadata,
|
|
104
107
|
:success_url => :success_url,
|
|
105
108
|
:cancel_url => :cancel_url,
|
|
109
|
+
:redirect_options => :redirect_options,
|
|
106
110
|
:currency => :currency,
|
|
107
111
|
:expires_at => :expires_at,
|
|
108
112
|
:locale => :locale,
|
|
@@ -137,6 +141,7 @@ module PAYJPv2
|
|
|
137
141
|
:metadata => :'Hash<String, MetadataValue>',
|
|
138
142
|
:success_url => :'String',
|
|
139
143
|
:cancel_url => :'String',
|
|
144
|
+
:redirect_options => :'RedirectOptionsRequest',
|
|
140
145
|
:currency => :'Currency',
|
|
141
146
|
:expires_at => :'Time',
|
|
142
147
|
:locale => :'Locale',
|
|
@@ -213,6 +218,10 @@ module PAYJPv2
|
|
|
213
218
|
self.cancel_url = attributes[:cancel_url]
|
|
214
219
|
end
|
|
215
220
|
|
|
221
|
+
if attributes.key?(:redirect_options)
|
|
222
|
+
self.redirect_options = attributes[:redirect_options]
|
|
223
|
+
end
|
|
224
|
+
|
|
216
225
|
if attributes.key?(:currency)
|
|
217
226
|
self.currency = attributes[:currency]
|
|
218
227
|
end
|
|
@@ -290,6 +299,7 @@ module PAYJPv2
|
|
|
290
299
|
metadata == o.metadata &&
|
|
291
300
|
success_url == o.success_url &&
|
|
292
301
|
cancel_url == o.cancel_url &&
|
|
302
|
+
redirect_options == o.redirect_options &&
|
|
293
303
|
currency == o.currency &&
|
|
294
304
|
expires_at == o.expires_at &&
|
|
295
305
|
locale == o.locale &&
|
|
@@ -310,7 +320,7 @@ module PAYJPv2
|
|
|
310
320
|
# Calculates hash code according to all attributes.
|
|
311
321
|
# @return [Integer] Hash code
|
|
312
322
|
def hash
|
|
313
|
-
[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
|
|
323
|
+
[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
|
|
314
324
|
end
|
|
315
325
|
|
|
316
326
|
# Builds the object from hash
|
|
@@ -63,6 +63,9 @@ module PAYJPv2
|
|
|
63
63
|
|
|
64
64
|
attr_accessor :cancel_url
|
|
65
65
|
|
|
66
|
+
# success_url へリダイレクトする際のオプション
|
|
67
|
+
attr_accessor :redirect_options
|
|
68
|
+
|
|
66
69
|
# URL
|
|
67
70
|
attr_accessor :url
|
|
68
71
|
|
|
@@ -121,6 +124,7 @@ module PAYJPv2
|
|
|
121
124
|
:status => :status,
|
|
122
125
|
:success_url => :success_url,
|
|
123
126
|
:cancel_url => :cancel_url,
|
|
127
|
+
:redirect_options => :redirect_options,
|
|
124
128
|
:url => :url,
|
|
125
129
|
:metadata => :metadata,
|
|
126
130
|
:created_at => :created_at,
|
|
@@ -162,6 +166,7 @@ module PAYJPv2
|
|
|
162
166
|
:status => :'CheckoutSessionStatus',
|
|
163
167
|
:success_url => :'String',
|
|
164
168
|
:cancel_url => :'String',
|
|
169
|
+
:redirect_options => :'RedirectOptionsResponse',
|
|
165
170
|
:url => :'String',
|
|
166
171
|
:metadata => :'Hash<String, MetadataValue>',
|
|
167
172
|
:created_at => :'Time',
|
|
@@ -329,6 +334,12 @@ module PAYJPv2
|
|
|
329
334
|
self.cancel_url = nil
|
|
330
335
|
end
|
|
331
336
|
|
|
337
|
+
if attributes.key?(:redirect_options)
|
|
338
|
+
self.redirect_options = attributes[:redirect_options]
|
|
339
|
+
else
|
|
340
|
+
self.redirect_options = nil
|
|
341
|
+
end
|
|
342
|
+
|
|
332
343
|
if attributes.key?(:url)
|
|
333
344
|
self.url = attributes[:url]
|
|
334
345
|
else
|
|
@@ -426,6 +437,16 @@ module PAYJPv2
|
|
|
426
437
|
@status = status
|
|
427
438
|
end
|
|
428
439
|
|
|
440
|
+
# Custom attribute writer method with validation
|
|
441
|
+
# @param [Object] redirect_options Value to be assigned
|
|
442
|
+
def redirect_options=(redirect_options)
|
|
443
|
+
if redirect_options.nil?
|
|
444
|
+
raise ArgumentError, 'redirect_options cannot be nil'
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
@redirect_options = redirect_options
|
|
448
|
+
end
|
|
449
|
+
|
|
429
450
|
# Custom attribute writer method with validation
|
|
430
451
|
# @param [Object] url Value to be assigned
|
|
431
452
|
def url=(url)
|
|
@@ -492,6 +513,7 @@ module PAYJPv2
|
|
|
492
513
|
status == o.status &&
|
|
493
514
|
success_url == o.success_url &&
|
|
494
515
|
cancel_url == o.cancel_url &&
|
|
516
|
+
redirect_options == o.redirect_options &&
|
|
495
517
|
url == o.url &&
|
|
496
518
|
metadata == o.metadata &&
|
|
497
519
|
created_at == o.created_at &&
|
|
@@ -507,7 +529,7 @@ module PAYJPv2
|
|
|
507
529
|
# Calculates hash code according to all attributes.
|
|
508
530
|
# @return [Integer] Hash code
|
|
509
531
|
def hash
|
|
510
|
-
[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
|
|
532
|
+
[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
|
|
511
533
|
end
|
|
512
534
|
|
|
513
535
|
# Builds the object from hash
|
|
@@ -110,6 +110,20 @@ module PAYJPv2
|
|
|
110
110
|
@quantity = quantity
|
|
111
111
|
end
|
|
112
112
|
|
|
113
|
+
# Custom attribute writer method with validation
|
|
114
|
+
# @param [Object] tax_rates Value to be assigned
|
|
115
|
+
def tax_rates=(tax_rates)
|
|
116
|
+
if tax_rates.nil?
|
|
117
|
+
raise ArgumentError, 'tax_rates cannot be nil'
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if tax_rates.length > 1
|
|
121
|
+
raise ArgumentError, 'invalid value for "tax_rates", number of items must be less than or equal to 1.'
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
@tax_rates = tax_rates
|
|
125
|
+
end
|
|
126
|
+
|
|
113
127
|
# Checks equality by comparing each attribute.
|
|
114
128
|
# @param [Object] Object to be compared
|
|
115
129
|
def ==(o)
|