pcp-server-ruby-sdk 1.5.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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/Gemfile +1 -0
  4. data/api-definition.yaml +169 -18
  5. data/lib/PCP-server-Ruby-SDK/models/apple_payment_data_token_header_information.rb +2 -0
  6. data/lib/PCP-server-Ruby-SDK/models/apple_payment_data_token_information.rb +6 -0
  7. data/lib/PCP-server-Ruby-SDK/models/bank_account_information.rb +0 -2
  8. data/lib/PCP-server-Ruby-SDK/models/bank_payout_method_specific_input.rb +0 -4
  9. data/lib/PCP-server-Ruby-SDK/models/capture_payment_request.rb +13 -4
  10. data/lib/PCP-server-Ruby-SDK/models/capture_payment_response.rb +13 -4
  11. data/lib/PCP-server-Ruby-SDK/models/cart_item_input.rb +13 -4
  12. data/lib/PCP-server-Ruby-SDK/models/cart_item_patch.rb +13 -4
  13. data/lib/PCP-server-Ruby-SDK/models/cart_item_result.rb +13 -4
  14. data/lib/PCP-server-Ruby-SDK/models/cart_item_supplier_references.rb +200 -0
  15. data/lib/PCP-server-Ruby-SDK/models/complete_payment_product840_specific_input.rb +2 -0
  16. data/lib/PCP-server-Ruby-SDK/models/create_payment_response.rb +13 -4
  17. data/lib/PCP-server-Ruby-SDK/models/deliver_request.rb +12 -4
  18. data/lib/PCP-server-Ruby-SDK/models/fund_distribution.rb +272 -0
  19. data/lib/PCP-server-Ruby-SDK/models/fund_split.rb +211 -0
  20. data/lib/PCP-server-Ruby-SDK/models/mobile_payment_method_specific_input.rb +13 -4
  21. data/lib/PCP-server-Ruby-SDK/models/mobile_payment_method_specific_output.rb +1 -1
  22. data/lib/PCP-server-Ruby-SDK/models/{network.rb → mobile_payment_network.rb} +4 -4
  23. data/lib/PCP-server-Ruby-SDK/models/order_request.rb +12 -4
  24. data/lib/PCP-server-Ruby-SDK/models/pause_payment_request.rb +5 -38
  25. data/lib/PCP-server-Ruby-SDK/models/payment_execution.rb +15 -4
  26. data/lib/PCP-server-Ruby-SDK/models/payment_execution_specific_input.rb +13 -4
  27. data/lib/PCP-server-Ruby-SDK/models/payment_product302_specific_input.rb +1 -1
  28. data/lib/PCP-server-Ruby-SDK/models/payment_product5002_specific_input.rb +209 -0
  29. data/lib/PCP-server-Ruby-SDK/models/refund_payment_response.rb +12 -4
  30. data/lib/PCP-server-Ruby-SDK/models/refund_request.rb +13 -4
  31. data/lib/PCP-server-Ruby-SDK/models/return_request.rb +204 -191
  32. data/lib/PCP-server-Ruby-SDK/transformer/apple_pay_transformer.rb +2 -2
  33. data/lib/PCP-server-Ruby-SDK/version.rb +1 -1
  34. data/lib/PCP-server-Ruby-SDK.rb +5 -1
  35. data/package-lock.json +17 -18
  36. data/package.json +1 -1
  37. data/scripts.sh +2 -2
  38. data/spec/transformer/apple_pay_transformer_spec.rb +1 -1
  39. 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
