payjpv2 1.0.11 → 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 +8 -2
- data/docs/CheckoutSessionCreateRequest.md +2 -0
- data/docs/CheckoutSessionDetailsResponse.md +2 -0
- data/docs/CheckoutSessionsApi.md +70 -0
- data/docs/CustomerUpdateRequest.md +1 -1
- data/docs/LineItemRequest.md +3 -1
- data/docs/PaymentFlowCreateRequest.md +2 -0
- data/docs/PaymentFlowResponse.md +2 -0
- data/docs/PaymentFlowUpdateRequest.md +2 -0
- data/docs/PriceDataRequest.md +24 -0
- data/docs/ProductDataRequest.md +20 -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/customer_update_request.rb +1 -1
- data/lib/payjpv2/models/line_item_request.rb +26 -14
- 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/price_data_request.rb +286 -0
- data/lib/payjpv2/models/product_data_request.rb +228 -0
- 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 +5 -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/line_item_request_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/price_data_request_spec.rb +54 -0
- data/spec/models/product_data_request_spec.rb +42 -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 +21 -1
|
@@ -27,6 +27,9 @@ module PAYJPv2
|
|
|
27
27
|
# 支払い方法が今後どのように使用されるかを指定します。指定されていない場合、この値はデフォルトで `off_session` になります。 | 値 | |:---| | **off_session**: 定期課金など、顧客がカートなどの決済フローにいるかどうか不明な場合は `off_session` を使用してください。 | | **on_session**: 顧客がカートなどの決済フローにいる場合にのみ支払い方法を利用する場合は `on_session` を使用してください。 |
|
|
28
28
|
attr_accessor :usage
|
|
29
29
|
|
|
30
|
+
# return_url へリダイレクトする際のオプション
|
|
31
|
+
attr_accessor :redirect_options
|
|
32
|
+
|
|
30
33
|
# 説明。
|
|
31
34
|
attr_accessor :description
|
|
32
35
|
|
|
@@ -62,6 +65,7 @@ module PAYJPv2
|
|
|
62
65
|
:payment_method_options => :payment_method_options,
|
|
63
66
|
:payment_method_types => :payment_method_types,
|
|
64
67
|
:usage => :usage,
|
|
68
|
+
:redirect_options => :redirect_options,
|
|
65
69
|
:description => :description,
|
|
66
70
|
:metadata => :metadata
|
|
67
71
|
}
|
|
@@ -84,6 +88,7 @@ module PAYJPv2
|
|
|
84
88
|
:payment_method_options => :'SetupFlowPaymentMethodOptionsRequest',
|
|
85
89
|
:payment_method_types => :'Array<String>',
|
|
86
90
|
:usage => :'Usage',
|
|
91
|
+
:redirect_options => :'RedirectOptionsRequest',
|
|
87
92
|
:description => :'String',
|
|
88
93
|
:metadata => :'Hash<String, MetadataValue>'
|
|
89
94
|
}
|
|
@@ -129,6 +134,10 @@ module PAYJPv2
|
|
|
129
134
|
self.usage = attributes[:usage]
|
|
130
135
|
end
|
|
131
136
|
|
|
137
|
+
if attributes.key?(:redirect_options)
|
|
138
|
+
self.redirect_options = attributes[:redirect_options]
|
|
139
|
+
end
|
|
140
|
+
|
|
132
141
|
if attributes.key?(:description)
|
|
133
142
|
self.description = attributes[:description]
|
|
134
143
|
end
|
|
@@ -149,6 +158,7 @@ module PAYJPv2
|
|
|
149
158
|
payment_method_options == o.payment_method_options &&
|
|
150
159
|
payment_method_types == o.payment_method_types &&
|
|
151
160
|
usage == o.usage &&
|
|
161
|
+
redirect_options == o.redirect_options &&
|
|
152
162
|
description == o.description &&
|
|
153
163
|
metadata == o.metadata
|
|
154
164
|
end
|
|
@@ -162,7 +172,7 @@ module PAYJPv2
|
|
|
162
172
|
# Calculates hash code according to all attributes.
|
|
163
173
|
# @return [Integer] Hash code
|
|
164
174
|
def hash
|
|
165
|
-
[customer_id, payment_method_options, payment_method_types, usage, description, metadata].hash
|
|
175
|
+
[customer_id, payment_method_options, payment_method_types, usage, redirect_options, description, metadata].hash
|
|
166
176
|
end
|
|
167
177
|
|
|
168
178
|
# Builds the object from hash
|
|
@@ -47,6 +47,9 @@ module PAYJPv2
|
|
|
47
47
|
|
|
48
48
|
attr_accessor :return_url
|
|
49
49
|
|
|
50
|
+
# return_url へリダイレクトする際のオプション
|
|
51
|
+
attr_accessor :redirect_options
|
|
52
|
+
|
|
50
53
|
attr_accessor :last_setup_error
|
|
51
54
|
|
|
52
55
|
attr_accessor :cancellation_reason
|
|
@@ -95,6 +98,7 @@ module PAYJPv2
|
|
|
95
98
|
:status => :status,
|
|
96
99
|
:next_action => :next_action,
|
|
97
100
|
:return_url => :return_url,
|
|
101
|
+
:redirect_options => :redirect_options,
|
|
98
102
|
:last_setup_error => :last_setup_error,
|
|
99
103
|
:cancellation_reason => :cancellation_reason,
|
|
100
104
|
:created_at => :created_at,
|
|
@@ -128,6 +132,7 @@ module PAYJPv2
|
|
|
128
132
|
:status => :'SetupFlowStatus',
|
|
129
133
|
:next_action => :'Hash<String, Object>',
|
|
130
134
|
:return_url => :'String',
|
|
135
|
+
:redirect_options => :'RedirectOptionsResponse',
|
|
131
136
|
:last_setup_error => :'Hash<String, Object>',
|
|
132
137
|
:cancellation_reason => :'SetupFlowCancellationReason',
|
|
133
138
|
:created_at => :'Time',
|
|
@@ -251,6 +256,12 @@ module PAYJPv2
|
|
|
251
256
|
self.return_url = nil
|
|
252
257
|
end
|
|
253
258
|
|
|
259
|
+
if attributes.key?(:redirect_options)
|
|
260
|
+
self.redirect_options = attributes[:redirect_options]
|
|
261
|
+
else
|
|
262
|
+
self.redirect_options = nil
|
|
263
|
+
end
|
|
264
|
+
|
|
254
265
|
if attributes.key?(:last_setup_error)
|
|
255
266
|
if (value = attributes[:last_setup_error]).is_a?(Hash)
|
|
256
267
|
self.last_setup_error = value
|
|
@@ -348,6 +359,16 @@ module PAYJPv2
|
|
|
348
359
|
@status = status
|
|
349
360
|
end
|
|
350
361
|
|
|
362
|
+
# Custom attribute writer method with validation
|
|
363
|
+
# @param [Object] redirect_options Value to be assigned
|
|
364
|
+
def redirect_options=(redirect_options)
|
|
365
|
+
if redirect_options.nil?
|
|
366
|
+
raise ArgumentError, 'redirect_options cannot be nil'
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
@redirect_options = redirect_options
|
|
370
|
+
end
|
|
371
|
+
|
|
351
372
|
# Custom attribute writer method with validation
|
|
352
373
|
# @param [Object] created_at Value to be assigned
|
|
353
374
|
def created_at=(created_at)
|
|
@@ -386,6 +407,7 @@ module PAYJPv2
|
|
|
386
407
|
status == o.status &&
|
|
387
408
|
next_action == o.next_action &&
|
|
388
409
|
return_url == o.return_url &&
|
|
410
|
+
redirect_options == o.redirect_options &&
|
|
389
411
|
last_setup_error == o.last_setup_error &&
|
|
390
412
|
cancellation_reason == o.cancellation_reason &&
|
|
391
413
|
created_at == o.created_at &&
|
|
@@ -401,7 +423,7 @@ module PAYJPv2
|
|
|
401
423
|
# Calculates hash code according to all attributes.
|
|
402
424
|
# @return [Integer] Hash code
|
|
403
425
|
def hash
|
|
404
|
-
[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
|
|
426
|
+
[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
|
|
405
427
|
end
|
|
406
428
|
|
|
407
429
|
# Builds the object from hash
|
|
@@ -24,6 +24,9 @@ module PAYJPv2
|
|
|
24
24
|
# この SetupFlow で使用できる支払い方法の種類のリスト。 指定しない場合は、PAY.JP は支払い方法の設定から利用可能な支払い方法を動的に表示します。
|
|
25
25
|
attr_accessor :payment_method_types
|
|
26
26
|
|
|
27
|
+
# return_url へリダイレクトする際のオプション
|
|
28
|
+
attr_accessor :redirect_options
|
|
29
|
+
|
|
27
30
|
# 説明。
|
|
28
31
|
attr_accessor :description
|
|
29
32
|
|
|
@@ -58,6 +61,7 @@ module PAYJPv2
|
|
|
58
61
|
:customer_id => :customer_id,
|
|
59
62
|
:payment_method_options => :payment_method_options,
|
|
60
63
|
:payment_method_types => :payment_method_types,
|
|
64
|
+
:redirect_options => :redirect_options,
|
|
61
65
|
:description => :description,
|
|
62
66
|
:metadata => :metadata
|
|
63
67
|
}
|
|
@@ -79,6 +83,7 @@ module PAYJPv2
|
|
|
79
83
|
:customer_id => :'String',
|
|
80
84
|
:payment_method_options => :'SetupFlowPaymentMethodOptionsRequest',
|
|
81
85
|
:payment_method_types => :'Array<String>',
|
|
86
|
+
:redirect_options => :'RedirectOptionsRequest',
|
|
82
87
|
:description => :'String',
|
|
83
88
|
:metadata => :'Hash<String, MetadataValue>'
|
|
84
89
|
}
|
|
@@ -120,6 +125,10 @@ module PAYJPv2
|
|
|
120
125
|
end
|
|
121
126
|
end
|
|
122
127
|
|
|
128
|
+
if attributes.key?(:redirect_options)
|
|
129
|
+
self.redirect_options = attributes[:redirect_options]
|
|
130
|
+
end
|
|
131
|
+
|
|
123
132
|
if attributes.key?(:description)
|
|
124
133
|
self.description = attributes[:description]
|
|
125
134
|
end
|
|
@@ -139,6 +148,7 @@ module PAYJPv2
|
|
|
139
148
|
customer_id == o.customer_id &&
|
|
140
149
|
payment_method_options == o.payment_method_options &&
|
|
141
150
|
payment_method_types == o.payment_method_types &&
|
|
151
|
+
redirect_options == o.redirect_options &&
|
|
142
152
|
description == o.description &&
|
|
143
153
|
metadata == o.metadata
|
|
144
154
|
end
|
|
@@ -152,7 +162,7 @@ module PAYJPv2
|
|
|
152
162
|
# Calculates hash code according to all attributes.
|
|
153
163
|
# @return [Integer] Hash code
|
|
154
164
|
def hash
|
|
155
|
-
[customer_id, payment_method_options, payment_method_types, description, metadata].hash
|
|
165
|
+
[customer_id, payment_method_options, payment_method_types, redirect_options, description, metadata].hash
|
|
156
166
|
end
|
|
157
167
|
|
|
158
168
|
# Builds the object from hash
|
|
@@ -33,6 +33,8 @@ module PAYJPv2
|
|
|
33
33
|
# 説明。管理画面内のみで表示され、顧客には表示されません。
|
|
34
34
|
attr_accessor :description
|
|
35
35
|
|
|
36
|
+
attr_accessor :tax_type
|
|
37
|
+
|
|
36
38
|
# キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a>
|
|
37
39
|
attr_accessor :metadata
|
|
38
40
|
|
|
@@ -67,6 +69,7 @@ module PAYJPv2
|
|
|
67
69
|
:active => :active,
|
|
68
70
|
:country => :country,
|
|
69
71
|
:description => :description,
|
|
72
|
+
:tax_type => :tax_type,
|
|
70
73
|
:metadata => :metadata
|
|
71
74
|
}
|
|
72
75
|
end
|
|
@@ -90,6 +93,7 @@ module PAYJPv2
|
|
|
90
93
|
:active => :'Boolean',
|
|
91
94
|
:country => :'Country',
|
|
92
95
|
:description => :'String',
|
|
96
|
+
:tax_type => :'TaxType',
|
|
93
97
|
:metadata => :'Hash<String, MetadataValue>'
|
|
94
98
|
}
|
|
95
99
|
end
|
|
@@ -97,6 +101,7 @@ module PAYJPv2
|
|
|
97
101
|
# List of attributes with nullable: true
|
|
98
102
|
def self.openapi_nullable
|
|
99
103
|
Set.new([
|
|
104
|
+
:tax_type,
|
|
100
105
|
])
|
|
101
106
|
end
|
|
102
107
|
|
|
@@ -148,6 +153,10 @@ module PAYJPv2
|
|
|
148
153
|
self.description = attributes[:description]
|
|
149
154
|
end
|
|
150
155
|
|
|
156
|
+
if attributes.key?(:tax_type)
|
|
157
|
+
self.tax_type = attributes[:tax_type]
|
|
158
|
+
end
|
|
159
|
+
|
|
151
160
|
if attributes.key?(:metadata)
|
|
152
161
|
if (value = attributes[:metadata]).is_a?(Hash)
|
|
153
162
|
self.metadata = value
|
|
@@ -204,6 +213,7 @@ module PAYJPv2
|
|
|
204
213
|
active == o.active &&
|
|
205
214
|
country == o.country &&
|
|
206
215
|
description == o.description &&
|
|
216
|
+
tax_type == o.tax_type &&
|
|
207
217
|
metadata == o.metadata
|
|
208
218
|
end
|
|
209
219
|
|
|
@@ -216,7 +226,7 @@ module PAYJPv2
|
|
|
216
226
|
# Calculates hash code according to all attributes.
|
|
217
227
|
# @return [Integer] Hash code
|
|
218
228
|
def hash
|
|
219
|
-
[display_name, inclusive, percentage, active, country, description, metadata].hash
|
|
229
|
+
[display_name, inclusive, percentage, active, country, description, tax_type, metadata].hash
|
|
220
230
|
end
|
|
221
231
|
|
|
222
232
|
# Builds the object from hash
|
|
@@ -39,6 +39,8 @@ module PAYJPv2
|
|
|
39
39
|
|
|
40
40
|
attr_accessor :description
|
|
41
41
|
|
|
42
|
+
attr_accessor :tax_type
|
|
43
|
+
|
|
42
44
|
# 作成日時 (UTC, ISO 8601 形式)
|
|
43
45
|
attr_accessor :created_at
|
|
44
46
|
|
|
@@ -82,6 +84,7 @@ module PAYJPv2
|
|
|
82
84
|
:active => :active,
|
|
83
85
|
:country => :country,
|
|
84
86
|
:description => :description,
|
|
87
|
+
:tax_type => :tax_type,
|
|
85
88
|
:created_at => :created_at,
|
|
86
89
|
:updated_at => :updated_at,
|
|
87
90
|
:metadata => :metadata
|
|
@@ -110,6 +113,7 @@ module PAYJPv2
|
|
|
110
113
|
:active => :'Boolean',
|
|
111
114
|
:country => :'Country',
|
|
112
115
|
:description => :'String',
|
|
116
|
+
:tax_type => :'TaxType',
|
|
113
117
|
:created_at => :'Time',
|
|
114
118
|
:updated_at => :'Time',
|
|
115
119
|
:metadata => :'Hash<String, MetadataValue>'
|
|
@@ -121,6 +125,7 @@ module PAYJPv2
|
|
|
121
125
|
Set.new([
|
|
122
126
|
:country,
|
|
123
127
|
:description,
|
|
128
|
+
:tax_type,
|
|
124
129
|
])
|
|
125
130
|
end
|
|
126
131
|
|
|
@@ -194,6 +199,12 @@ module PAYJPv2
|
|
|
194
199
|
self.description = nil
|
|
195
200
|
end
|
|
196
201
|
|
|
202
|
+
if attributes.key?(:tax_type)
|
|
203
|
+
self.tax_type = attributes[:tax_type]
|
|
204
|
+
else
|
|
205
|
+
self.tax_type = nil
|
|
206
|
+
end
|
|
207
|
+
|
|
197
208
|
if attributes.key?(:created_at)
|
|
198
209
|
self.created_at = attributes[:created_at]
|
|
199
210
|
else
|
|
@@ -329,6 +340,7 @@ module PAYJPv2
|
|
|
329
340
|
active == o.active &&
|
|
330
341
|
country == o.country &&
|
|
331
342
|
description == o.description &&
|
|
343
|
+
tax_type == o.tax_type &&
|
|
332
344
|
created_at == o.created_at &&
|
|
333
345
|
updated_at == o.updated_at &&
|
|
334
346
|
metadata == o.metadata
|
|
@@ -343,7 +355,7 @@ module PAYJPv2
|
|
|
343
355
|
# Calculates hash code according to all attributes.
|
|
344
356
|
# @return [Integer] Hash code
|
|
345
357
|
def hash
|
|
346
|
-
[object, id, livemode, display_name, inclusive, percentage, active, country, description, created_at, updated_at, metadata].hash
|
|
358
|
+
[object, id, livemode, display_name, inclusive, percentage, active, country, description, tax_type, created_at, updated_at, metadata].hash
|
|
347
359
|
end
|
|
348
360
|
|
|
349
361
|
# Builds the object from hash
|
|
@@ -27,6 +27,8 @@ module PAYJPv2
|
|
|
27
27
|
# 表示名。顧客に表示されます。
|
|
28
28
|
attr_accessor :display_name
|
|
29
29
|
|
|
30
|
+
attr_accessor :tax_type
|
|
31
|
+
|
|
30
32
|
# キーバリューの任意のデータを格納できます。20件まで登録可能で、空文字列を指定するとそのキーを削除できます。<a href=\"https://docs.pay.jp/v2/guide/developers/metadata\">詳細はメタデータのドキュメントを参照してください。</a>
|
|
31
33
|
attr_accessor :metadata
|
|
32
34
|
|
|
@@ -59,6 +61,7 @@ module PAYJPv2
|
|
|
59
61
|
:country => :country,
|
|
60
62
|
:description => :description,
|
|
61
63
|
:display_name => :display_name,
|
|
64
|
+
:tax_type => :tax_type,
|
|
62
65
|
:metadata => :metadata
|
|
63
66
|
}
|
|
64
67
|
end
|
|
@@ -80,6 +83,7 @@ module PAYJPv2
|
|
|
80
83
|
:country => :'Country',
|
|
81
84
|
:description => :'String',
|
|
82
85
|
:display_name => :'String',
|
|
86
|
+
:tax_type => :'TaxType',
|
|
83
87
|
:metadata => :'Hash<String, MetadataValue>'
|
|
84
88
|
}
|
|
85
89
|
end
|
|
@@ -87,6 +91,7 @@ module PAYJPv2
|
|
|
87
91
|
# List of attributes with nullable: true
|
|
88
92
|
def self.openapi_nullable
|
|
89
93
|
Set.new([
|
|
94
|
+
:tax_type,
|
|
90
95
|
])
|
|
91
96
|
end
|
|
92
97
|
|
|
@@ -122,6 +127,10 @@ module PAYJPv2
|
|
|
122
127
|
self.display_name = attributes[:display_name]
|
|
123
128
|
end
|
|
124
129
|
|
|
130
|
+
if attributes.key?(:tax_type)
|
|
131
|
+
self.tax_type = attributes[:tax_type]
|
|
132
|
+
end
|
|
133
|
+
|
|
125
134
|
if attributes.key?(:metadata)
|
|
126
135
|
if (value = attributes[:metadata]).is_a?(Hash)
|
|
127
136
|
self.metadata = value
|
|
@@ -138,6 +147,7 @@ module PAYJPv2
|
|
|
138
147
|
country == o.country &&
|
|
139
148
|
description == o.description &&
|
|
140
149
|
display_name == o.display_name &&
|
|
150
|
+
tax_type == o.tax_type &&
|
|
141
151
|
metadata == o.metadata
|
|
142
152
|
end
|
|
143
153
|
|
|
@@ -150,7 +160,7 @@ module PAYJPv2
|
|
|
150
160
|
# Calculates hash code according to all attributes.
|
|
151
161
|
# @return [Integer] Hash code
|
|
152
162
|
def hash
|
|
153
|
-
[active, country, description, display_name, metadata].hash
|
|
163
|
+
[active, country, description, display_name, tax_type, metadata].hash
|
|
154
164
|
end
|
|
155
165
|
|
|
156
166
|
# Builds the object from hash
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PAY.JP API v2
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PAYJPv2
|
|
17
|
+
class TaxType
|
|
18
|
+
JCT = "jct".freeze
|
|
19
|
+
|
|
20
|
+
def self.all_vars
|
|
21
|
+
@all_vars ||= [JCT].freeze
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Builds the enum from string
|
|
25
|
+
# @param [String] The enum value in the form of the string
|
|
26
|
+
# @return [String] The enum value
|
|
27
|
+
def self.build_from_hash(value)
|
|
28
|
+
new.build_from_hash(value)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Builds the enum from string
|
|
32
|
+
# @param [String] The enum value in the form of the string
|
|
33
|
+
# @return [String] The enum value
|
|
34
|
+
def build_from_hash(value)
|
|
35
|
+
return value if TaxType.all_vars.include?(value)
|
|
36
|
+
raise "Invalid ENUM value #{value} for class #TaxType"
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
data/lib/payjpv2/version.rb
CHANGED
data/lib/payjpv2.rb
CHANGED
|
@@ -106,15 +106,19 @@ require 'payjpv2/models/payment_transaction_list_response'
|
|
|
106
106
|
require 'payjpv2/models/payment_transaction_response'
|
|
107
107
|
require 'payjpv2/models/payment_transaction_type'
|
|
108
108
|
require 'payjpv2/models/price_create_request'
|
|
109
|
+
require 'payjpv2/models/price_data_request'
|
|
109
110
|
require 'payjpv2/models/price_details_response'
|
|
110
111
|
require 'payjpv2/models/price_list_response'
|
|
111
112
|
require 'payjpv2/models/price_type'
|
|
112
113
|
require 'payjpv2/models/price_update_request'
|
|
113
114
|
require 'payjpv2/models/product_create_request'
|
|
115
|
+
require 'payjpv2/models/product_data_request'
|
|
114
116
|
require 'payjpv2/models/product_deleted_response'
|
|
115
117
|
require 'payjpv2/models/product_details_response'
|
|
116
118
|
require 'payjpv2/models/product_list_response'
|
|
117
119
|
require 'payjpv2/models/product_update_request'
|
|
120
|
+
require 'payjpv2/models/redirect_options_request'
|
|
121
|
+
require 'payjpv2/models/redirect_options_response'
|
|
118
122
|
require 'payjpv2/models/setup_flow_cancel_request'
|
|
119
123
|
require 'payjpv2/models/setup_flow_cancellation_reason'
|
|
120
124
|
require 'payjpv2/models/setup_flow_create_request'
|
|
@@ -135,6 +139,7 @@ require 'payjpv2/models/tax_rate_create_request'
|
|
|
135
139
|
require 'payjpv2/models/tax_rate_details_response'
|
|
136
140
|
require 'payjpv2/models/tax_rate_list_response'
|
|
137
141
|
require 'payjpv2/models/tax_rate_update_request'
|
|
142
|
+
require 'payjpv2/models/tax_type'
|
|
138
143
|
require 'payjpv2/models/term_list_response'
|
|
139
144
|
require 'payjpv2/models/term_response'
|
|
140
145
|
require 'payjpv2/models/usage'
|
|
@@ -65,6 +65,39 @@ describe 'CheckoutSessionsApi' do
|
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
+
# unit tests for expire_checkout_session
|
|
69
|
+
# Expire Checkout Session
|
|
70
|
+
# @param checkout_session_id
|
|
71
|
+
# @param [Hash] opts the optional parameters
|
|
72
|
+
# @return [CheckoutSessionDetailsResponse]
|
|
73
|
+
describe 'expire_checkout_session test' do
|
|
74
|
+
it 'should work' do
|
|
75
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
describe 'with mocked api_client' do
|
|
79
|
+
let(:mock_data) { double('data') }
|
|
80
|
+
let(:mock_status) { 200 }
|
|
81
|
+
let(:mock_headers) { { 'Content-Type' => 'application/json' } }
|
|
82
|
+
|
|
83
|
+
before do
|
|
84
|
+
@api_instance.api_client.config.client_side_validation = false
|
|
85
|
+
allow(@api_instance.api_client).to receive(:call_api)
|
|
86
|
+
.and_return([mock_data, mock_status, mock_headers])
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
it 'returns data only by default' do
|
|
90
|
+
result = @api_instance.expire_checkout_session(nil)
|
|
91
|
+
expect(result).to eq(mock_data)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
it 'returns [data, status, headers] with include_http_info: true' do
|
|
95
|
+
result = @api_instance.expire_checkout_session(nil, include_http_info: true)
|
|
96
|
+
expect(result).to eq([mock_data, mock_status, mock_headers])
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
68
101
|
# unit tests for get_all_checkout_session_line_items
|
|
69
102
|
# Get All Checkout Session Line Items
|
|
70
103
|
# @param checkout_session_id
|
|
@@ -81,6 +81,12 @@ describe PAYJPv2::CheckoutSessionCreateRequest do
|
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
+
describe 'test attribute "redirect_options"' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
84
90
|
describe 'test attribute "currency"' do
|
|
85
91
|
it 'should work' do
|
|
86
92
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -157,6 +157,12 @@ describe PAYJPv2::CheckoutSessionDetailsResponse do
|
|
|
157
157
|
end
|
|
158
158
|
end
|
|
159
159
|
|
|
160
|
+
describe 'test attribute "redirect_options"' do
|
|
161
|
+
it 'should work' do
|
|
162
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
|
|
160
166
|
describe 'test attribute "url"' do
|
|
161
167
|
it 'should work' do
|
|
162
168
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -33,6 +33,12 @@ describe PAYJPv2::LineItemRequest do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "price_data"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
describe 'test attribute "quantity"' do
|
|
37
43
|
it 'should work' do
|
|
38
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -81,6 +81,12 @@ describe PAYJPv2::PaymentFlowCreateRequest do
|
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
+
describe 'test attribute "redirect_options"' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
84
90
|
describe 'test attribute "description"' do
|
|
85
91
|
it 'should work' do
|
|
86
92
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -127,6 +127,12 @@ describe PAYJPv2::PaymentFlowResponse do
|
|
|
127
127
|
end
|
|
128
128
|
end
|
|
129
129
|
|
|
130
|
+
describe 'test attribute "redirect_options"' do
|
|
131
|
+
it 'should work' do
|
|
132
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
130
136
|
describe 'test attribute "capture_method"' do
|
|
131
137
|
it 'should work' do
|
|
132
138
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -63,6 +63,12 @@ describe PAYJPv2::PaymentFlowUpdateRequest do
|
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
+
describe 'test attribute "redirect_options"' do
|
|
67
|
+
it 'should work' do
|
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
66
72
|
describe 'test attribute "description"' do
|
|
67
73
|
it 'should work' do
|
|
68
74
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PAY.JP API v2
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for PAYJPv2::PriceDataRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe PAYJPv2::PriceDataRequest do
|
|
21
|
+
let(:instance) { PAYJPv2::PriceDataRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of PriceDataRequest' do
|
|
24
|
+
it 'should create an instance of PriceDataRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(PAYJPv2::PriceDataRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "currency"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "unit_amount"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "product_id"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "product_data"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PAY.JP API v2
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for PAYJPv2::ProductDataRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe PAYJPv2::ProductDataRequest do
|
|
21
|
+
let(:instance) { PAYJPv2::ProductDataRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ProductDataRequest' do
|
|
24
|
+
it 'should create an instance of ProductDataRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(PAYJPv2::ProductDataRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "name"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "description"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|