pcp-server-ruby-sdk 1.6.0 → 1.7.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 +6 -0
- data/api-definition.yaml +169 -18
- data/lib/PCP-server-Ruby-SDK/models/apple_payment_data_token_header_information.rb +2 -0
- data/lib/PCP-server-Ruby-SDK/models/apple_payment_data_token_information.rb +6 -0
- data/lib/PCP-server-Ruby-SDK/models/bank_account_information.rb +0 -2
- data/lib/PCP-server-Ruby-SDK/models/bank_payout_method_specific_input.rb +0 -4
- data/lib/PCP-server-Ruby-SDK/models/capture_payment_request.rb +13 -4
- data/lib/PCP-server-Ruby-SDK/models/capture_payment_response.rb +13 -4
- data/lib/PCP-server-Ruby-SDK/models/cart_item_input.rb +13 -4
- data/lib/PCP-server-Ruby-SDK/models/cart_item_patch.rb +13 -4
- data/lib/PCP-server-Ruby-SDK/models/cart_item_result.rb +13 -4
- data/lib/PCP-server-Ruby-SDK/models/cart_item_supplier_references.rb +200 -0
- data/lib/PCP-server-Ruby-SDK/models/complete_payment_product840_specific_input.rb +2 -0
- data/lib/PCP-server-Ruby-SDK/models/create_payment_response.rb +13 -4
- data/lib/PCP-server-Ruby-SDK/models/deliver_request.rb +12 -4
- data/lib/PCP-server-Ruby-SDK/models/fund_distribution.rb +272 -0
- data/lib/PCP-server-Ruby-SDK/models/fund_split.rb +211 -0
- data/lib/PCP-server-Ruby-SDK/models/mobile_payment_method_specific_input.rb +13 -4
- data/lib/PCP-server-Ruby-SDK/models/mobile_payment_method_specific_output.rb +1 -1
- data/lib/PCP-server-Ruby-SDK/models/{network.rb → mobile_payment_network.rb} +4 -4
- data/lib/PCP-server-Ruby-SDK/models/order_request.rb +12 -4
- data/lib/PCP-server-Ruby-SDK/models/pause_payment_request.rb +5 -38
- data/lib/PCP-server-Ruby-SDK/models/payment_execution.rb +15 -4
- data/lib/PCP-server-Ruby-SDK/models/payment_execution_specific_input.rb +13 -4
- data/lib/PCP-server-Ruby-SDK/models/payment_product302_specific_input.rb +1 -1
- data/lib/PCP-server-Ruby-SDK/models/payment_product5002_specific_input.rb +209 -0
- data/lib/PCP-server-Ruby-SDK/models/refund_payment_response.rb +12 -4
- data/lib/PCP-server-Ruby-SDK/models/refund_request.rb +13 -4
- data/lib/PCP-server-Ruby-SDK/models/return_request.rb +204 -191
- 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 +5 -1
- data/package-lock.json +2 -3
- data/package.json +1 -1
- data/scripts.sh +2 -2
- data/spec/transformer/apple_pay_transformer_spec.rb +1 -1
- metadata +11 -7
|
@@ -3,226 +3,239 @@ require 'date'
|
|
|
3
3
|
require 'time'
|
|
4
4
|
|
|
5
5
|
# Request to mark items of the respective Checkout as returned and to automatically refund a payment for those items. A Return can be created for a full or the partial ShoppingCart of the Checkout. The platform will automatically calculate the respective amount to trigger the Refund. For a partial Return a list of items must be provided. The item details for the Refund will be automatically loaded from the Checkout. The returnReason can be provided for reporting and reconciliation purposes but is not mandatory.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
module PCPServerSDK
|
|
7
|
+
module Models
|
|
8
|
+
class ReturnRequest
|
|
9
|
+
attr_accessor :return_type
|
|
10
|
+
|
|
11
|
+
# Reason of the Refund (e.g. communicated by or to the consumer).
|
|
12
|
+
attr_accessor :return_reason
|
|
13
|
+
|
|
14
|
+
attr_accessor :return_items
|
|
15
|
+
|
|
16
|
+
attr_accessor :fund_split
|
|
17
|
+
|
|
18
|
+
class EnumAttributeValidator
|
|
19
|
+
attr_reader :datatype
|
|
20
|
+
attr_reader :allowable_values
|
|
21
|
+
|
|
22
|
+
def initialize(datatype, allowable_values)
|
|
23
|
+
@allowable_values = allowable_values.map do |value|
|
|
24
|
+
case datatype.to_s
|
|
25
|
+
when /Integer/i
|
|
26
|
+
value.to_i
|
|
27
|
+
when /Float/i
|
|
28
|
+
value.to_f
|
|
29
|
+
else
|
|
30
|
+
value
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
17
34
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
case datatype.to_s
|
|
21
|
-
when /Integer/i
|
|
22
|
-
value.to_i
|
|
23
|
-
when /Float/i
|
|
24
|
-
value.to_f
|
|
25
|
-
else
|
|
26
|
-
value
|
|
35
|
+
def valid?(value)
|
|
36
|
+
!value || allowable_values.include?(value)
|
|
27
37
|
end
|
|
28
38
|
end
|
|
29
|
-
end
|
|
30
39
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
41
|
+
def self.attribute_map
|
|
42
|
+
{
|
|
43
|
+
:'return_type' => :'returnType',
|
|
44
|
+
:'return_reason' => :'returnReason',
|
|
45
|
+
:'return_items' => :'returnItems',
|
|
46
|
+
:'fund_split' => :'fundSplit'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
35
49
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
:'return_reason' => :'returnReason',
|
|
41
|
-
:'return_items' => :'returnItems'
|
|
42
|
-
}
|
|
43
|
-
end
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
def self.acceptable_attributes
|
|
52
|
+
attribute_map.values
|
|
53
|
+
end
|
|
44
54
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'return_type' => :'ReturnType',
|
|
59
|
+
:'return_reason' => :'String',
|
|
60
|
+
:'return_items' => :'Array<ReturnItem>',
|
|
61
|
+
:'fund_split' => :'FundSplit'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
49
64
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
:'return_items' => :'Array<ReturnItem>'
|
|
56
|
-
}
|
|
57
|
-
end
|
|
65
|
+
# List of attributes with nullable: true
|
|
66
|
+
def self.openapi_nullable
|
|
67
|
+
Set.new([
|
|
68
|
+
])
|
|
69
|
+
end
|
|
58
70
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
71
|
+
# Initializes the object
|
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ReturnRequest` initialize method"
|
|
76
|
+
end
|
|
64
77
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ReturnRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
82
|
+
end
|
|
83
|
+
h[k.to_sym] = v
|
|
84
|
+
}
|
|
71
85
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ReturnRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
76
|
-
end
|
|
77
|
-
h[k.to_sym] = v
|
|
78
|
-
}
|
|
86
|
+
if attributes.key?(:'return_type')
|
|
87
|
+
self.return_type = attributes[:'return_type']
|
|
88
|
+
end
|
|
79
89
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
90
|
+
if attributes.key?(:'return_reason')
|
|
91
|
+
self.return_reason = attributes[:'return_reason']
|
|
92
|
+
end
|
|
83
93
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
94
|
+
if attributes.key?(:'return_items')
|
|
95
|
+
if (value = attributes[:'return_items']).is_a?(Array)
|
|
96
|
+
self.return_items = value
|
|
97
|
+
end
|
|
98
|
+
end
|
|
87
99
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
100
|
+
if attributes.key?(:'fund_split')
|
|
101
|
+
self.fund_split = attributes[:'fund_split']
|
|
102
|
+
end
|
|
91
103
|
end
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
104
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
# Checks equality by comparing each attribute.
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def ==(o)
|
|
108
|
+
return true if self.equal?(o)
|
|
109
|
+
self.class == o.class &&
|
|
110
|
+
return_type == o.return_type &&
|
|
111
|
+
return_reason == o.return_reason &&
|
|
112
|
+
return_items == o.return_items &&
|
|
113
|
+
fund_split == o.fund_split
|
|
114
|
+
end
|
|
104
115
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
116
|
+
# @see the `==` method
|
|
117
|
+
# @param [Object] Object to be compared
|
|
118
|
+
def eql?(o)
|
|
119
|
+
self == o
|
|
120
|
+
end
|
|
110
121
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
122
|
+
# Calculates hash code according to all attributes.
|
|
123
|
+
# @return [Integer] Hash code
|
|
124
|
+
def hash
|
|
125
|
+
[return_type, return_reason, return_items, fund_split].hash
|
|
126
|
+
end
|
|
116
127
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
# Builds the object from hash
|
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
130
|
+
# @return [Object] Returns the model itself
|
|
131
|
+
def self.build_from_hash(attributes)
|
|
132
|
+
return nil unless attributes.is_a?(Hash)
|
|
133
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
134
|
+
transformed_hash = {}
|
|
135
|
+
openapi_types.each_pair do |key, type|
|
|
136
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
137
|
+
transformed_hash["#{key}"] = nil
|
|
138
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
139
|
+
# check to ensure the input is an array given that the attribute
|
|
140
|
+
# is documented as an array but the input is not
|
|
141
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
142
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
143
|
+
end
|
|
144
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
145
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
146
|
+
end
|
|
132
147
|
end
|
|
133
|
-
|
|
134
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
148
|
+
new(transformed_hash)
|
|
135
149
|
end
|
|
136
|
-
end
|
|
137
|
-
new(transformed_hash)
|
|
138
|
-
end
|
|
139
150
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
151
|
+
# Deserializes the data based on type
|
|
152
|
+
# @param string type Data type
|
|
153
|
+
# @param string value Value to be deserialized
|
|
154
|
+
# @return [Object] Deserialized data
|
|
155
|
+
def self._deserialize(type, value)
|
|
156
|
+
case type.to_sym
|
|
157
|
+
when :Time
|
|
158
|
+
Time.parse(value)
|
|
159
|
+
when :Date
|
|
160
|
+
Date.parse(value)
|
|
161
|
+
when :String
|
|
162
|
+
value.to_s
|
|
163
|
+
when :Integer
|
|
164
|
+
value.to_i
|
|
165
|
+
when :Float
|
|
166
|
+
value.to_f
|
|
167
|
+
when :Boolean
|
|
168
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
169
|
+
true
|
|
170
|
+
else
|
|
171
|
+
false
|
|
172
|
+
end
|
|
173
|
+
when :Object
|
|
174
|
+
# generic object (usually a Hash), return directly
|
|
175
|
+
value
|
|
176
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
177
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
178
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
179
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
180
|
+
k_type = Regexp.last_match[:k_type]
|
|
181
|
+
v_type = Regexp.last_match[:v_type]
|
|
182
|
+
{}.tap do |hash|
|
|
183
|
+
value.each do |k, v|
|
|
184
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
else # model
|
|
188
|
+
# models (e.g. Pet) or oneOf
|
|
189
|
+
klass = PCPServerSDK::Models.const_get(type)
|
|
190
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
174
191
|
end
|
|
175
192
|
end
|
|
176
|
-
else # model
|
|
177
|
-
# models (e.g. Pet) or oneOf
|
|
178
|
-
klass = PCPServerSDK::Models.const_get(type)
|
|
179
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
180
|
-
end
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
# Returns the string representation of the object
|
|
184
|
-
# @return [String] String presentation of the object
|
|
185
|
-
def to_s
|
|
186
|
-
to_hash.to_s
|
|
187
|
-
end
|
|
188
193
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
+
# Returns the string representation of the object
|
|
195
|
+
# @return [String] String presentation of the object
|
|
196
|
+
def to_s
|
|
197
|
+
to_hash.to_s
|
|
198
|
+
end
|
|
194
199
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
200
|
-
value = self.send(attr)
|
|
201
|
-
if value.nil?
|
|
202
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
203
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
200
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
|
202
|
+
def to_body
|
|
203
|
+
to_hash
|
|
204
204
|
end
|
|
205
205
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
206
|
+
# Returns the object in the form of hash
|
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
|
208
|
+
def to_hash
|
|
209
|
+
hash = {}
|
|
210
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
211
|
+
value = self.send(attr)
|
|
212
|
+
if value.nil?
|
|
213
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
214
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
hash[param] = _to_hash(value)
|
|
218
|
+
end
|
|
219
|
+
hash
|
|
220
|
+
end
|
|
210
221
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
222
|
+
# Outputs non-array value in the form of hash
|
|
223
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
224
|
+
# @param [Object] value Any valid value
|
|
225
|
+
# @return [Hash] Returns the value in the form of hash
|
|
226
|
+
def _to_hash(value)
|
|
227
|
+
if value.is_a?(Array)
|
|
228
|
+
value.compact.map { |v| _to_hash(v) }
|
|
229
|
+
elsif value.is_a?(Hash)
|
|
230
|
+
{}.tap do |hash|
|
|
231
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
232
|
+
end
|
|
233
|
+
elsif value.respond_to? :to_hash
|
|
234
|
+
value.to_hash
|
|
235
|
+
else
|
|
236
|
+
value
|
|
237
|
+
end
|
|
221
238
|
end
|
|
222
|
-
elsif value.respond_to? :to_hash
|
|
223
|
-
value.to_hash
|
|
224
|
-
else
|
|
225
|
-
value
|
|
226
239
|
end
|
|
227
240
|
end
|
|
228
241
|
end
|
|
@@ -7,7 +7,7 @@ require_relative '../models/applepay/apple_pay_payment_data'
|
|
|
7
7
|
require_relative '../models/applepay/apple_pay_payment_data_header'
|
|
8
8
|
require_relative '../models/applepay/apple_pay_payment_method'
|
|
9
9
|
require_relative '../models/mobile_payment_method_specific_input'
|
|
10
|
-
require_relative '../models/
|
|
10
|
+
require_relative '../models/mobile_payment_network'
|
|
11
11
|
require_relative '../models/payment_product302_specific_input'
|
|
12
12
|
|
|
13
13
|
module PCPServerSDK
|
|
@@ -26,7 +26,7 @@ module PCPServerSDK
|
|
|
26
26
|
public_key_hash: header.public_key_hash,
|
|
27
27
|
ephemeral_key: header.ephemeral_public_key,
|
|
28
28
|
payment_product302_specific_input: PCPServerSDK::Models::PaymentProduct302SpecificInput.new(
|
|
29
|
-
network: PCPServerSDK::Models::
|
|
29
|
+
network: PCPServerSDK::Models::MobilePaymentNetwork.from_string(payment_method.network.to_s),
|
|
30
30
|
token: PCPServerSDK::Models::ApplePaymentDataTokenInformation.new(
|
|
31
31
|
version: PCPServerSDK::Models::ApplePaymentTokenVersion.from_string(payment_data.version.to_s),
|
|
32
32
|
signature: payment_data.signature,
|
data/lib/PCP-server-Ruby-SDK.rb
CHANGED
|
@@ -47,6 +47,7 @@ require_relative 'PCP-server-Ruby-SDK/models/cart_item_order_status'
|
|
|
47
47
|
require_relative 'PCP-server-Ruby-SDK/models/cart_item_patch'
|
|
48
48
|
require_relative 'PCP-server-Ruby-SDK/models/cart_item_result'
|
|
49
49
|
require_relative 'PCP-server-Ruby-SDK/models/cart_item_status'
|
|
50
|
+
require_relative 'PCP-server-Ruby-SDK/models/cart_item_supplier_references'
|
|
50
51
|
require_relative 'PCP-server-Ruby-SDK/models/checkout_references'
|
|
51
52
|
require_relative 'PCP-server-Ruby-SDK/models/checkout_response'
|
|
52
53
|
require_relative 'PCP-server-Ruby-SDK/models/checkouts_response'
|
|
@@ -73,6 +74,8 @@ require_relative 'PCP-server-Ruby-SDK/models/error_response'
|
|
|
73
74
|
require_relative 'PCP-server-Ruby-SDK/models/extended_checkout_status'
|
|
74
75
|
require_relative 'PCP-server-Ruby-SDK/models/financing_payment_method_specific_input'
|
|
75
76
|
require_relative 'PCP-server-Ruby-SDK/models/financing_payment_method_specific_output'
|
|
77
|
+
require_relative 'PCP-server-Ruby-SDK/models/fund_distribution'
|
|
78
|
+
require_relative 'PCP-server-Ruby-SDK/models/fund_split'
|
|
76
79
|
require_relative 'PCP-server-Ruby-SDK/models/installment_option'
|
|
77
80
|
require_relative 'PCP-server-Ruby-SDK/models/link_information'
|
|
78
81
|
require_relative 'PCP-server-Ruby-SDK/models/mandate_recurrence_type'
|
|
@@ -80,7 +83,7 @@ require_relative 'PCP-server-Ruby-SDK/models/merchant_action'
|
|
|
80
83
|
require_relative 'PCP-server-Ruby-SDK/models/mobile_payment_three_dsecure'
|
|
81
84
|
require_relative 'PCP-server-Ruby-SDK/models/mobile_payment_method_specific_input'
|
|
82
85
|
require_relative 'PCP-server-Ruby-SDK/models/mobile_payment_method_specific_output'
|
|
83
|
-
require_relative 'PCP-server-Ruby-SDK/models/
|
|
86
|
+
require_relative 'PCP-server-Ruby-SDK/models/mobile_payment_network'
|
|
84
87
|
require_relative 'PCP-server-Ruby-SDK/models/order'
|
|
85
88
|
require_relative 'PCP-server-Ruby-SDK/models/order_item'
|
|
86
89
|
require_relative 'PCP-server-Ruby-SDK/models/order_line_details_input'
|
|
@@ -111,6 +114,7 @@ require_relative 'PCP-server-Ruby-SDK/models/payment_product302_specific_input'
|
|
|
111
114
|
require_relative 'PCP-server-Ruby-SDK/models/payment_product3391_specific_input'
|
|
112
115
|
require_relative 'PCP-server-Ruby-SDK/models/payment_product3391_specific_output'
|
|
113
116
|
require_relative 'PCP-server-Ruby-SDK/models/payment_product3392_specific_input'
|
|
117
|
+
require_relative 'PCP-server-Ruby-SDK/models/payment_product5002_specific_input'
|
|
114
118
|
require_relative 'PCP-server-Ruby-SDK/models/payment_product771_specific_output'
|
|
115
119
|
require_relative 'PCP-server-Ruby-SDK/models/payment_product840_customer_account'
|
|
116
120
|
require_relative 'PCP-server-Ruby-SDK/models/payment_product840_specific_output'
|
data/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pcp-serversdk-ruby",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pcp-serversdk-ruby",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.7.0",
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@commitlint/cli": "19.4.0",
|
|
12
12
|
"@commitlint/config-conventional": "19.2.2",
|
|
@@ -755,7 +755,6 @@
|
|
|
755
755
|
"integrity": "sha512-tQMagCOC59EVgNZcC5zl7XqO30Wki9i9J3acbUvkaosCT6JX3EeFwJD7Qqp4MCikRnzS18WXV3BLIQ66ytu6+Q==",
|
|
756
756
|
"dev": true,
|
|
757
757
|
"license": "MIT",
|
|
758
|
-
"peer": true,
|
|
759
758
|
"engines": {
|
|
760
759
|
"node": ">=18"
|
|
761
760
|
}
|
data/package.json
CHANGED
data/scripts.sh
CHANGED
|
@@ -41,8 +41,8 @@ version() {
|
|
|
41
41
|
PACKAGE_LOCK_JSON_PATH="./package-lock.json"
|
|
42
42
|
|
|
43
43
|
sed -i '' "s/VERSION = '.*'/VERSION = '$NEW_VERSION'/" "$VERSION_FILE_PATH"
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
jq --arg v "$NEW_VERSION" '.version = $v' ${PACKAGE_JSON_PATH} > ${PACKAGE_JSON_PATH}.tmp && mv ${PACKAGE_JSON_PATH}.tmp ${PACKAGE_JSON_PATH}
|
|
45
|
+
jq --arg v "$NEW_VERSION" '.version = $v | .packages[""].version = $v' ${PACKAGE_LOCK_JSON_PATH} > ${PACKAGE_LOCK_JSON_PATH}.tmp && mv ${PACKAGE_LOCK_JSON_PATH}.tmp ${PACKAGE_LOCK_JSON_PATH}
|
|
46
46
|
|
|
47
47
|
# Commit and tag the changes
|
|
48
48
|
git add $PACKAGE_JSON_PATH
|
|
@@ -47,7 +47,7 @@ RSpec.describe 'PCPServerSDK::Transformer::transform_apple_pay_payment_to_mobile
|
|
|
47
47
|
public_key_hash: 'publicKeyHash123',
|
|
48
48
|
ephemeral_key: 'ephemeralPublicKey123',
|
|
49
49
|
payment_product302_specific_input: PCPServerSDK::Models::PaymentProduct302SpecificInput.new(
|
|
50
|
-
network: PCPServerSDK::Models::
|
|
50
|
+
network: PCPServerSDK::Models::MobilePaymentNetwork.from_string('VISA'),
|
|
51
51
|
token: PCPServerSDK::Models::ApplePaymentDataTokenInformation.new(
|
|
52
52
|
version: PCPServerSDK::Models::ApplePaymentTokenVersion.from_string('EC_V1'),
|
|
53
53
|
signature: 'signature123',
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pcp-server-ruby-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- PAYONE GmbH
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: net-http
|
|
@@ -156,6 +156,7 @@ files:
|
|
|
156
156
|
- lib/PCP-server-Ruby-SDK/models/cart_item_patch.rb
|
|
157
157
|
- lib/PCP-server-Ruby-SDK/models/cart_item_result.rb
|
|
158
158
|
- lib/PCP-server-Ruby-SDK/models/cart_item_status.rb
|
|
159
|
+
- lib/PCP-server-Ruby-SDK/models/cart_item_supplier_references.rb
|
|
159
160
|
- lib/PCP-server-Ruby-SDK/models/checkout_references.rb
|
|
160
161
|
- lib/PCP-server-Ruby-SDK/models/checkout_response.rb
|
|
161
162
|
- lib/PCP-server-Ruby-SDK/models/checkouts_response.rb
|
|
@@ -185,14 +186,16 @@ files:
|
|
|
185
186
|
- lib/PCP-server-Ruby-SDK/models/extended_checkout_status.rb
|
|
186
187
|
- lib/PCP-server-Ruby-SDK/models/financing_payment_method_specific_input.rb
|
|
187
188
|
- lib/PCP-server-Ruby-SDK/models/financing_payment_method_specific_output.rb
|
|
189
|
+
- lib/PCP-server-Ruby-SDK/models/fund_distribution.rb
|
|
190
|
+
- lib/PCP-server-Ruby-SDK/models/fund_split.rb
|
|
188
191
|
- lib/PCP-server-Ruby-SDK/models/installment_option.rb
|
|
189
192
|
- lib/PCP-server-Ruby-SDK/models/link_information.rb
|
|
190
193
|
- lib/PCP-server-Ruby-SDK/models/mandate_recurrence_type.rb
|
|
191
194
|
- lib/PCP-server-Ruby-SDK/models/merchant_action.rb
|
|
192
195
|
- lib/PCP-server-Ruby-SDK/models/mobile_payment_method_specific_input.rb
|
|
193
196
|
- lib/PCP-server-Ruby-SDK/models/mobile_payment_method_specific_output.rb
|
|
197
|
+
- lib/PCP-server-Ruby-SDK/models/mobile_payment_network.rb
|
|
194
198
|
- lib/PCP-server-Ruby-SDK/models/mobile_payment_three_dsecure.rb
|
|
195
|
-
- lib/PCP-server-Ruby-SDK/models/network.rb
|
|
196
199
|
- lib/PCP-server-Ruby-SDK/models/order.rb
|
|
197
200
|
- lib/PCP-server-Ruby-SDK/models/order_item.rb
|
|
198
201
|
- lib/PCP-server-Ruby-SDK/models/order_line_details_input.rb
|
|
@@ -223,6 +226,7 @@ files:
|
|
|
223
226
|
- lib/PCP-server-Ruby-SDK/models/payment_product3391_specific_input.rb
|
|
224
227
|
- lib/PCP-server-Ruby-SDK/models/payment_product3391_specific_output.rb
|
|
225
228
|
- lib/PCP-server-Ruby-SDK/models/payment_product3392_specific_input.rb
|
|
229
|
+
- lib/PCP-server-Ruby-SDK/models/payment_product5002_specific_input.rb
|
|
226
230
|
- lib/PCP-server-Ruby-SDK/models/payment_product771_specific_output.rb
|
|
227
231
|
- lib/PCP-server-Ruby-SDK/models/payment_product840_customer_account.rb
|
|
228
232
|
- lib/PCP-server-Ruby-SDK/models/payment_product840_specific_output.rb
|
|
@@ -323,16 +327,16 @@ specification_version: 4
|
|
|
323
327
|
summary: Commerce Platform API Ruby Gem
|
|
324
328
|
test_files:
|
|
325
329
|
- spec/communicator_configuration_spec.rb
|
|
326
|
-
- spec/endpoints/payment_execution_api_client_spec.rb
|
|
327
330
|
- spec/endpoints/order_management_checkout_actions_api_client_spec.rb
|
|
328
|
-
- spec/endpoints/payment_information_api_client_spec.rb
|
|
329
331
|
- spec/endpoints/base_api_client_spec.rb
|
|
332
|
+
- spec/endpoints/payment_information_api_client_spec.rb
|
|
333
|
+
- spec/endpoints/payment_execution_api_client_spec.rb
|
|
330
334
|
- spec/endpoints/commerce_case_api_client_spec.rb
|
|
331
|
-
- spec/endpoints/authentication_api_client_spec.rb
|
|
332
335
|
- spec/endpoints/checkout_api_client_spec.rb
|
|
336
|
+
- spec/endpoints/authentication_api_client_spec.rb
|
|
337
|
+
- spec/errors/api_error_response_exception_spec.rb
|
|
333
338
|
- spec/errors/api_response_retrieval_exception_spec.rb
|
|
334
339
|
- spec/errors/api_exception_spec.rb
|
|
335
|
-
- spec/errors/api_error_response_exception_spec.rb
|
|
336
340
|
- spec/queries/get_checkouts_query_spec.rb
|
|
337
341
|
- spec/queries/get_commerce_cases_query_spec.rb
|
|
338
342
|
- spec/request_header_generator_spec.rb
|