- class ReturnRequest
7
- attr_accessor :return_type
8
-
9
- # Reason of the Refund (e.g. communicated by or to the consumer).
10
- attr_accessor :return_reason
11
-
12
- attr_accessor :return_items
13
-
14
- class EnumAttributeValidator
15
- attr_reader :datatype
16
- attr_reader :allowable_values
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
- def initialize(datatype, allowable_values)
19
- @allowable_values = allowable_values.map do |value|
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
- def valid?(value)
32
- !value || allowable_values.include?(value)
33
- end
34
- end
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
- # Attribute mapping from ruby-style variable name to JSON key.
37
- def self.attribute_map
38
- {
39
- :'return_type' => :'returnType',
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
- # Returns all the JSON keys this model knows about
46
- def self.acceptable_attributes
47
- attribute_map.values
48
- end
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
- # Attribute type mapping.
51
- def self.openapi_types
52
- {
53
- :'return_type' => :'ReturnType',
54
- :'return_reason' => :'String',
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
- # List of attributes with nullable: true
60
- def self.openapi_nullable
61
- Set.new([
62
- ])
63
- end
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
- # Initializes the object
66
- # @param [Hash] attributes Model attributes in the form of hash
67
- def initialize(attributes = {})
68
- if (!attributes.is_a?(Hash))
69
- fail ArgumentError, "The input argument (attributes) must be a hash in `ReturnRequest` initialize method"
70
- end
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
- # check to see if the attribute exists and convert string to symbol for hash key
73
- attributes = attributes.each_with_object({}) { |(k, v), h|
74
- if (!self.class.attribute_map.key?(k.to_sym))
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
- if attributes.key?(:'return_type')
81
- self.return_type = attributes[:'return_type']
82
- end
90
+ if attributes.key?(:'return_reason')
91
+ self.return_reason = attributes[:'return_reason']
92
+ end
83
93
 
84
- if attributes.key?(:'return_reason')
85
- self.return_reason = attributes[:'return_reason']
86
- end
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
- if attributes.key?(:'return_items')
89
- if (value = attributes[:'return_items']).is_a?(Array)
90
- self.return_items = value
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
- # Checks equality by comparing each attribute.
96
- # @param [Object] Object to be compared
97
- def ==(o)
98
- return true if self.equal?(o)
99
- self.class == o.class &&
100
- return_type == o.return_type &&
101
- return_reason == o.return_reason &&
102
- return_items == o.return_items
103
- end
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
- # @see the `==` method
106
- # @param [Object] Object to be compared
107
- def eql?(o)
108
- self == o
109
- end
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
110
121
 
111
- # Calculates hash code according to all attributes.
112
- # @return [Integer] Hash code
113
- def hash
114
- [return_type, return_reason, return_items].hash
115
- end
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
- # Builds the object from hash
118
- # @param [Hash] attributes Model attributes in the form of hash
119
- # @return [Object] Returns the model itself
120
- def self.build_from_hash(attributes)
121
- return nil unless attributes.is_a?(Hash)
122
- attributes = attributes.transform_keys(&:to_sym)
123
- transformed_hash = {}
124
- openapi_types.each_pair do |key, type|
125
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
- transformed_hash["#{key}"] = nil
127
- elsif type =~ /\AArray<(.*)>/i
128
- # check to ensure the input is an array given that the attribute
129
- # is documented as an array but the input is not
130
- if attributes[attribute_map[key]].is_a?(Array)
131
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
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
- elsif !attributes[attribute_map[key]].nil?
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
- # Deserializes the data based on type
141
- # @param string type Data type
142
- # @param string value Value to be deserialized
143
- # @return [Object] Deserialized data
144
- def self._deserialize(type, value)
145
- case type.to_sym
146
- when :Time
147
- Time.parse(value)
148
- when :Date
149
- Date.parse(value)
150
- when :String
151
- value.to_s
152
- when :Integer
153
- value.to_i
154
- when :Float
155
- value.to_f
156
- when :Boolean
157
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
- true
159
- else
160
- false
161
- end
162
- when :Object
163
- # generic object (usually a Hash), return directly
164
- value
165
- when /\AArray<(?<inner_type>.+)>\z/
166
- inner_type = Regexp.last_match[:inner_type]
167
- value.map { |v| _deserialize(inner_type, v) }
168
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
- k_type = Regexp.last_match[:k_type]
170
- v_type = Regexp.last_match[:v_type]
171
- {}.tap do |hash|
172
- value.each do |k, v|
173
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
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
- # to_body is an alias to to_hash (backward compatibility)
190
- # @return [Hash] Returns the object in the form of hash
191
- def to_body
192
- to_hash
193
- end
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
- # Returns the object in the form of hash
196
- # @return [Hash] Returns the object in the form of hash
197
- def to_hash
198
- hash = {}
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
- hash[param] = _to_hash(value)
207
- end
208
- hash
209
- end
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
- # Outputs non-array value in the form of hash
212
- # For object, use to_hash. Otherwise, just return the value
213
- # @param [Object] value Any valid value
214
- # @return [Hash] Returns the value in the form of hash
215
- def _to_hash(value)
216
- if value.is_a?(Array)
217
- value.compact.map { |v| _to_hash(v) }
218
- elsif value.is_a?(Hash)
219
- {}.tap do |hash|
220
- value.each { |k, v| hash[k] = _to_hash(v) }
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/network'
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::Network.from_string(payment_method.network.to_s),
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,
@@ -1,4 +1,4 @@
1
1
 
2
2
  module PCPServerSDK
3
- VERSION = '1.5.0'
3
+ VERSION = '1.7.0'
4
4
  end
@@ -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/network'
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.5.0",
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.5.0",
9
+ "version": "1.7.0",
10
10
  "devDependencies": {
11
11
  "@commitlint/cli": "19.4.0",
12
12
  "@commitlint/config-conventional": "19.2.2",
@@ -15,13 +15,13 @@
15
15
  }
16
16
  },
17
17
  "node_modules/@babel/code-frame": {
18
- "version": "7.27.1",
19
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
20
- "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
18
+ "version": "7.29.0",
19
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz",
20
+ "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==",
21
21
  "dev": true,
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@babel/helper-validator-identifier": "^7.27.1",
24
+ "@babel/helper-validator-identifier": "^7.28.5",
25
25
  "js-tokens": "^4.0.0",
26
26
  "picocolors": "^1.1.1"
27
27
  },
@@ -317,7 +317,7 @@
317
317
  }
318
318
  },
