payjpv2 1.1.0 → 1.3.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 +13 -2
- data/docs/BankAccountStatus.md +15 -0
- data/docs/BankInfoResponse.md +2 -2
- data/docs/CardBrand.md +15 -0
- data/docs/CardFunding.md +15 -0
- data/docs/CheckoutSessionCreateRequest.md +3 -1
- data/docs/CheckoutSessionDetailsResponse.md +2 -0
- data/docs/CheckoutSessionPaymentMethodOptionsCardRequest.md +2 -2
- data/docs/CheckoutSessionsApi.md +70 -0
- data/docs/DisplayPreferenceRequest.md +1 -1
- data/docs/PaymentFlowCancelRequest.md +1 -1
- data/docs/PaymentFlowCreateRequest.md +2 -0
- data/docs/PaymentFlowPaymentMethodOptionsCardRequest.md +2 -2
- data/docs/PaymentFlowResponse.md +2 -0
- data/docs/PaymentFlowUpdateRequest.md +2 -0
- data/docs/PaymentMethodCardDetailsResponse.md +4 -2
- data/docs/PaymentMethodConfigurationDisplayPreference.md +2 -2
- data/docs/PaymentMethodConfigurationPreference.md +15 -0
- data/docs/PaymentMethodConfigurationValue.md +15 -0
- data/docs/PaymentTransactionsApi.md +4 -4
- data/docs/ProductCreateRequest.md +1 -1
- data/docs/RedirectOptionsRequest.md +18 -0
- data/docs/RedirectOptionsResponse.md +18 -0
- data/docs/RequestExtendedAuthorization.md +15 -0
- data/docs/RequestThreeDSecure.md +15 -0
- data/docs/SetupFlowCancelRequest.md +1 -1
- data/docs/SetupFlowCreateRequest.md +2 -0
- data/docs/SetupFlowPaymentMethodOptionsCardRequest.md +1 -1
- 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/api/payment_transactions_api.rb +2 -2
- data/lib/payjpv2/models/balance_state.rb +4 -3
- data/lib/payjpv2/models/bank_account_status.rb +42 -0
- data/lib/payjpv2/models/bank_info_response.rb +24 -2
- data/lib/payjpv2/models/capture_method.rb +4 -3
- data/lib/payjpv2/models/card_brand.rb +45 -0
- data/lib/payjpv2/models/card_funding.rb +41 -0
- data/lib/payjpv2/models/checkout_session_create_request.rb +12 -2
- data/lib/payjpv2/models/checkout_session_details_response.rb +23 -1
- data/lib/payjpv2/models/checkout_session_mode.rb +4 -3
- data/lib/payjpv2/models/checkout_session_payment_method_options_card_request.rb +2 -22
- data/lib/payjpv2/models/checkout_session_status.rb +4 -3
- data/lib/payjpv2/models/checkout_session_submit_type.rb +4 -3
- data/lib/payjpv2/models/checkout_session_ui_mode.rb +4 -3
- data/lib/payjpv2/models/country.rb +4 -3
- data/lib/payjpv2/models/currency.rb +4 -3
- data/lib/payjpv2/models/customer_creation.rb +4 -3
- data/lib/payjpv2/models/display_preference_request.rb +6 -6
- data/lib/payjpv2/models/line_item_request.rb +14 -0
- data/lib/payjpv2/models/locale.rb +4 -3
- data/lib/payjpv2/models/payment_dispute_reason.rb +4 -3
- data/lib/payjpv2/models/payment_dispute_status.rb +4 -3
- data/lib/payjpv2/models/payment_flow_cancel_request.rb +1 -11
- data/lib/payjpv2/models/payment_flow_cancellation_reason.rb +4 -3
- data/lib/payjpv2/models/payment_flow_create_request.rb +11 -1
- data/lib/payjpv2/models/payment_flow_payment_method_options_card_request.rb +2 -22
- data/lib/payjpv2/models/payment_flow_response.rb +23 -1
- data/lib/payjpv2/models/payment_flow_status.rb +4 -3
- data/lib/payjpv2/models/payment_flow_update_request.rb +11 -1
- data/lib/payjpv2/models/payment_method_card_details_response.rb +40 -7
- data/lib/payjpv2/models/payment_method_configuration_display_preference.rb +2 -22
- data/lib/payjpv2/models/payment_method_configuration_preference.rb +42 -0
- data/lib/payjpv2/models/payment_method_configuration_value.rb +41 -0
- data/lib/payjpv2/models/payment_method_types.rb +4 -3
- data/lib/payjpv2/models/payment_refund_reason.rb +4 -3
- data/lib/payjpv2/models/payment_refund_status.rb +4 -3
- data/lib/payjpv2/models/payment_transaction_type.rb +4 -3
- data/lib/payjpv2/models/price_type.rb +4 -3
- data/lib/payjpv2/models/product_create_request.rb +15 -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/request_extended_authorization.rb +42 -0
- data/lib/payjpv2/models/request_three_d_secure.rb +41 -0
- data/lib/payjpv2/models/setup_flow_cancel_request.rb +1 -1
- data/lib/payjpv2/models/setup_flow_cancellation_reason.rb +6 -4
- data/lib/payjpv2/models/setup_flow_create_request.rb +11 -1
- data/lib/payjpv2/models/setup_flow_payment_method_options_card_request.rb +1 -11
- data/lib/payjpv2/models/setup_flow_response.rb +23 -1
- data/lib/payjpv2/models/setup_flow_status.rb +4 -3
- data/lib/payjpv2/models/setup_flow_update_request.rb +11 -1
- data/lib/payjpv2/models/statement_subject.rb +4 -3
- data/lib/payjpv2/models/statement_type.rb +4 -3
- 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 +40 -0
- data/lib/payjpv2/models/usage.rb +4 -3
- data/lib/payjpv2/version.rb +1 -1
- data/lib/payjpv2.rb +10 -0
- data/spec/api/checkout_sessions_api_spec.rb +33 -0
- data/spec/api/payment_transactions_api_spec.rb +2 -2
- data/spec/integration/anyof_deserialization_spec.rb +8 -1
- data/spec/models/bank_account_status_spec.rb +30 -0
- data/spec/models/card_brand_spec.rb +30 -0
- data/spec/models/card_funding_spec.rb +30 -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/checkout_session_payment_method_options_card_request_spec.rb +0 -8
- data/spec/models/display_preference_request_spec.rb +0 -4
- data/spec/models/payment_flow_cancel_request_spec.rb +0 -4
- data/spec/models/payment_flow_create_request_spec.rb +6 -0
- data/spec/models/payment_flow_payment_method_options_card_request_spec.rb +0 -8
- data/spec/models/payment_flow_response_spec.rb +6 -0
- data/spec/models/payment_flow_update_request_spec.rb +6 -0
- data/spec/models/payment_method_card_details_response_spec.rb +6 -0
- data/spec/models/payment_method_configuration_display_preference_spec.rb +0 -8
- data/spec/models/payment_method_configuration_preference_spec.rb +30 -0
- data/spec/models/payment_method_configuration_value_spec.rb +30 -0
- data/spec/models/redirect_options_request_spec.rb +36 -0
- data/spec/models/redirect_options_response_spec.rb +36 -0
- data/spec/models/request_extended_authorization_spec.rb +30 -0
- data/spec/models/request_three_d_secure_spec.rb +30 -0
- data/spec/models/setup_flow_create_request_spec.rb +6 -0
- data/spec/models/setup_flow_payment_method_options_card_request_spec.rb +0 -4
- 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 +41 -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
|
|
@@ -60,7 +60,7 @@ module PAYJPv2
|
|
|
60
60
|
# Attribute type mapping.
|
|
61
61
|
def self.openapi_types
|
|
62
62
|
{
|
|
63
|
-
:request_three_d_secure => :'
|
|
63
|
+
:request_three_d_secure => :'RequestThreeDSecure'
|
|
64
64
|
}
|
|
65
65
|
end
|
|
66
66
|
|
|
@@ -91,16 +91,6 @@ module PAYJPv2
|
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
95
|
-
# @param [Object] request_three_d_secure Object to be assigned
|
|
96
|
-
def request_three_d_secure=(request_three_d_secure)
|
|
97
|
-
validator = EnumAttributeValidator.new('String', ["automatic", "any"])
|
|
98
|
-
unless validator.valid?(request_three_d_secure)
|
|
99
|
-
raise ArgumentError, "invalid value for \"request_three_d_secure\", must be one of #{validator.allowable_values}."
|
|
100
|
-
end
|
|
101
|
-
@request_three_d_secure = request_three_d_secure
|
|
102
|
-
end
|
|
103
|
-
|
|
104
94
|
# Checks equality by comparing each attribute.
|
|
105
95
|
# @param [Object] Object to be compared
|
|
106
96
|
def ==(o)
|
|
@@ -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
|
|
@@ -30,15 +30,16 @@ module PAYJPv2
|
|
|
30
30
|
# @param [String] The enum value in the form of the string
|
|
31
31
|
# @return [String] The enum value
|
|
32
32
|
def self.build_from_hash(value)
|
|
33
|
-
|
|
33
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
34
|
+
value
|
|
34
35
|
end
|
|
35
36
|
|
|
36
37
|
# Builds the enum from string
|
|
37
38
|
# @param [String] The enum value in the form of the string
|
|
38
39
|
# @return [String] The enum value
|
|
39
40
|
def build_from_hash(value)
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
42
|
+
value
|
|
42
43
|
end
|
|
43
44
|
end
|
|
44
45
|
end
|
|
@@ -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
|
|
@@ -41,15 +41,16 @@ module PAYJPv2
|
|
|
41
41
|
# @param [String] The enum value in the form of the string
|
|
42
42
|
# @return [String] The enum value
|
|
43
43
|
def self.build_from_hash(value)
|
|
44
|
-
|
|
44
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
45
|
+
value
|
|
45
46
|
end
|
|
46
47
|
|
|
47
48
|
# Builds the enum from string
|
|
48
49
|
# @param [String] The enum value in the form of the string
|
|
49
50
|
# @return [String] The enum value
|
|
50
51
|
def build_from_hash(value)
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
53
|
+
value
|
|
53
54
|
end
|
|
54
55
|
end
|
|
55
56
|
end
|
|
@@ -29,15 +29,16 @@ module PAYJPv2
|
|
|
29
29
|
# @param [String] The enum value in the form of the string
|
|
30
30
|
# @return [String] The enum value
|
|
31
31
|
def self.build_from_hash(value)
|
|
32
|
-
|
|
32
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
33
|
+
value
|
|
33
34
|
end
|
|
34
35
|
|
|
35
36
|
# Builds the enum from string
|
|
36
37
|
# @param [String] The enum value in the form of the string
|
|
37
38
|
# @return [String] The enum value
|
|
38
39
|
def build_from_hash(value)
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
41
|
+
value
|
|
41
42
|
end
|
|
42
43
|
end
|
|
43
44
|
end
|
|
@@ -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,40 @@
|
|
|
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
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
29
|
+
value
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Builds the enum from string
|
|
33
|
+
# @param [String] The enum value in the form of the string
|
|
34
|
+
# @return [String] The enum value
|
|
35
|
+
def build_from_hash(value)
|
|
36
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
37
|
+
value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
data/lib/payjpv2/models/usage.rb
CHANGED
|
@@ -26,15 +26,16 @@ module PAYJPv2
|
|
|
26
26
|
# @param [String] The enum value in the form of the string
|
|
27
27
|
# @return [String] The enum value
|
|
28
28
|
def self.build_from_hash(value)
|
|
29
|
-
|
|
29
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
30
|
+
value
|
|
30
31
|
end
|
|
31
32
|
|
|
32
33
|
# Builds the enum from string
|
|
33
34
|
# @param [String] The enum value in the form of the string
|
|
34
35
|
# @return [String] The enum value
|
|
35
36
|
def build_from_hash(value)
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
38
|
+
value
|
|
38
39
|
end
|
|
39
40
|
end
|
|
40
41
|
end
|
data/lib/payjpv2/version.rb
CHANGED
data/lib/payjpv2.rb
CHANGED
|
@@ -22,9 +22,12 @@ require 'payjpv2/models/balance_list_response'
|
|
|
22
22
|
require 'payjpv2/models/balance_response'
|
|
23
23
|
require 'payjpv2/models/balance_state'
|
|
24
24
|
require 'payjpv2/models/balance_url_response'
|
|
25
|
+
require 'payjpv2/models/bank_account_status'
|
|
25
26
|
require 'payjpv2/models/bank_info_response'
|
|
26
27
|
require 'payjpv2/models/capture_method'
|
|
28
|
+
require 'payjpv2/models/card_brand'
|
|
27
29
|
require 'payjpv2/models/card_config_request'
|
|
30
|
+
require 'payjpv2/models/card_funding'
|
|
28
31
|
require 'payjpv2/models/checkout_session_create_request'
|
|
29
32
|
require 'payjpv2/models/checkout_session_customer_details_address_response'
|
|
30
33
|
require 'payjpv2/models/checkout_session_customer_details_response'
|
|
@@ -85,8 +88,10 @@ require 'payjpv2/models/payment_method_card_update_request'
|
|
|
85
88
|
require 'payjpv2/models/payment_method_configuration_details_response'
|
|
86
89
|
require 'payjpv2/models/payment_method_configuration_display_preference'
|
|
87
90
|
require 'payjpv2/models/payment_method_configuration_list_response'
|
|
91
|
+
require 'payjpv2/models/payment_method_configuration_preference'
|
|
88
92
|
require 'payjpv2/models/payment_method_configuration_setting_response'
|
|
89
93
|
require 'payjpv2/models/payment_method_configuration_update_request'
|
|
94
|
+
require 'payjpv2/models/payment_method_configuration_value'
|
|
90
95
|
require 'payjpv2/models/payment_method_create_card_details_request'
|
|
91
96
|
require 'payjpv2/models/payment_method_create_request'
|
|
92
97
|
require 'payjpv2/models/payment_method_list_response'
|
|
@@ -117,6 +122,10 @@ require 'payjpv2/models/product_deleted_response'
|
|
|
117
122
|
require 'payjpv2/models/product_details_response'
|
|
118
123
|
require 'payjpv2/models/product_list_response'
|
|
119
124
|
require 'payjpv2/models/product_update_request'
|
|
125
|
+
require 'payjpv2/models/redirect_options_request'
|
|
126
|
+
require 'payjpv2/models/redirect_options_response'
|
|
127
|
+
require 'payjpv2/models/request_extended_authorization'
|
|
128
|
+
require 'payjpv2/models/request_three_d_secure'
|
|
120
129
|
require 'payjpv2/models/setup_flow_cancel_request'
|
|
121
130
|
require 'payjpv2/models/setup_flow_cancellation_reason'
|
|
122
131
|
require 'payjpv2/models/setup_flow_create_request'
|
|
@@ -137,6 +146,7 @@ require 'payjpv2/models/tax_rate_create_request'
|
|
|
137
146
|
require 'payjpv2/models/tax_rate_details_response'
|
|
138
147
|
require 'payjpv2/models/tax_rate_list_response'
|
|
139
148
|
require 'payjpv2/models/tax_rate_update_request'
|
|
149
|
+
require 'payjpv2/models/tax_type'
|
|
140
150
|
require 'payjpv2/models/term_list_response'
|
|
141
151
|
require 'payjpv2/models/term_response'
|
|
142
152
|
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
|
|
@@ -39,8 +39,8 @@ describe 'PaymentTransactionsApi' do
|
|
|
39
39
|
# @option opts [String] :starting_after このIDより後のデータを取得
|
|
40
40
|
# @option opts [String] :ending_before このIDより前のデータを取得
|
|
41
41
|
# @option opts [String] :term_id 集計区間 ID
|
|
42
|
-
# @option opts [
|
|
43
|
-
# @option opts [
|
|
42
|
+
# @option opts [PaymentTransactionType] :type 取引タイプ
|
|
43
|
+
# @option opts [PaymentMethodTypes] :payment_method_type 支払い方法タイプ
|
|
44
44
|
# @return [PaymentTransactionListResponse]
|
|
45
45
|
describe 'get_all_payment_transactions test' do
|
|
46
46
|
it 'should work' do
|
|
@@ -47,7 +47,7 @@ describe 'anyOf module deserialization via ApiClient#convert_to_type' do
|
|
|
47
47
|
},
|
|
48
48
|
'card' => {
|
|
49
49
|
'last4' => '4242',
|
|
50
|
-
'brand' => '
|
|
50
|
+
'brand' => 'Visa',
|
|
51
51
|
'exp_month' => 12,
|
|
52
52
|
'exp_year' => 2030,
|
|
53
53
|
'fingerprint' => 'fp_test',
|
|
@@ -104,4 +104,11 @@ describe 'anyOf module deserialization via ApiClient#convert_to_type' do
|
|
|
104
104
|
expect(result.id).to eq('pm_test_paypay')
|
|
105
105
|
expect(result.type).to eq('paypay')
|
|
106
106
|
end
|
|
107
|
+
|
|
108
|
+
it 'API 側で enum に追加された未知の値もそのまま読めること' do
|
|
109
|
+
payload = card_payload.merge('card' => card_payload['card'].merge('brand' => 'UnionPay', 'funding' => 'credit'))
|
|
110
|
+
result = api_client.send(:convert_to_type, payload, 'PaymentMethodResponse')
|
|
111
|
+
expect(result.card.brand).to eq('UnionPay')
|
|
112
|
+
expect(result.card.funding).to eq('credit')
|
|
113
|
+
end
|
|
107
114
|
end
|
|
@@ -0,0 +1,30 @@
|
|
|
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::BankAccountStatus
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe PAYJPv2::BankAccountStatus do
|
|
21
|
+
let(:instance) { PAYJPv2::BankAccountStatus.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of BankAccountStatus' do
|
|
24
|
+
it 'should create an instance of BankAccountStatus' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(PAYJPv2::BankAccountStatus)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|