pcp-server-ruby-sdk 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -0
- data/README.md +9 -3
- data/api-definition.yaml +4803 -0
- data/lib/PCP-server-Ruby-SDK/endpoints/checkout_api_client.rb +24 -0
- data/lib/PCP-server-Ruby-SDK/endpoints/payment_execution_api_client.rb +47 -0
- data/lib/PCP-server-Ruby-SDK/endpoints/payment_information_api_client.rb +27 -2
- data/lib/PCP-server-Ruby-SDK/models/action_type.rb +34 -0
- data/lib/PCP-server-Ruby-SDK/models/api_error.rb +1 -1
- data/lib/PCP-server-Ruby-SDK/models/avs_result.rb +52 -0
- data/lib/PCP-server-Ruby-SDK/models/bank_account_information.rb +17 -5
- data/lib/PCP-server-Ruby-SDK/models/bank_payout_method_specific_input.rb +198 -0
- data/lib/PCP-server-Ruby-SDK/models/business_relation.rb +30 -0
- data/lib/PCP-server-Ruby-SDK/models/capture_output.rb +45 -41
- data/lib/PCP-server-Ruby-SDK/models/card_fraud_results.rb +3 -2
- data/lib/PCP-server-Ruby-SDK/models/card_recurrence_details.rb +5 -2
- data/lib/PCP-server-Ruby-SDK/models/customer.rb +21 -6
- data/lib/PCP-server-Ruby-SDK/models/customer_account.rb +51 -0
- data/lib/PCP-server-Ruby-SDK/models/financing_payment_method_specific_output.rb +43 -40
- data/lib/PCP-server-Ruby-SDK/models/merchant_action.rb +3 -2
- data/lib/PCP-server-Ruby-SDK/models/mobile_payment_method_specific_input.rb +16 -33
- data/lib/PCP-server-Ruby-SDK/models/mobile_payment_three_dsecure.rb +185 -0
- data/lib/PCP-server-Ruby-SDK/models/order_line_details_input.rb +12 -6
- data/lib/PCP-server-Ruby-SDK/models/{payment_product320_specific_input.rb → pause_payment_request.rb} +13 -31
- data/lib/PCP-server-Ruby-SDK/models/pause_payment_response.rb +192 -0
- data/lib/PCP-server-Ruby-SDK/models/payee.rb +212 -0
- data/lib/PCP-server-Ruby-SDK/models/payment_event.rb +14 -14
- data/lib/PCP-server-Ruby-SDK/models/payment_execution.rb +39 -5
- data/lib/PCP-server-Ruby-SDK/models/payment_information_refund_request.rb +212 -0
- data/lib/PCP-server-Ruby-SDK/models/payment_information_refund_response.rb +202 -0
- data/lib/PCP-server-Ruby-SDK/models/payment_information_response.rb +40 -25
- data/lib/PCP-server-Ruby-SDK/models/payment_instructions.rb +222 -0
- data/lib/PCP-server-Ruby-SDK/models/payment_product302_specific_input.rb +232 -0
- data/lib/PCP-server-Ruby-SDK/models/payout_output.rb +28 -24
- data/lib/PCP-server-Ruby-SDK/models/payout_response.rb +6 -25
- data/lib/PCP-server-Ruby-SDK/models/recurring_payment_sequence_indicator.rb +30 -0
- data/lib/PCP-server-Ruby-SDK/models/redirect_payment_product840_specific_input.rb +14 -4
- data/lib/PCP-server-Ruby-SDK/models/refresh_payment_request.rb +192 -0
- data/lib/PCP-server-Ruby-SDK/models/refresh_type.rb +30 -0
- data/lib/PCP-server-Ruby-SDK/models/sepa_transfer_payment_product_772_specific_input.rb +192 -0
- data/lib/PCP-server-Ruby-SDK/models/status_value.rb +12 -10
- data/lib/PCP-server-Ruby-SDK/queries/get_checkouts_query.rb +3 -1
- data/lib/PCP-server-Ruby-SDK/transformer/apple_pay_transformer.rb +2 -2
- data/lib/PCP-server-Ruby-SDK/version.rb +1 -1
- data/lib/PCP-server-Ruby-SDK.rb +24 -2
- data/package-lock.json +174 -245
- data/package.json +1 -1
- data/scripts.sh +7 -14
- data/spec/endpoints/checkout_api_client_spec.rb +51 -0
- data/spec/endpoints/payment_execution_api_client_spec.rb +102 -0
- data/spec/endpoints/payment_information_api_client_spec.rb +52 -0
- data/spec/transformer/apple_pay_transformer_spec.rb +1 -1
- data/spec/utils/server_meta_info_spec.rb +2 -2
- metadata +24 -7
@@ -0,0 +1,192 @@
|
|
1
|
+
require 'date'
|
2
|
+
require 'time'
|
3
|
+
|
4
|
+
# Response for pausing a payment execution.
|
5
|
+
module PCPServerSDK
|
6
|
+
module Models
|
7
|
+
class PausePaymentResponse
|
8
|
+
# Status of the paused payment.
|
9
|
+
attr_accessor :status
|
10
|
+
|
11
|
+
class EnumAttributeValidator
|
12
|
+
attr_reader :datatype
|
13
|
+
attr_reader :allowable_values
|
14
|
+
|
15
|
+
def initialize(datatype, allowable_values)
|
16
|
+
@allowable_values = allowable_values.map do |value|
|
17
|
+
case datatype.to_s
|
18
|
+
when /Integer/i
|
19
|
+
value.to_i
|
20
|
+
when /Float/i
|
21
|
+
value.to_f
|
22
|
+
else
|
23
|
+
value
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def valid?(value)
|
29
|
+
!value || allowable_values.include?(value)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'status' => :'status'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Returns all the JSON keys this model knows about
|
41
|
+
def self.acceptable_attributes
|
42
|
+
attribute_map.values
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.openapi_types
|
47
|
+
{
|
48
|
+
:'status' => :'StatusValue'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# List of attributes with nullable: true
|
53
|
+
def self.openapi_nullable
|
54
|
+
Set.new([])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PausePaymentResponse` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PausePaymentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
|
+
end
|
68
|
+
h[k.to_sym] = v
|
69
|
+
}
|
70
|
+
|
71
|
+
if attributes.key?(:'status')
|
72
|
+
self.status = attributes[:'status']
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# Checks equality by comparing each attribute.
|
77
|
+
def ==(o)
|
78
|
+
return true if self.equal?(o)
|
79
|
+
self.class == o.class &&
|
80
|
+
status == o.status
|
81
|
+
end
|
82
|
+
|
83
|
+
# @see the `==` method
|
84
|
+
def eql?(o)
|
85
|
+
self == o
|
86
|
+
end
|
87
|
+
|
88
|
+
# Calculates hash code according to all attributes.
|
89
|
+
def hash
|
90
|
+
[status].hash
|
91
|
+
end
|
92
|
+
|
93
|
+
# Builds the object from hash
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
95
|
+
# @return [Object] Returns the model itself
|
96
|
+
def self.build_from_hash(attributes)
|
97
|
+
return nil unless attributes.is_a?(Hash)
|
98
|
+
attributes = attributes.transform_keys(&:to_sym)
|
99
|
+
transformed_hash = {}
|
100
|
+
openapi_types.each_pair do |key, type|
|
101
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
102
|
+
transformed_hash["#{key}"] = nil
|
103
|
+
elsif type =~ /\AArray<(.*)>/i
|
104
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
105
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
106
|
+
end
|
107
|
+
elsif !attributes[attribute_map[key]].nil?
|
108
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
109
|
+
end
|
110
|
+
end
|
111
|
+
new(transformed_hash)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Deserializes the data based on type
|
115
|
+
def self._deserialize(type, value)
|
116
|
+
case type.to_sym
|
117
|
+
when :Time
|
118
|
+
Time.parse(value)
|
119
|
+
when :Date
|
120
|
+
Date.parse(value)
|
121
|
+
when :String
|
122
|
+
value.to_s
|
123
|
+
when :Integer
|
124
|
+
value.to_i
|
125
|
+
when :Float
|
126
|
+
value.to_f
|
127
|
+
when :Boolean
|
128
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
129
|
+
true
|
130
|
+
else
|
131
|
+
false
|
132
|
+
end
|
133
|
+
when :Object
|
134
|
+
value
|
135
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
136
|
+
inner_type = Regexp.last_match[:inner_type]
|
137
|
+
value.map { |v| _deserialize(inner_type, v) }
|
138
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
139
|
+
k_type = Regexp.last_match[:k_type]
|
140
|
+
v_type = Regexp.last_match[:v_type]
|
141
|
+
{}.tap do |hash|
|
142
|
+
value.each do |k, v|
|
143
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
else
|
147
|
+
klass = PCPServerSDK::Models.const_get(type)
|
148
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Returns the string representation of the object
|
153
|
+
def to_s
|
154
|
+
to_hash.to_s
|
155
|
+
end
|
156
|
+
|
157
|
+
# to_body is an alias to to_hash (backward compatibility)
|
158
|
+
def to_body
|
159
|
+
to_hash
|
160
|
+
end
|
161
|
+
|
162
|
+
# Returns the object in the form of hash
|
163
|
+
def to_hash
|
164
|
+
hash = {}
|
165
|
+
self.class.attribute_map.each_pair do |attr, param|
|
166
|
+
value = self.send(attr)
|
167
|
+
if value.nil?
|
168
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
169
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
170
|
+
end
|
171
|
+
hash[param] = _to_hash(value)
|
172
|
+
end
|
173
|
+
hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# Outputs non-array value in the form of hash
|
177
|
+
def _to_hash(value)
|
178
|
+
if value.is_a?(Array)
|
179
|
+
value.compact.map { |v| _to_hash(v) }
|
180
|
+
elsif value.is_a?(Hash)
|
181
|
+
{}.tap do |hash|
|
182
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
183
|
+
end
|
184
|
+
elsif value.respond_to? :to_hash
|
185
|
+
value.to_hash
|
186
|
+
else
|
187
|
+
value
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
@@ -0,0 +1,212 @@
|
|
1
|
+
require 'date'
|
2
|
+
require 'time'
|
3
|
+
|
4
|
+
# Payee bank account details as part of the payment instructions
|
5
|
+
module PCPServerSDK
|
6
|
+
module Models
|
7
|
+
class Payee
|
8
|
+
# IBAN of the payee's or beneficiary's bank account.
|
9
|
+
attr_accessor :iban
|
10
|
+
|
11
|
+
# Bank Identification Code
|
12
|
+
attr_accessor :bic
|
13
|
+
|
14
|
+
# Name of the payee
|
15
|
+
attr_accessor :name
|
16
|
+
|
17
|
+
class EnumAttributeValidator
|
18
|
+
attr_reader :datatype
|
19
|
+
attr_reader :allowable_values
|
20
|
+
|
21
|
+
def initialize(datatype, allowable_values)
|
22
|
+
@allowable_values = allowable_values.map do |value|
|
23
|
+
case datatype.to_s
|
24
|
+
when /Integer/i
|
25
|
+
value.to_i
|
26
|
+
when /Float/i
|
27
|
+
value.to_f
|
28
|
+
else
|
29
|
+
value
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def valid?(value)
|
35
|
+
!value || allowable_values.include?(value)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'iban' => :'iban',
|
43
|
+
:'bic' => :'bic',
|
44
|
+
:'name' => :'name'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Returns all the JSON keys this model knows about
|
49
|
+
def self.acceptable_attributes
|
50
|
+
attribute_map.values
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute type mapping.
|
54
|
+
def self.openapi_types
|
55
|
+
{
|
56
|
+
:'iban' => :'String',
|
57
|
+
:'bic' => :'String',
|
58
|
+
:'name' => :'String'
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
62
|
+
# List of attributes with nullable: true
|
63
|
+
def self.openapi_nullable
|
64
|
+
Set.new([])
|
65
|
+
end
|
66
|
+
|
67
|
+
# Initializes the object
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
69
|
+
def initialize(attributes = {})
|
70
|
+
if (!attributes.is_a?(Hash))
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Payee` initialize method"
|
72
|
+
end
|
73
|
+
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Payee`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
77
|
+
end
|
78
|
+
h[k.to_sym] = v
|
79
|
+
}
|
80
|
+
|
81
|
+
if attributes.key?(:'iban')
|
82
|
+
self.iban = attributes[:'iban']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'bic')
|
86
|
+
self.bic = attributes[:'bic']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'name')
|
90
|
+
self.name = attributes[:'name']
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
# Checks equality by comparing each attribute.
|
95
|
+
def ==(o)
|
96
|
+
return true if self.equal?(o)
|
97
|
+
self.class == o.class &&
|
98
|
+
iban == o.iban &&
|
99
|
+
bic == o.bic &&
|
100
|
+
name == o.name
|
101
|
+
end
|
102
|
+
|
103
|
+
# @see the `==` method
|
104
|
+
def eql?(o)
|
105
|
+
self == o
|
106
|
+
end
|
107
|
+
|
108
|
+
# Calculates hash code according to all attributes.
|
109
|
+
def hash
|
110
|
+
[iban, bic, name].hash
|
111
|
+
end
|
112
|
+
|
113
|
+
# Builds the object from hash
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
+
# @return [Object] Returns the model itself
|
116
|
+
def self.build_from_hash(attributes)
|
117
|
+
return nil unless attributes.is_a?(Hash)
|
118
|
+
attributes = attributes.transform_keys(&:to_sym)
|
119
|
+
transformed_hash = {}
|
120
|
+
openapi_types.each_pair do |key, type|
|
121
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
122
|
+
transformed_hash["#{key}"] = nil
|
123
|
+
elsif type =~ /\AArray<(.*)>/i
|
124
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
125
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
126
|
+
end
|
127
|
+
elsif !attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
129
|
+
end
|
130
|
+
end
|
131
|
+
new(transformed_hash)
|
132
|
+
end
|
133
|
+
|
134
|
+
# Deserializes the data based on type
|
135
|
+
def self._deserialize(type, value)
|
136
|
+
case type.to_sym
|
137
|
+
when :Time
|
138
|
+
Time.parse(value)
|
139
|
+
when :Date
|
140
|
+
Date.parse(value)
|
141
|
+
when :String
|
142
|
+
value.to_s
|
143
|
+
when :Integer
|
144
|
+
value.to_i
|
145
|
+
when :Float
|
146
|
+
value.to_f
|
147
|
+
when :Boolean
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
149
|
+
true
|
150
|
+
else
|
151
|
+
false
|
152
|
+
end
|
153
|
+
when :Object
|
154
|
+
value
|
155
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
156
|
+
inner_type = Regexp.last_match[:inner_type]
|
157
|
+
value.map { |v| _deserialize(inner_type, v) }
|
158
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
159
|
+
k_type = Regexp.last_match[:k_type]
|
160
|
+
v_type = Regexp.last_match[:v_type]
|
161
|
+
{}.tap do |hash|
|
162
|
+
value.each do |k, v|
|
163
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
else
|
167
|
+
klass = PCPServerSDK::Models.const_get(type)
|
168
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the string representation of the object
|
173
|
+
def to_s
|
174
|
+
to_hash.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
178
|
+
def to_body
|
179
|
+
to_hash
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the object in the form of hash
|
183
|
+
def to_hash
|
184
|
+
hash = {}
|
185
|
+
self.class.attribute_map.each_pair do |attr, param|
|
186
|
+
value = self.send(attr)
|
187
|
+
if value.nil?
|
188
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
189
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
190
|
+
end
|
191
|
+
hash[param] = _to_hash(value)
|
192
|
+
end
|
193
|
+
hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Outputs non-array value in the form of hash
|
197
|
+
def _to_hash(value)
|
198
|
+
if value.is_a?(Array)
|
199
|
+
value.compact.map { |v| _to_hash(v) }
|
200
|
+
elsif value.is_a?(Hash)
|
201
|
+
{}.tap do |hash|
|
202
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
203
|
+
end
|
204
|
+
elsif value.respond_to? :to_hash
|
205
|
+
value.to_hash
|
206
|
+
else
|
207
|
+
value
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
require 'date'
|
3
2
|
require 'time'
|
4
3
|
|
@@ -14,10 +13,10 @@ module PCPServerSDK
|
|
14
13
|
|
15
14
|
attr_accessor :cancellation_reason
|
16
15
|
|
17
|
-
# Reason of the Refund (e.g. communicated by or to the
|
16
|
+
# Reason of the Refund (e.g. communicated by or to the customer).
|
18
17
|
attr_accessor :return_reason
|
19
18
|
|
20
|
-
|
19
|
+
attr_accessor :payment_instructions
|
21
20
|
|
22
21
|
class EnumAttributeValidator
|
23
22
|
attr_reader :datatype
|
@@ -48,7 +47,8 @@ module PCPServerSDK
|
|
48
47
|
:'amount_of_money' => :'amountOfMoney',
|
49
48
|
:'payment_status' => :'paymentStatus',
|
50
49
|
:'cancellation_reason' => :'cancellationReason',
|
51
|
-
:'return_reason' => :'returnReason'
|
50
|
+
:'return_reason' => :'returnReason',
|
51
|
+
:'payment_instructions' => :'paymentInstructions'
|
52
52
|
}
|
53
53
|
end
|
54
54
|
|
@@ -64,14 +64,14 @@ module PCPServerSDK
|
|
64
64
|
:'amount_of_money' => :'AmountOfMoney',
|
65
65
|
:'payment_status' => :'StatusValue',
|
66
66
|
:'cancellation_reason' => :'CancellationReason',
|
67
|
-
:'return_reason' => :'String'
|
67
|
+
:'return_reason' => :'String',
|
68
|
+
:'payment_instructions' => :'PaymentInstructions'
|
68
69
|
}
|
69
70
|
end
|
70
71
|
|
71
72
|
# List of attributes with nullable: true
|
72
73
|
def self.openapi_nullable
|
73
|
-
Set.new([
|
74
|
-
])
|
74
|
+
Set.new([])
|
75
75
|
end
|
76
76
|
|
77
77
|
# Initializes the object
|
@@ -108,10 +108,13 @@ module PCPServerSDK
|
|
108
108
|
if attributes.key?(:'return_reason')
|
109
109
|
self.return_reason = attributes[:'return_reason']
|
110
110
|
end
|
111
|
+
|
112
|
+
if attributes.key?(:'payment_instructions')
|
113
|
+
self.payment_instructions = attributes[:'payment_instructions']
|
114
|
+
end
|
111
115
|
end
|
112
116
|
|
113
117
|
# Checks equality by comparing each attribute.
|
114
|
-
# @param [Object] Object to be compared
|
115
118
|
def ==(o)
|
116
119
|
return true if self.equal?(o)
|
117
120
|
self.class == o.class &&
|
@@ -119,19 +122,16 @@ module PCPServerSDK
|
|
119
122
|
amount_of_money == o.amount_of_money &&
|
120
123
|
payment_status == o.payment_status &&
|
121
124
|
cancellation_reason == o.cancellation_reason &&
|
122
|
-
return_reason == o.return_reason
|
125
|
+
return_reason == o.return_reason &&
|
126
|
+
payment_instructions == o.payment_instructions
|
123
127
|
end
|
124
128
|
|
125
|
-
# @see the `==` method
|
126
|
-
# @param [Object] Object to be compared
|
127
129
|
def eql?(o)
|
128
130
|
self == o
|
129
131
|
end
|
130
132
|
|
131
|
-
# Calculates hash code according to all attributes.
|
132
|
-
# @return [Integer] Hash code
|
133
133
|
def hash
|
134
|
-
[type, amount_of_money, payment_status, cancellation_reason, return_reason].hash
|
134
|
+
[type, amount_of_money, payment_status, cancellation_reason, return_reason, payment_instructions].hash
|
135
135
|
end
|
136
136
|
|
137
137
|
# Builds the object from hash
|
@@ -22,13 +22,19 @@ module PCPServerSDK
|
|
22
22
|
|
23
23
|
attr_accessor :financing_payment_method_specific_input
|
24
24
|
|
25
|
+
attr_accessor :bank_payout_method_specific_input
|
26
|
+
|
25
27
|
attr_accessor :payment_channel
|
26
28
|
|
27
29
|
attr_accessor :references
|
28
30
|
|
29
|
-
attr_accessor :
|
31
|
+
attr_accessor :previous_payment
|
32
|
+
|
33
|
+
attr_accessor :creation_date_time
|
30
34
|
|
35
|
+
attr_accessor :last_updated
|
31
36
|
|
37
|
+
attr_accessor :events
|
32
38
|
|
33
39
|
class EnumAttributeValidator
|
34
40
|
attr_reader :datatype
|
@@ -62,8 +68,12 @@ module PCPServerSDK
|
|
62
68
|
:'redirect_payment_method_specific_input' => :'redirectPaymentMethodSpecificInput',
|
63
69
|
:'sepa_direct_debit_payment_method_specific_input' => :'sepaDirectDebitPaymentMethodSpecificInput',
|
64
70
|
:'financing_payment_method_specific_input' => :'financingPaymentMethodSpecificInput',
|
71
|
+
:'bank_payout_method_specific_input' => :'bankPayoutMethodSpecificInput',
|
65
72
|
:'payment_channel' => :'paymentChannel',
|
66
73
|
:'references' => :'references',
|
74
|
+
:'previous_payment' => :'previousPayment',
|
75
|
+
:'creation_date_time' => :'creationDateTime',
|
76
|
+
:'last_updated' => :'lastUpdated',
|
67
77
|
:'events' => :'events'
|
68
78
|
}
|
69
79
|
end
|
@@ -83,8 +93,12 @@ module PCPServerSDK
|
|
83
93
|
:'redirect_payment_method_specific_input' => :'RedirectPaymentMethodSpecificInput',
|
84
94
|
:'sepa_direct_debit_payment_method_specific_input' => :'SepaDirectDebitPaymentMethodSpecificInput',
|
85
95
|
:'financing_payment_method_specific_input' => :'FinancingPaymentMethodSpecificInput',
|
96
|
+
:'bank_payout_method_specific_input' => :'BankPayoutMethodSpecificInput',
|
86
97
|
:'payment_channel' => :'PaymentChannel',
|
87
98
|
:'references' => :'References',
|
99
|
+
:'previous_payment' => :'String',
|
100
|
+
:'creation_date_time' => :'Time',
|
101
|
+
:'last_updated' => :'Time',
|
88
102
|
:'events' => :'Array<PaymentEvent>'
|
89
103
|
}
|
90
104
|
end
|
@@ -138,6 +152,10 @@ module PCPServerSDK
|
|
138
152
|
self.financing_payment_method_specific_input = attributes[:'financing_payment_method_specific_input']
|
139
153
|
end
|
140
154
|
|
155
|
+
if attributes.key?(:'bank_payout_method_specific_input')
|
156
|
+
self.bank_payout_method_specific_input = attributes[:'bank_payout_method_specific_input']
|
157
|
+
end
|
158
|
+
|
141
159
|
if attributes.key?(:'payment_channel')
|
142
160
|
self.payment_channel = attributes[:'payment_channel']
|
143
161
|
end
|
@@ -146,6 +164,18 @@ module PCPServerSDK
|
|
146
164
|
self.references = attributes[:'references']
|
147
165
|
end
|
148
166
|
|
167
|
+
if attributes.key?(:'previous_payment')
|
168
|
+
self.previous_payment = attributes[:'previous_payment']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.key?(:'creation_date_time')
|
172
|
+
self.creation_date_time = attributes[:'creation_date_time']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.key?(:'last_updated')
|
176
|
+
self.last_updated = attributes[:'last_updated']
|
177
|
+
end
|
178
|
+
|
149
179
|
if attributes.key?(:'events')
|
150
180
|
if (value = attributes[:'events']).is_a?(Array)
|
151
181
|
self.events = value
|
@@ -154,7 +184,6 @@ module PCPServerSDK
|
|
154
184
|
end
|
155
185
|
|
156
186
|
# Checks equality by comparing each attribute.
|
157
|
-
# @param [Object] Object to be compared
|
158
187
|
def ==(o)
|
159
188
|
return true if self.equal?(o)
|
160
189
|
self.class == o.class &&
|
@@ -165,21 +194,26 @@ module PCPServerSDK
|
|
165
194
|
redirect_payment_method_specific_input == o.redirect_payment_method_specific_input &&
|
166
195
|
sepa_direct_debit_payment_method_specific_input == o.sepa_direct_debit_payment_method_specific_input &&
|
167
196
|
financing_payment_method_specific_input == o.financing_payment_method_specific_input &&
|
197
|
+
bank_payout_method_specific_input == o.bank_payout_method_specific_input &&
|
168
198
|
payment_channel == o.payment_channel &&
|
169
199
|
references == o.references &&
|
200
|
+
previous_payment == o.previous_payment &&
|
201
|
+
creation_date_time == o.creation_date_time &&
|
202
|
+
last_updated == o.last_updated &&
|
170
203
|
events == o.events
|
171
204
|
end
|
172
205
|
|
173
206
|
# @see the `==` method
|
174
|
-
# @param [Object] Object to be compared
|
175
207
|
def eql?(o)
|
176
208
|
self == o
|
177
209
|
end
|
178
210
|
|
179
211
|
# Calculates hash code according to all attributes.
|
180
|
-
# @return [Integer] Hash code
|
181
212
|
def hash
|
182
|
-
[payment_execution_id, payment_id, card_payment_method_specific_input, mobile_payment_method_specific_input,
|
213
|
+
[payment_execution_id, payment_id, card_payment_method_specific_input, mobile_payment_method_specific_input,
|
214
|
+
redirect_payment_method_specific_input, sepa_direct_debit_payment_method_specific_input,
|
215
|
+
financing_payment_method_specific_input, bank_payout_method_specific_input, payment_channel, references,
|
216
|
+
previous_payment, creation_date_time, last_updated, events].hash
|
183
217
|
end
|
184
218
|
|
185
219
|
# Builds the object from hash
|