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
|
@@ -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
|
|
@@ -60,7 +60,7 @@ module PAYJPv2
|
|
|
60
60
|
# Attribute type mapping.
|
|
61
61
|
def self.openapi_types
|
|
62
62
|
{
|
|
63
|
-
:preference => :'
|
|
63
|
+
:preference => :'PaymentMethodConfigurationPreference'
|
|
64
64
|
}
|
|
65
65
|
end
|
|
66
66
|
|
|
@@ -93,13 +93,13 @@ module PAYJPv2
|
|
|
93
93
|
end
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
-
# Custom attribute writer method
|
|
97
|
-
# @param [Object] preference
|
|
96
|
+
# Custom attribute writer method with validation
|
|
97
|
+
# @param [Object] preference Value to be assigned
|
|
98
98
|
def preference=(preference)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
raise ArgumentError, "invalid value for \"preference\", must be one of #{validator.allowable_values}."
|
|
99
|
+
if preference.nil?
|
|
100
|
+
raise ArgumentError, 'preference cannot be nil'
|
|
102
101
|
end
|
|
102
|
+
|
|
103
103
|
@preference = preference
|
|
104
104
|
end
|
|
105
105
|
|
|
@@ -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)
|
|
@@ -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
|
|
@@ -39,15 +39,16 @@ module PAYJPv2
|
|
|
39
39
|
# @param [String] The enum value in the form of the string
|
|
40
40
|
# @return [String] The enum value
|
|
41
41
|
def self.build_from_hash(value)
|
|
42
|
-
|
|
42
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
43
|
+
value
|
|
43
44
|
end
|
|
44
45
|
|
|
45
46
|
# Builds the enum from string
|
|
46
47
|
# @param [String] The enum value in the form of the string
|
|
47
48
|
# @return [String] The enum value
|
|
48
49
|
def build_from_hash(value)
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
51
|
+
value
|
|
51
52
|
end
|
|
52
53
|
end
|
|
53
54
|
end
|
|
@@ -32,15 +32,16 @@ module PAYJPv2
|
|
|
32
32
|
# @param [String] The enum value in the form of the string
|
|
33
33
|
# @return [String] The enum value
|
|
34
34
|
def self.build_from_hash(value)
|
|
35
|
-
|
|
35
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
36
|
+
value
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
# Builds the enum from string
|
|
39
40
|
# @param [String] The enum value in the form of the string
|
|
40
41
|
# @return [String] The enum value
|
|
41
42
|
def build_from_hash(value)
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
44
|
+
value
|
|
44
45
|
end
|
|
45
46
|
end
|
|
46
47
|
end
|
|
@@ -60,7 +60,7 @@ module PAYJPv2
|
|
|
60
60
|
# Attribute type mapping.
|
|
61
61
|
def self.openapi_types
|
|
62
62
|
{
|
|
63
|
-
:cancellation_reason => :'
|
|
63
|
+
:cancellation_reason => :'PaymentFlowCancellationReason'
|
|
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] cancellation_reason Object to be assigned
|
|
96
|
-
def cancellation_reason=(cancellation_reason)
|
|
97
|
-
validator = EnumAttributeValidator.new('String', ["duplicate", "fraudulent", "requested_by_customer", "abandoned"])
|
|
98
|
-
unless validator.valid?(cancellation_reason)
|
|
99
|
-
raise ArgumentError, "invalid value for \"cancellation_reason\", must be one of #{validator.allowable_values}."
|
|
100
|
-
end
|
|
101
|
-
@cancellation_reason = cancellation_reason
|
|
102
|
-
end
|
|
103
|
-
|
|
104
94
|
# Checks equality by comparing each attribute.
|
|
105
95
|
# @param [Object] Object to be compared
|
|
106
96
|
def ==(o)
|
|
@@ -32,15 +32,16 @@ module PAYJPv2
|
|
|
32
32
|
# @param [String] The enum value in the form of the string
|
|
33
33
|
# @return [String] The enum value
|
|
34
34
|
def self.build_from_hash(value)
|
|
35
|
-
|
|
35
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
36
|
+
value
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
# Builds the enum from string
|
|
39
40
|
# @param [String] The enum value in the form of the string
|
|
40
41
|
# @return [String] The enum value
|
|
41
42
|
def build_from_hash(value)
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
44
|
+
value
|
|
44
45
|
end
|
|
45
46
|
end
|
|
46
47
|
end
|
|
@@ -42,6 +42,9 @@ module PAYJPv2
|
|
|
42
42
|
# 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。confirm=true の場合のみ指定できます。
|
|
43
43
|
attr_accessor :return_url
|
|
44
44
|
|
|
45
|
+
# return_url へリダイレクトする際のオプション
|
|
46
|
+
attr_accessor :redirect_options
|
|
47
|
+
|
|
45
48
|
# オブジェクトにセットする任意の文字列。
|
|
46
49
|
attr_accessor :description
|
|
47
50
|
|
|
@@ -82,6 +85,7 @@ module PAYJPv2
|
|
|
82
85
|
:capture_method => :capture_method,
|
|
83
86
|
:confirm => :confirm,
|
|
84
87
|
:return_url => :return_url,
|
|
88
|
+
:redirect_options => :redirect_options,
|
|
85
89
|
:description => :description,
|
|
86
90
|
:metadata => :metadata
|
|
87
91
|
}
|
|
@@ -109,6 +113,7 @@ module PAYJPv2
|
|
|
109
113
|
:capture_method => :'CaptureMethod',
|
|
110
114
|
:confirm => :'Boolean',
|
|
111
115
|
:return_url => :'String',
|
|
116
|
+
:redirect_options => :'RedirectOptionsRequest',
|
|
112
117
|
:description => :'String',
|
|
113
118
|
:metadata => :'Hash<String, MetadataValue>'
|
|
114
119
|
}
|
|
@@ -180,6 +185,10 @@ module PAYJPv2
|
|
|
180
185
|
self.return_url = attributes[:return_url]
|
|
181
186
|
end
|
|
182
187
|
|
|
188
|
+
if attributes.key?(:redirect_options)
|
|
189
|
+
self.redirect_options = attributes[:redirect_options]
|
|
190
|
+
end
|
|
191
|
+
|
|
183
192
|
if attributes.key?(:description)
|
|
184
193
|
self.description = attributes[:description]
|
|
185
194
|
end
|
|
@@ -233,6 +242,7 @@ module PAYJPv2
|
|
|
233
242
|
capture_method == o.capture_method &&
|
|
234
243
|
confirm == o.confirm &&
|
|
235
244
|
return_url == o.return_url &&
|
|
245
|
+
redirect_options == o.redirect_options &&
|
|
236
246
|
description == o.description &&
|
|
237
247
|
metadata == o.metadata
|
|
238
248
|
end
|
|
@@ -246,7 +256,7 @@ module PAYJPv2
|
|
|
246
256
|
# Calculates hash code according to all attributes.
|
|
247
257
|
# @return [Integer] Hash code
|
|
248
258
|
def hash
|
|
249
|
-
[amount, customer_id, payment_method_id, payment_method_options, payment_method_types, currency, capture_method, confirm, return_url, description, metadata].hash
|
|
259
|
+
[amount, customer_id, payment_method_id, payment_method_options, payment_method_types, currency, capture_method, confirm, return_url, redirect_options, description, metadata].hash
|
|
250
260
|
end
|
|
251
261
|
|
|
252
262
|
# Builds the object from hash
|
|
@@ -64,8 +64,8 @@ module PAYJPv2
|
|
|
64
64
|
# Attribute type mapping.
|
|
65
65
|
def self.openapi_types
|
|
66
66
|
{
|
|
67
|
-
:request_extended_authorization => :'
|
|
68
|
-
:request_three_d_secure => :'
|
|
67
|
+
:request_extended_authorization => :'RequestExtendedAuthorization',
|
|
68
|
+
:request_three_d_secure => :'RequestThreeDSecure'
|
|
69
69
|
}
|
|
70
70
|
end
|
|
71
71
|
|
|
@@ -100,26 +100,6 @@ module PAYJPv2
|
|
|
100
100
|
end
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
104
|
-
# @param [Object] request_extended_authorization Object to be assigned
|
|
105
|
-
def request_extended_authorization=(request_extended_authorization)
|
|
106
|
-
validator = EnumAttributeValidator.new('String', ["if_available", "must_extend", "never"])
|
|
107
|
-
unless validator.valid?(request_extended_authorization)
|
|
108
|
-
raise ArgumentError, "invalid value for \"request_extended_authorization\", must be one of #{validator.allowable_values}."
|
|
109
|
-
end
|
|
110
|
-
@request_extended_authorization = request_extended_authorization
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
114
|
-
# @param [Object] request_three_d_secure Object to be assigned
|
|
115
|
-
def request_three_d_secure=(request_three_d_secure)
|
|
116
|
-
validator = EnumAttributeValidator.new('String', ["any", "automatic"])
|
|
117
|
-
unless validator.valid?(request_three_d_secure)
|
|
118
|
-
raise ArgumentError, "invalid value for \"request_three_d_secure\", must be one of #{validator.allowable_values}."
|
|
119
|
-
end
|
|
120
|
-
@request_three_d_secure = request_three_d_secure
|
|
121
|
-
end
|
|
122
|
-
|
|
123
103
|
# Checks equality by comparing each attribute.
|
|
124
104
|
# @param [Object] Object to be compared
|
|
125
105
|
def ==(o)
|
|
@@ -54,6 +54,9 @@ module PAYJPv2
|
|
|
54
54
|
|
|
55
55
|
attr_accessor :return_url
|
|
56
56
|
|
|
57
|
+
# return_url へリダイレクトする際のオプション
|
|
58
|
+
attr_accessor :redirect_options
|
|
59
|
+
|
|
57
60
|
# 支払いの確定方法 | 値 | |:---| | **automatic**: (デフォルト) 顧客が支払いを承認すると、自動的に確定させます。 | | **manual**: 顧客が支払いを承認すると一旦確定を保留し、後で Capture API を使用して確定します。(すべての支払い方法がこれをサポートしているわけではありません)。 |
|
|
58
61
|
attr_accessor :capture_method
|
|
59
62
|
|
|
@@ -115,6 +118,7 @@ module PAYJPv2
|
|
|
115
118
|
:status => :status,
|
|
116
119
|
:next_action => :next_action,
|
|
117
120
|
:return_url => :return_url,
|
|
121
|
+
:redirect_options => :redirect_options,
|
|
118
122
|
:capture_method => :capture_method,
|
|
119
123
|
:last_payment_error => :last_payment_error,
|
|
120
124
|
:cancellation_reason => :cancellation_reason,
|
|
@@ -155,6 +159,7 @@ module PAYJPv2
|
|
|
155
159
|
:status => :'PaymentFlowStatus',
|
|
156
160
|
:next_action => :'Hash<String, Object>',
|
|
157
161
|
:return_url => :'String',
|
|
162
|
+
:redirect_options => :'RedirectOptionsResponse',
|
|
158
163
|
:capture_method => :'CaptureMethod',
|
|
159
164
|
:last_payment_error => :'Hash<String, Object>',
|
|
160
165
|
:cancellation_reason => :'PaymentFlowCancellationReason',
|
|
@@ -302,6 +307,12 @@ module PAYJPv2
|
|
|
302
307
|
self.return_url = nil
|
|
303
308
|
end
|
|
304
309
|
|
|
310
|
+
if attributes.key?(:redirect_options)
|
|
311
|
+
self.redirect_options = attributes[:redirect_options]
|
|
312
|
+
else
|
|
313
|
+
self.redirect_options = nil
|
|
314
|
+
end
|
|
315
|
+
|
|
305
316
|
if attributes.key?(:capture_method)
|
|
306
317
|
self.capture_method = attributes[:capture_method]
|
|
307
318
|
else
|
|
@@ -433,6 +444,16 @@ module PAYJPv2
|
|
|
433
444
|
@status = status
|
|
434
445
|
end
|
|
435
446
|
|
|
447
|
+
# Custom attribute writer method with validation
|
|
448
|
+
# @param [Object] redirect_options Value to be assigned
|
|
449
|
+
def redirect_options=(redirect_options)
|
|
450
|
+
if redirect_options.nil?
|
|
451
|
+
raise ArgumentError, 'redirect_options cannot be nil'
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
@redirect_options = redirect_options
|
|
455
|
+
end
|
|
456
|
+
|
|
436
457
|
# Custom attribute writer method with validation
|
|
437
458
|
# @param [Object] capture_method Value to be assigned
|
|
438
459
|
def capture_method=(capture_method)
|
|
@@ -494,6 +515,7 @@ module PAYJPv2
|
|
|
494
515
|
status == o.status &&
|
|
495
516
|
next_action == o.next_action &&
|
|
496
517
|
return_url == o.return_url &&
|
|
518
|
+
redirect_options == o.redirect_options &&
|
|
497
519
|
capture_method == o.capture_method &&
|
|
498
520
|
last_payment_error == o.last_payment_error &&
|
|
499
521
|
cancellation_reason == o.cancellation_reason &&
|
|
@@ -513,7 +535,7 @@ module PAYJPv2
|
|
|
513
535
|
# Calculates hash code according to all attributes.
|
|
514
536
|
# @return [Integer] Hash code
|
|
515
537
|
def hash
|
|
516
|
-
[object, id, livemode, amount, currency, amount_capturable, amount_received, client_secret, customer_id, description, payment_method_id, payment_method_options, payment_method_types, status, next_action, return_url, capture_method, last_payment_error, cancellation_reason, canceled_at, expired_at, metadata, created_at, updated_at].hash
|
|
538
|
+
[object, id, livemode, amount, currency, amount_capturable, amount_received, client_secret, customer_id, description, payment_method_id, payment_method_options, payment_method_types, status, next_action, return_url, redirect_options, capture_method, last_payment_error, cancellation_reason, canceled_at, expired_at, metadata, created_at, updated_at].hash
|
|
517
539
|
end
|
|
518
540
|
|
|
519
541
|
# Builds the object from hash
|
|
@@ -31,15 +31,16 @@ module PAYJPv2
|
|
|
31
31
|
# @param [String] The enum value in the form of the string
|
|
32
32
|
# @return [String] The enum value
|
|
33
33
|
def self.build_from_hash(value)
|
|
34
|
-
|
|
34
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
35
|
+
value
|
|
35
36
|
end
|
|
36
37
|
|
|
37
38
|
# Builds the enum from string
|
|
38
39
|
# @param [String] The enum value in the form of the string
|
|
39
40
|
# @return [String] The enum value
|
|
40
41
|
def build_from_hash(value)
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
43
|
+
value
|
|
43
44
|
end
|
|
44
45
|
end
|
|
45
46
|
end
|
|
@@ -33,6 +33,9 @@ module PAYJPv2
|
|
|
33
33
|
# 顧客が支払いを完了後かキャンセルした後にリダイレクトされる URL。アプリにリダイレクトしたい場合は URI Scheme を指定できます。
|
|
34
34
|
attr_accessor :return_url
|
|
35
35
|
|
|
36
|
+
# return_url へリダイレクトする際のオプション
|
|
37
|
+
attr_accessor :redirect_options
|
|
38
|
+
|
|
36
39
|
# オブジェクトにセットする任意の文字列。
|
|
37
40
|
attr_accessor :description
|
|
38
41
|
|
|
@@ -48,6 +51,7 @@ module PAYJPv2
|
|
|
48
51
|
:payment_method_options => :payment_method_options,
|
|
49
52
|
:payment_method_types => :payment_method_types,
|
|
50
53
|
:return_url => :return_url,
|
|
54
|
+
:redirect_options => :redirect_options,
|
|
51
55
|
:description => :description,
|
|
52
56
|
:metadata => :metadata
|
|
53
57
|
}
|
|
@@ -72,6 +76,7 @@ module PAYJPv2
|
|
|
72
76
|
:payment_method_options => :'PaymentFlowPaymentMethodOptionsRequest',
|
|
73
77
|
:payment_method_types => :'Array<PaymentMethodTypes>',
|
|
74
78
|
:return_url => :'String',
|
|
79
|
+
:redirect_options => :'RedirectOptionsRequest',
|
|
75
80
|
:description => :'String',
|
|
76
81
|
:metadata => :'Hash<String, MetadataValue>'
|
|
77
82
|
}
|
|
@@ -125,6 +130,10 @@ module PAYJPv2
|
|
|
125
130
|
self.return_url = attributes[:return_url]
|
|
126
131
|
end
|
|
127
132
|
|
|
133
|
+
if attributes.key?(:redirect_options)
|
|
134
|
+
self.redirect_options = attributes[:redirect_options]
|
|
135
|
+
end
|
|
136
|
+
|
|
128
137
|
if attributes.key?(:description)
|
|
129
138
|
self.description = attributes[:description]
|
|
130
139
|
end
|
|
@@ -165,6 +174,7 @@ module PAYJPv2
|
|
|
165
174
|
payment_method_options == o.payment_method_options &&
|
|
166
175
|
payment_method_types == o.payment_method_types &&
|
|
167
176
|
return_url == o.return_url &&
|
|
177
|
+
redirect_options == o.redirect_options &&
|
|
168
178
|
description == o.description &&
|
|
169
179
|
metadata == o.metadata
|
|
170
180
|
end
|
|
@@ -178,7 +188,7 @@ module PAYJPv2
|
|
|
178
188
|
# Calculates hash code according to all attributes.
|
|
179
189
|
# @return [Integer] Hash code
|
|
180
190
|
def hash
|
|
181
|
-
[amount, customer_id, payment_method_id, payment_method_options, payment_method_types, return_url, description, metadata].hash
|
|
191
|
+
[amount, customer_id, payment_method_id, payment_method_options, payment_method_types, return_url, redirect_options, description, metadata].hash
|
|
182
192
|
end
|
|
183
193
|
|
|
184
194
|
# Builds the object from hash
|
|
@@ -18,7 +18,6 @@ module PAYJPv2
|
|
|
18
18
|
# カードの下4桁
|
|
19
19
|
attr_accessor :last4
|
|
20
20
|
|
|
21
|
-
# カードのブランド
|
|
22
21
|
attr_accessor :brand
|
|
23
22
|
|
|
24
23
|
# カードの有効期限(月)
|
|
@@ -32,6 +31,30 @@ module PAYJPv2
|
|
|
32
31
|
|
|
33
32
|
attr_accessor :country
|
|
34
33
|
|
|
34
|
+
attr_accessor :funding
|
|
35
|
+
|
|
36
|
+
class EnumAttributeValidator
|
|
37
|
+
attr_reader :datatype
|
|
38
|
+
attr_reader :allowable_values
|
|
39
|
+
|
|
40
|
+
def initialize(datatype, allowable_values)
|
|
41
|
+
@allowable_values = allowable_values.map do |value|
|
|
42
|
+
case datatype.to_s
|
|
43
|
+
when /Integer/i
|
|
44
|
+
value.to_i
|
|
45
|
+
when /Float/i
|
|
46
|
+
value.to_f
|
|
47
|
+
else
|
|
48
|
+
value
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def valid?(value)
|
|
54
|
+
!value || allowable_values.include?(value)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
35
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
59
|
def self.attribute_map
|
|
37
60
|
{
|
|
@@ -40,7 +63,8 @@ module PAYJPv2
|
|
|
40
63
|
:exp_month => :exp_month,
|
|
41
64
|
:exp_year => :exp_year,
|
|
42
65
|
:fingerprint => :fingerprint,
|
|
43
|
-
:country => :country
|
|
66
|
+
:country => :country,
|
|
67
|
+
:funding => :funding
|
|
44
68
|
}
|
|
45
69
|
end
|
|
46
70
|
|
|
@@ -58,18 +82,20 @@ module PAYJPv2
|
|
|
58
82
|
def self.openapi_types
|
|
59
83
|
{
|
|
60
84
|
:last4 => :'String',
|
|
61
|
-
:brand => :'
|
|
85
|
+
:brand => :'CardBrand',
|
|
62
86
|
:exp_month => :'Integer',
|
|
63
87
|
:exp_year => :'Integer',
|
|
64
88
|
:fingerprint => :'String',
|
|
65
|
-
:country => :'String'
|
|
89
|
+
:country => :'String',
|
|
90
|
+
:funding => :'CardFunding'
|
|
66
91
|
}
|
|
67
92
|
end
|
|
68
93
|
|
|
69
94
|
# List of attributes with nullable: true
|
|
70
95
|
def self.openapi_nullable
|
|
71
96
|
Set.new([
|
|
72
|
-
:country
|
|
97
|
+
:country,
|
|
98
|
+
:funding
|
|
73
99
|
])
|
|
74
100
|
end
|
|
75
101
|
|
|
@@ -124,6 +150,12 @@ module PAYJPv2
|
|
|
124
150
|
else
|
|
125
151
|
self.country = nil
|
|
126
152
|
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:funding)
|
|
155
|
+
self.funding = attributes[:funding]
|
|
156
|
+
else
|
|
157
|
+
self.funding = nil
|
|
158
|
+
end
|
|
127
159
|
end
|
|
128
160
|
|
|
129
161
|
# Custom attribute writer method with validation
|
|
@@ -186,7 +218,8 @@ module PAYJPv2
|
|
|
186
218
|
exp_month == o.exp_month &&
|
|
187
219
|
exp_year == o.exp_year &&
|
|
188
220
|
fingerprint == o.fingerprint &&
|
|
189
|
-
country == o.country
|
|
221
|
+
country == o.country &&
|
|
222
|
+
funding == o.funding
|
|
190
223
|
end
|
|
191
224
|
|
|
192
225
|
# @see the `==` method
|
|
@@ -198,7 +231,7 @@ module PAYJPv2
|
|
|
198
231
|
# Calculates hash code according to all attributes.
|
|
199
232
|
# @return [Integer] Hash code
|
|
200
233
|
def hash
|
|
201
|
-
[last4, brand, exp_month, exp_year, fingerprint, country].hash
|
|
234
|
+
[last4, brand, exp_month, exp_year, fingerprint, country, funding].hash
|
|
202
235
|
end
|
|
203
236
|
|
|
204
237
|
# Builds the object from hash
|
|
@@ -64,8 +64,8 @@ module PAYJPv2
|
|
|
64
64
|
# Attribute type mapping.
|
|
65
65
|
def self.openapi_types
|
|
66
66
|
{
|
|
67
|
-
:preference => :'
|
|
68
|
-
:value => :'
|
|
67
|
+
:preference => :'PaymentMethodConfigurationPreference',
|
|
68
|
+
:value => :'PaymentMethodConfigurationValue'
|
|
69
69
|
}
|
|
70
70
|
end
|
|
71
71
|
|
|
@@ -100,26 +100,6 @@ module PAYJPv2
|
|
|
100
100
|
end
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
104
|
-
# @param [Object] preference Object to be assigned
|
|
105
|
-
def preference=(preference)
|
|
106
|
-
validator = EnumAttributeValidator.new('String', ["none", "off", "on"])
|
|
107
|
-
unless validator.valid?(preference)
|
|
108
|
-
raise ArgumentError, "invalid value for \"preference\", must be one of #{validator.allowable_values}."
|
|
109
|
-
end
|
|
110
|
-
@preference = preference
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
114
|
-
# @param [Object] value Object to be assigned
|
|
115
|
-
def value=(value)
|
|
116
|
-
validator = EnumAttributeValidator.new('String', ["off", "on"])
|
|
117
|
-
unless validator.valid?(value)
|
|
118
|
-
raise ArgumentError, "invalid value for \"value\", must be one of #{validator.allowable_values}."
|
|
119
|
-
end
|
|
120
|
-
@value = value
|
|
121
|
-
end
|
|
122
|
-
|
|
123
103
|
# Checks equality by comparing each attribute.
|
|
124
104
|
# @param [Object] Object to be compared
|
|
125
105
|
def ==(o)
|
|
@@ -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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PAYJPv2
|
|
17
|
+
class PaymentMethodConfigurationPreference
|
|
18
|
+
ON = "on".freeze
|
|
19
|
+
OFF = "off".freeze
|
|
20
|
+
NONE = "none".freeze
|
|
21
|
+
|
|
22
|
+
def self.all_vars
|
|
23
|
+
@all_vars ||= [ON, OFF, NONE].freeze
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Builds the enum from string
|
|
27
|
+
# @param [String] The enum value in the form of the string
|
|
28
|
+
# @return [String] The enum value
|
|
29
|
+
def self.build_from_hash(value)
|
|
30
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
31
|
+
value
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Builds the enum from string
|
|
35
|
+
# @param [String] The enum value in the form of the string
|
|
36
|
+
# @return [String] The enum value
|
|
37
|
+
def build_from_hash(value)
|
|
38
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
39
|
+
value
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
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 PaymentMethodConfigurationValue
|
|
18
|
+
ON = "on".freeze
|
|
19
|
+
OFF = "off".freeze
|
|
20
|
+
|
|
21
|
+
def self.all_vars
|
|
22
|
+
@all_vars ||= [ON, OFF].freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Builds the enum from string
|
|
26
|
+
# @param [String] The enum value in the form of the string
|
|
27
|
+
# @return [String] The enum value
|
|
28
|
+
def self.build_from_hash(value)
|
|
29
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
30
|
+
value
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Builds the enum from string
|
|
34
|
+
# @param [String] The enum value in the form of the string
|
|
35
|
+
# @return [String] The enum value
|
|
36
|
+
def build_from_hash(value)
|
|
37
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
38
|
+
value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -27,15 +27,16 @@ module PAYJPv2
|
|
|
27
27
|
# @param [String] The enum value in the form of the string
|
|
28
28
|
# @return [String] The enum value
|
|
29
29
|
def self.build_from_hash(value)
|
|
30
|
-
|
|
30
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
31
|
+
value
|
|
31
32
|
end
|
|
32
33
|
|
|
33
34
|
# Builds the enum from string
|
|
34
35
|
# @param [String] The enum value in the form of the string
|
|
35
36
|
# @return [String] The enum value
|
|
36
37
|
def build_from_hash(value)
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
# Return unknown values as-is so that enum values added on the API side do not break older clients
|
|
39
|
+
value
|
|
39
40
|
end
|
|
40
41
|
end
|
|
41
42
|
end
|