pcp-server-ruby-sdk 1.3.1 → 1.5.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 +12 -0
- data/README.md +1 -1
- data/api-definition.yaml +955 -916
- data/example-app/example.rb +84 -0
- data/lib/PCP-server-Ruby-SDK/models/complete_payment_method_specific_input.rb +13 -4
- data/lib/PCP-server-Ruby-SDK/models/complete_payment_product840_specific_input.rb +232 -0
- data/lib/PCP-server-Ruby-SDK/models/complete_payment_request.rb +10 -1
- data/lib/PCP-server-Ruby-SDK/models/complete_redirect_payment_method_specific_input.rb +198 -0
- data/lib/PCP-server-Ruby-SDK/models/customer_device.rb +24 -4
- data/lib/PCP-server-Ruby-SDK/models/payment_product840_specific_output.rb +16 -6
- data/lib/PCP-server-Ruby-SDK/models/payment_type.rb +2 -1
- data/lib/PCP-server-Ruby-SDK/models/redirect_payment_method_specific_input.rb +14 -4
- data/lib/PCP-server-Ruby-SDK/models/redirect_payment_method_specific_output.rb +14 -4
- data/lib/PCP-server-Ruby-SDK/models/redirect_payment_product840_specific_input.rb +19 -6
- data/lib/PCP-server-Ruby-SDK/version.rb +1 -1
- data/lib/PCP-server-Ruby-SDK.rb +2 -0
- data/package-lock.json +411 -256
- data/package.json +1 -1
- data/scripts.sh +1 -1
- data/spec/endpoints/payment_execution_api_client_spec.rb +10 -1
- metadata +10 -8
data/package.json
CHANGED
data/scripts.sh
CHANGED
|
@@ -46,9 +46,9 @@ version() {
|
|
|
46
46
|
|
|
47
47
|
# Commit and tag the changes
|
|
48
48
|
git add $PACKAGE_JSON_PATH
|
|
49
|
-
git add $PACKAGE_LOCK_JSON_PATH
|
|
50
49
|
git add $VERSION_FILE_PATH
|
|
51
50
|
npm install
|
|
51
|
+
git add $PACKAGE_LOCK_JSON_PATH
|
|
52
52
|
npm run changelog
|
|
53
53
|
git add CHANGELOG.md
|
|
54
54
|
git tag -a v$NEW_VERSION -m "Version $NEW_VERSION"
|
|
@@ -217,7 +217,7 @@ RSpec.describe PCPServerSDK::Endpoints::PaymentExecutionApiClient do
|
|
|
217
217
|
end
|
|
218
218
|
|
|
219
219
|
describe '#complete_payment' do
|
|
220
|
-
let(:payload) {
|
|
220
|
+
let(:payload) { PCPServerSDK::Models::CompletePaymentRequest.new }
|
|
221
221
|
|
|
222
222
|
context 'when request is successful' do
|
|
223
223
|
let(:response) { double('Response', body: '{}', code: '200') }
|
|
@@ -228,6 +228,14 @@ RSpec.describe PCPServerSDK::Endpoints::PaymentExecutionApiClient do
|
|
|
228
228
|
end
|
|
229
229
|
|
|
230
230
|
it 'returns a successful response' do
|
|
231
|
+
redirect_input = PCPServerSDK::Models::CompleteRedirectPaymentMethodSpecificInput.new
|
|
232
|
+
product840_input = PCPServerSDK::Models::CompletePaymentProduct840SpecificInput.new
|
|
233
|
+
|
|
234
|
+
product840_input.java_script_sdk_flow = true
|
|
235
|
+
product840_input.action = 'CONFIRM_ORDER_STATUS'
|
|
236
|
+
redirect_input.payment_product840_specific_input = product840_input
|
|
237
|
+
payload.redirect_payment_method_specific_input = redirect_input
|
|
238
|
+
|
|
231
239
|
result = client.complete_payment('1', '2', '3', '4', payload)
|
|
232
240
|
expect(result).to eq(expected_response)
|
|
233
241
|
end
|
|
@@ -265,6 +273,7 @@ RSpec.describe PCPServerSDK::Endpoints::PaymentExecutionApiClient do
|
|
|
265
273
|
expect { client.complete_payment('1', '2', '3', nil, payload) }.to raise_error(TypeError, 'Payment Execution ID is required')
|
|
266
274
|
end
|
|
267
275
|
end
|
|
276
|
+
|
|
268
277
|
end
|
|
269
278
|
|
|
270
279
|
describe '#pause_payment' do
|
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.5.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: 2025-
|
|
11
|
+
date: 2025-12-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: net-http
|
|
@@ -163,8 +163,10 @@ files:
|
|
|
163
163
|
- lib/PCP-server-Ruby-SDK/models/company_information.rb
|
|
164
164
|
- lib/PCP-server-Ruby-SDK/models/complete_financing_payment_method_specific_input.rb
|
|
165
165
|
- lib/PCP-server-Ruby-SDK/models/complete_payment_method_specific_input.rb
|
|
166
|
+
- lib/PCP-server-Ruby-SDK/models/complete_payment_product840_specific_input.rb
|
|
166
167
|
- lib/PCP-server-Ruby-SDK/models/complete_payment_request.rb
|
|
167
168
|
- lib/PCP-server-Ruby-SDK/models/complete_payment_response.rb
|
|
169
|
+
- lib/PCP-server-Ruby-SDK/models/complete_redirect_payment_method_specific_input.rb
|
|
168
170
|
- lib/PCP-server-Ruby-SDK/models/contact_details.rb
|
|
169
171
|
- lib/PCP-server-Ruby-SDK/models/create_checkout_request.rb
|
|
170
172
|
- lib/PCP-server-Ruby-SDK/models/create_checkout_response.rb
|
|
@@ -321,16 +323,16 @@ specification_version: 4
|
|
|
321
323
|
summary: Commerce Platform API Ruby Gem
|
|
322
324
|
test_files:
|
|
323
325
|
- spec/communicator_configuration_spec.rb
|
|
324
|
-
- spec/endpoints/authentication_api_client_spec.rb
|
|
325
|
-
- spec/endpoints/commerce_case_api_client_spec.rb
|
|
326
326
|
- spec/endpoints/payment_execution_api_client_spec.rb
|
|
327
|
-
- spec/endpoints/
|
|
327
|
+
- spec/endpoints/order_management_checkout_actions_api_client_spec.rb
|
|
328
328
|
- spec/endpoints/payment_information_api_client_spec.rb
|
|
329
329
|
- spec/endpoints/base_api_client_spec.rb
|
|
330
|
-
- spec/endpoints/
|
|
331
|
-
- spec/
|
|
332
|
-
- spec/
|
|
330
|
+
- spec/endpoints/commerce_case_api_client_spec.rb
|
|
331
|
+
- spec/endpoints/authentication_api_client_spec.rb
|
|
332
|
+
- spec/endpoints/checkout_api_client_spec.rb
|
|
333
333
|
- spec/errors/api_response_retrieval_exception_spec.rb
|
|
334
|
+
- spec/errors/api_exception_spec.rb
|
|
335
|
+
- spec/errors/api_error_response_exception_spec.rb
|
|
334
336
|
- spec/queries/get_checkouts_query_spec.rb
|
|
335
337
|
- spec/queries/get_commerce_cases_query_spec.rb
|
|
336
338
|
- spec/request_header_generator_spec.rb
|