319
319
  "node_modules/@types/node": {
320
- "version": "1.5.0",
320
+ "version": "1.6.0",
321
321
  "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.1.tgz",
322
322
  "integrity": "sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw==",
323
323
  "dev": true,
@@ -341,7 +341,7 @@
341
341
  "license": "MIT"
342
342
  },
343
343
  "node_modules/add-stream": {
344
- "version": "1.5.0",
344
+ "version": "1.6.0",
345
345
  "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz",
346
346
  "integrity": "sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==",
347
347
  "dev": true
@@ -397,7 +397,7 @@
397
397
  "license": "Python-2.0"
398
398
  },
399
399
  "node_modules/array-ify": {
400
- "version": "1.5.0",
400
+ "version": "1.6.0",
401
401
  "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz",
402
402
  "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==",
403
403
  "dev": true
@@ -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
  }
@@ -1192,7 +1191,7 @@
1192
1191
  }
1193
1192
  },
1194
1193
  "node_modules/index-to-position": {
1195
- "version": "1.5.0",
1194
+ "version": "1.6.0",
1196
1195
  "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-0.1.2.tgz",
1197
1196
  "integrity": "sha512-MWDKS3AS1bGCHLBA2VLImJz42f7bJh8wQsTGCzI3j519/CASStoDONUBVz2I/VID0MpiX3SGSnbOD2xUalbE5g==",
1198
1197
  "dev": true,
@@ -1214,7 +1213,7 @@
1214
1213
  }
1215
1214
  },
1216
1215
  "node_modules/is-arrayish": {
1217
- "version": "1.5.0",
1216
+ "version": "1.6.0",
1218
1217
  "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
1219
1218
  "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
1220
1219
  "dev": true
@@ -1310,7 +1309,7 @@
1310
1309
  "license": "MIT"
1311
1310
  },
1312
1311
  "node_modules/json-schema-traverse": {
1313
- "version": "1.5.0",
1312
+ "version": "1.6.0",
1314
1313
  "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
1315
1314
  "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
1316
1315
  "dev": true
@@ -1632,7 +1631,7 @@
1632
1631
  }
1633
1632
  },
1634
1633
  "node_modules/minimist": {
1635
- "version": "1.5.0",
1634
+ "version": "1.6.0",
1636
1635
  "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
1637
1636
  "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
1638
1637
  "dev": true,
@@ -1792,7 +1791,7 @@
1792
1791
  }
1793
1792
  },
1794
1793
  "node_modules/picocolors": {
1795
- "version": "1.5.0",
1794
+ "version": "1.6.0",
1796
1795
  "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
1797
1796
  "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
1798
1797
  "dev": true
@@ -2135,7 +2134,7 @@
2135
2134
  "license": "MIT"
2136
2135
  },
2137
2136
  "node_modules/unicorn-magic": {
2138
- "version": "1.5.0",
2137
+ "version": "1.6.0",
2139
2138
  "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz",
2140
2139
  "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==",
2141
2140
  "dev": true,
@@ -2174,7 +2173,7 @@
2174
2173
  }
2175
2174
  },
2176
2175
  "node_modules/wordwrap": {
2177
- "version": "1.5.0",
2176
+ "version": "1.6.0",
2178
2177
  "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
2179
2178
  "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==",
2180
2179
  "dev": true
@@ -2237,7 +2236,7 @@
2237
2236
  }
2238
2237
  },
2239
2238
  "node_modules/yocto-queue": {
2240
- "version": "1.5.0",
2239
+ "version": "1.6.0",
2241
2240
  "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz",
2242
2241
  "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==",
2243
2242
  "dev": true,
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcp-serversdk-ruby",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "type": "commonjs",
5
5
  "scripts": {
6
6
  "changelog": "conventional-changelog -i CHANGELOG.md -s --config ./changelog.config.js"
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
- sed -i "" "s/\"version\": \".*\"/\"version\": \"$NEW_VERSION\"/" ${PACKAGE_JSON_PATH}
45
- sed -i "" "s/\"version\": \".*\"/\"version\": \"$NEW_VERSION\"/" ${PACKAGE_LOCK_JSON_PATH}
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