pcp-server-ruby-sdk 1.14.0 → 1.15.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/README.md +1 -1
- data/api-definition.yaml +56 -9
- data/lib/PCP-server-Ruby-SDK/endpoints/payment_intent_api_client.rb +14 -1
- data/lib/PCP-server-Ruby-SDK/models/patch_payment_intent_request.rb +10 -0
- data/lib/PCP-server-Ruby-SDK/models/patch_payment_intent_response.rb +11 -0
- data/lib/PCP-server-Ruby-SDK/models/redirect_payment_method_specific_output_for_create_intent.rb +1 -1
- data/lib/PCP-server-Ruby-SDK/version.rb +1 -1
- data/lib/PCP-server-Ruby-SDK.rb +2 -0
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/spec/endpoints/payment_intent_api_client_spec.rb +32 -1
- data/spec/models/api_definition_conformance_spec.rb +28 -0
- data/spec/models/payment_intent_models_spec.rb +42 -0
- metadata +14 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a779b55f0ba292acb462e86972bee172c0dbe1194127ea000d34cd04fbc78b7f
|
|
4
|
+
data.tar.gz: 715810d8be9a4d671e5322141126d63d7b1591160bea3d237e5f8781f6ca7144
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70248e428268925ee8d1d7c8d870a39a8767c55d8f7496bfb8c2428572fa2db5cf1411245d6ebf49ce980ac935c0fce98f37f56393f9be68c81f7ad70e3ddd0e
|
|
7
|
+
data.tar.gz: b218b8c61b79382c2bb07547f69b0c25de92cca20a38c6b590eff23b2451eee39ffa48cd6ae5085c3fdc87ceafe8dc875d1503fe4c59443ae0e6a31fabc38fc2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
# [1.15.0](https://github.com/PAYONE-GmbH/PCP-ServerSDK-ruby/compare/v1.14.0...v1.15.0) (2026-09-30)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* feat: update API version to 1.71.0 ([2b215c238a54b39f550be522571fadd981a76a65](https://github.com/PAYONE-GmbH/PCP-ServerSDK-ruby/commit/2b215c238a54b39f550be522571fadd981a76a65))
|
|
6
|
+
|
|
1
7
|
# [1.14.0](https://github.com/PAYONE-GmbH/PCP-ServerSDK-ruby/compare/v1.13.0...v1.14.0) (2026-09-21)
|
|
2
8
|
|
|
3
9
|
### Features
|
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|

|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
Welcome to the Ruby SDK for the PAYONE Commerce Platform (api-version 1.
|
|
9
|
+
Welcome to the Ruby SDK for the PAYONE Commerce Platform (api-version 1.71.0)! This repository contains a powerful, easy-to-use software development kit (SDK) designed to simplify the integration of online payment processing into your applications.
|
|
10
10
|
|
|
11
11
|
## Requirements
|
|
12
12
|
|
data/api-definition.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: "3.0.3"
|
|
2
2
|
|
|
3
3
|
info:
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.71.0
|
|
5
5
|
title: "Commerce Platform API"
|
|
6
6
|
description: |
|
|
7
7
|
RESTful API for the creation of Commerce Cases with Checkouts and the execution of Payments.
|
|
@@ -1590,7 +1590,7 @@ paths:
|
|
|
1590
1590
|
responses:
|
|
1591
1591
|
'201':
|
|
1592
1592
|
x-nullable: true
|
|
1593
|
-
description: The response contains the
|
|
1593
|
+
description: The response contains the created Payment Intent, including its reference.
|
|
1594
1594
|
content:
|
|
1595
1595
|
application/json:
|
|
1596
1596
|
schema:
|
|
@@ -1637,7 +1637,7 @@ paths:
|
|
|
1637
1637
|
responses:
|
|
1638
1638
|
'200':
|
|
1639
1639
|
x-nullable: true
|
|
1640
|
-
description: The response contains the
|
|
1640
|
+
description: The response contains the Payment Intent.
|
|
1641
1641
|
content:
|
|
1642
1642
|
application/json:
|
|
1643
1643
|
schema:
|
|
@@ -1649,6 +1649,37 @@ paths:
|
|
|
1649
1649
|
application/json:
|
|
1650
1650
|
schema:
|
|
1651
1651
|
$ref: '#/components/schemas/ErrorResponse'
|
|
1652
|
+
patch:
|
|
1653
|
+
summary: Update a Payment Intent
|
|
1654
|
+
description: |-
|
|
1655
|
+
This endpoint can be used to update the shopping cart and amount of money of a payment intent.
|
|
1656
|
+
tags:
|
|
1657
|
+
- PaymentIntent
|
|
1658
|
+
operationId: patchPaymentIntent
|
|
1659
|
+
parameters:
|
|
1660
|
+
- $ref: '#/components/parameters/merchantIdPath'
|
|
1661
|
+
- $ref: '#/components/parameters/paymentIntentId'
|
|
1662
|
+
requestBody:
|
|
1663
|
+
required: true
|
|
1664
|
+
content:
|
|
1665
|
+
application/json:
|
|
1666
|
+
schema:
|
|
1667
|
+
$ref: '#/components/schemas/PatchPaymentIntentRequest'
|
|
1668
|
+
responses:
|
|
1669
|
+
'200':
|
|
1670
|
+
x-nullable: true
|
|
1671
|
+
description: The response contains the updated Payment Intent.
|
|
1672
|
+
content:
|
|
1673
|
+
application/json:
|
|
1674
|
+
schema:
|
|
1675
|
+
$ref: '#/components/schemas/PatchPaymentIntentResponse'
|
|
1676
|
+
'404':
|
|
1677
|
+
x-nullable: true
|
|
1678
|
+
description: Payment not found
|
|
1679
|
+
content:
|
|
1680
|
+
application/json:
|
|
1681
|
+
schema:
|
|
1682
|
+
$ref: '#/components/schemas/ErrorResponse'
|
|
1652
1683
|
|
|
1653
1684
|
components:
|
|
1654
1685
|
parameters:
|
|
@@ -1719,7 +1750,6 @@ components:
|
|
|
1719
1750
|
Format YYYYMMDD
|
|
1720
1751
|
schema:
|
|
1721
1752
|
type: string
|
|
1722
|
-
maxLength: 8
|
|
1723
1753
|
pattern: ^((19|20|21)\d{6})?$
|
|
1724
1754
|
example: 20041101
|
|
1725
1755
|
email:
|
|
@@ -4116,6 +4146,24 @@ components:
|
|
|
4116
4146
|
properties:
|
|
4117
4147
|
customer:
|
|
4118
4148
|
$ref: '#/components/schemas/Customer'
|
|
4149
|
+
PatchPaymentIntentRequest:
|
|
4150
|
+
title: PaymentIntentRequest
|
|
4151
|
+
type: object
|
|
4152
|
+
description: |
|
|
4153
|
+
Object containing details for updating a payment intent.
|
|
4154
|
+
additionalProperties: false
|
|
4155
|
+
properties:
|
|
4156
|
+
amountOfMoney:
|
|
4157
|
+
$ref: '#/components/schemas/AmountOfMoney'
|
|
4158
|
+
shoppingCart:
|
|
4159
|
+
$ref: '#/components/schemas/ShoppingCartData'
|
|
4160
|
+
PatchPaymentIntentResponse:
|
|
4161
|
+
title: PaymentIntentResponse
|
|
4162
|
+
type: object
|
|
4163
|
+
description: Object containing details on the updated payment intent.
|
|
4164
|
+
additionalProperties: false
|
|
4165
|
+
allOf:
|
|
4166
|
+
- $ref: '#/components/schemas/CreatePaymentIntentResponse'
|
|
4119
4167
|
PausePaymentRequest:
|
|
4120
4168
|
type: object
|
|
4121
4169
|
description: Request to pause a payment for a specific payment method.
|
|
@@ -4870,7 +4918,6 @@ components:
|
|
|
4870
4918
|
description: |-
|
|
4871
4919
|
The date of birth of the customer of the recipient of the loan.
|
|
4872
4920
|
Format YYYYMMDD
|
|
4873
|
-
maxLength: 8
|
|
4874
4921
|
pattern: ^((19|20|21)\d{6})?$
|
|
4875
4922
|
gender:
|
|
4876
4923
|
type: string
|
|
@@ -4985,7 +5032,7 @@ components:
|
|
|
4985
5032
|
redirectURL:
|
|
4986
5033
|
type: string
|
|
4987
5034
|
description: The URL that the customer should be redirected to. Be sure to redirect using the GET method
|
|
4988
|
-
example: https://example-
|
|
5035
|
+
example: https://example-redirect-url.com
|
|
4989
5036
|
RedirectionData:
|
|
4990
5037
|
type: object
|
|
4991
5038
|
description: Object containing browser specific redirection related data.
|
|
@@ -5090,8 +5137,8 @@ components:
|
|
|
5090
5137
|
$ref: '#/components/schemas/PaymentProductId'
|
|
5091
5138
|
paymentProduct840SpecificOutput:
|
|
5092
5139
|
$ref: '#/components/schemas/RedirectPaymentProduct840SpecificInputData'
|
|
5093
|
-
|
|
5094
|
-
$ref: '#/components/schemas/
|
|
5140
|
+
redirectData:
|
|
5141
|
+
$ref: '#/components/schemas/RedirectData'
|
|
5095
5142
|
RedirectPaymentMethodSpecificOutputForIntent:
|
|
5096
5143
|
title: redirectPaymentMethodSpecificOutput
|
|
5097
5144
|
type: object
|
|
@@ -5860,4 +5907,4 @@ components:
|
|
|
5860
5907
|
type: string
|
|
5861
5908
|
format: date-time
|
|
5862
5909
|
description: The expiration date of the JWT authentication token. Format YYYY-MM-DD'T'HH:mm:ss'Z'
|
|
5863
|
-
example: "2024-01-01T00:00:00.000Z"
|
|
5910
|
+
example: "2024-01-01T00:00:00.000Z"
|
|
@@ -4,6 +4,7 @@ require_relative 'base_api_client'
|
|
|
4
4
|
require_relative '../models/create_payment_intent_response'
|
|
5
5
|
require_relative '../models/payment_intent_output'
|
|
6
6
|
require_relative '../models/payment_intent_response'
|
|
7
|
+
require_relative '../models/patch_payment_intent_response'
|
|
7
8
|
require_relative '../models/payment_product840_specific_output_for_intent'
|
|
8
9
|
require_relative '../models/redirect_payment_method_specific_output_for_create_intent'
|
|
9
10
|
require_relative '../models/redirect_payment_method_specific_output_for_intent'
|
|
@@ -20,7 +21,8 @@ module PCPServerSDK
|
|
|
20
21
|
raise TypeError, PAYLOAD_REQUIRED_ERROR if payload.nil?
|
|
21
22
|
|
|
22
23
|
response = make_api_call(URI.join(get_config.host, "/v1/#{merchant_id}/payment-intents").to_s,
|
|
23
|
-
|
|
24
|
+
method: 'POST', headers: { 'Content-Type' => 'application/json' },
|
|
25
|
+
body: JSON.generate(payload.respond_to?(:to_hash) ? payload.to_hash : payload))
|
|
24
26
|
deserialize_json(response, PCPServerSDK::Models::CreatePaymentIntentResponse)
|
|
25
27
|
end
|
|
26
28
|
|
|
@@ -32,6 +34,17 @@ module PCPServerSDK
|
|
|
32
34
|
method: 'GET', headers: {})
|
|
33
35
|
deserialize_json(response, PCPServerSDK::Models::PaymentIntentResponse)
|
|
34
36
|
end
|
|
37
|
+
|
|
38
|
+
def patch_payment_intent(merchant_id, payment_intent_id, payload)
|
|
39
|
+
raise TypeError, MERCHANT_ID_REQUIRED_ERROR if merchant_id.nil? || merchant_id.empty?
|
|
40
|
+
raise TypeError, PAYMENT_INTENT_ID_REQUIRED_ERROR if payment_intent_id.nil? || payment_intent_id.empty?
|
|
41
|
+
raise TypeError, PAYLOAD_REQUIRED_ERROR if payload.nil?
|
|
42
|
+
|
|
43
|
+
response = make_api_call(URI.join(get_config.host, "/v1/#{merchant_id}/payment-intents/#{payment_intent_id}").to_s,
|
|
44
|
+
method: 'PATCH', headers: { 'Content-Type' => 'application/json' },
|
|
45
|
+
body: JSON.generate(payload.respond_to?(:to_hash) ? payload.to_hash : payload))
|
|
46
|
+
deserialize_json(response, PCPServerSDK::Models::PatchPaymentIntentResponse)
|
|
47
|
+
end
|
|
35
48
|
end
|
|
36
49
|
end
|
|
37
50
|
end
|
data/lib/PCP-server-Ruby-SDK/models/redirect_payment_method_specific_output_for_create_intent.rb
CHANGED
|
@@ -6,7 +6,7 @@ module PCPServerSDK
|
|
|
6
6
|
attribute :requires_approval, :requiresApproval, :Boolean
|
|
7
7
|
attribute :payment_product_id, :paymentProductId, :Integer
|
|
8
8
|
attribute :payment_product840_specific_output, :paymentProduct840SpecificOutput, :RedirectPaymentProduct840SpecificInputData
|
|
9
|
-
attribute :
|
|
9
|
+
attribute :redirect_data, :redirectData, :RedirectData
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
end
|
data/lib/PCP-server-Ruby-SDK.rb
CHANGED
|
@@ -124,6 +124,8 @@ require_relative 'PCP-server-Ruby-SDK/models/create_pay_by_link_response'
|
|
|
124
124
|
require_relative 'PCP-server-Ruby-SDK/models/payment_intent_response_data'
|
|
125
125
|
require_relative 'PCP-server-Ruby-SDK/models/payment_intent_output'
|
|
126
126
|
require_relative 'PCP-server-Ruby-SDK/models/payment_intent_response'
|
|
127
|
+
require_relative 'PCP-server-Ruby-SDK/models/patch_payment_intent_request'
|
|
128
|
+
require_relative 'PCP-server-Ruby-SDK/models/patch_payment_intent_response'
|
|
127
129
|
require_relative 'PCP-server-Ruby-SDK/models/payment_method_specific_input_for_intent'
|
|
128
130
|
require_relative 'PCP-server-Ruby-SDK/models/payment_product840_specific_output_for_intent'
|
|
129
131
|
require_relative 'PCP-server-Ruby-SDK/models/redirect_payment_method_specific_input_for_intent'
|
data/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pcp-serversdk-ruby",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.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.15.0",
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@commitlint/cli": "19.4.0",
|
|
12
12
|
"@commitlint/config-conventional": "19.2.2",
|
data/package.json
CHANGED
|
@@ -12,7 +12,11 @@ RSpec.describe PCPServerSDK::Endpoints::PaymentIntentApiClient do
|
|
|
12
12
|
references: PCPServerSDK::Models::PaymentReferencesForPaymentIntent.new(merchant_reference: 'order-123')
|
|
13
13
|
)
|
|
14
14
|
response = double('Response', body: '{"paymentIntentOutput":{"paymentIntentId":"intent-1"}}', code: '201')
|
|
15
|
-
allow(client).to receive(:get_response)
|
|
15
|
+
allow(client).to receive(:get_response) do |_http, request|
|
|
16
|
+
expect(request).to be_a(Net::HTTP::Post)
|
|
17
|
+
expect(JSON.parse(request.body)).to eq('references' => { 'merchantReference' => 'order-123' })
|
|
18
|
+
response
|
|
19
|
+
end
|
|
16
20
|
|
|
17
21
|
result = client.create_payment_intent('merchant-1', payload)
|
|
18
22
|
|
|
@@ -42,4 +46,31 @@ RSpec.describe PCPServerSDK::Endpoints::PaymentIntentApiClient do
|
|
|
42
46
|
expect { client.get_payment_intent('merchant-1', nil) }.to raise_error(TypeError, 'Payment Intent ID is required')
|
|
43
47
|
end
|
|
44
48
|
end
|
|
49
|
+
|
|
50
|
+
describe '#patch_payment_intent' do
|
|
51
|
+
it 'patches the payment intent with a JSON body and deserializes the response' do
|
|
52
|
+
payload = PCPServerSDK::Models::PatchPaymentIntentRequest.new(
|
|
53
|
+
amount_of_money: PCPServerSDK::Models::AmountOfMoney.new(amount: 1500, currency_code: 'EUR')
|
|
54
|
+
)
|
|
55
|
+
response = double('Response', body: '{"paymentIntentOutput":{"paymentIntentId":"intent-1"}}', code: '200')
|
|
56
|
+
allow(client).to receive(:get_response) do |_http, request|
|
|
57
|
+
expect(request).to be_a(Net::HTTP::Patch)
|
|
58
|
+
expect(request.path).to eq('/v1/merchant-1/payment-intents/intent-1')
|
|
59
|
+
expect(request['Content-Type']).to eq('application/json')
|
|
60
|
+
expect(JSON.parse(request.body)).to eq('amountOfMoney' => { 'amount' => 1500, 'currencyCode' => 'EUR' })
|
|
61
|
+
response
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
result = client.patch_payment_intent('merchant-1', 'intent-1', payload)
|
|
65
|
+
|
|
66
|
+
expect(result).to be_a(PCPServerSDK::Models::PatchPaymentIntentResponse)
|
|
67
|
+
expect(result.payment_intent_output.payment_intent_id).to eq('intent-1')
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
it 'validates merchant ID, payment intent ID, and payload' do
|
|
71
|
+
expect { client.patch_payment_intent(nil, 'intent-1', {}) }.to raise_error(TypeError, 'Merchant ID is required')
|
|
72
|
+
expect { client.patch_payment_intent('merchant-1', nil, {}) }.to raise_error(TypeError, 'Payment Intent ID is required')
|
|
73
|
+
expect { client.patch_payment_intent('merchant-1', 'intent-1', nil) }.to raise_error(TypeError, 'Payload is required')
|
|
74
|
+
end
|
|
75
|
+
end
|
|
45
76
|
end
|
|
@@ -44,6 +44,34 @@ RSpec.describe 'OpenAPI model conformance' do
|
|
|
44
44
|
expect(mismatches).to be_empty
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
it 'uses the referenced object model for every object-valued schema property' do
|
|
48
|
+
mismatches = schemas.flat_map do |name, schema|
|
|
49
|
+
next [] unless schema['type'] == 'object'
|
|
50
|
+
|
|
51
|
+
model = PCPServerSDK::Models.const_get(name)
|
|
52
|
+
schema_properties_with_definitions(schema).filter_map do |property, definition|
|
|
53
|
+
reference = definition['$ref'] || definition.dig('items', '$ref')
|
|
54
|
+
next unless reference
|
|
55
|
+
|
|
56
|
+
referenced_name = reference.split('/').last
|
|
57
|
+
next unless schemas.fetch(referenced_name)['type'] == 'object'
|
|
58
|
+
|
|
59
|
+
expected = definition['type'] == 'array' ? "Array<#{referenced_name}>" : referenced_name
|
|
60
|
+
actual = model.openapi_types.fetch(model.attribute_map.key(property.to_sym)).to_s
|
|
61
|
+
"#{name}.#{property}: expected #{expected}, got #{actual}" unless actual == expected
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
expect(mismatches).to be_empty
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def schema_properties_with_definitions(schema)
|
|
69
|
+
inherited = Array(schema['allOf']).each_with_object({}) do |parent, result|
|
|
70
|
+
result.merge!(schema_properties_with_definitions(parent['$ref'] ? schemas.fetch(parent['$ref'].split('/').last) : parent))
|
|
71
|
+
end
|
|
72
|
+
inherited.merge(schema.fetch('properties', {}))
|
|
73
|
+
end
|
|
74
|
+
|
|
47
75
|
it 'declares each direct allOf parent' do
|
|
48
76
|
mismatches = schemas.filter_map do |name, schema|
|
|
49
77
|
expected = Array(schema['allOf']).filter_map { |parent| parent['$ref']&.split('/')&.last }.sort
|
|
@@ -48,4 +48,46 @@ RSpec.describe 'Payment intent models' do
|
|
|
48
48
|
expect(output.customer_account).to be_a(PCPServerSDK::Models::PaymentProduct840CustomerAccount)
|
|
49
49
|
expect(output.customer_account.payer_id).to eq('payer-123')
|
|
50
50
|
end
|
|
51
|
+
|
|
52
|
+
it 'serializes the patch request with the updated amount and shopping cart' do
|
|
53
|
+
request = PCPServerSDK::Models::PatchPaymentIntentRequest.build_from_hash(
|
|
54
|
+
'amountOfMoney' => { 'amount' => 1500, 'currencyCode' => 'EUR' },
|
|
55
|
+
'shoppingCart' => { 'items' => [{ 'invoiceData' => { 'description' => 'Updated item' } }] }
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
expect(request.amount_of_money).to be_a(PCPServerSDK::Models::AmountOfMoney)
|
|
59
|
+
expect(request.shopping_cart.items.first).to be_a(PCPServerSDK::Models::CartItemData)
|
|
60
|
+
expect(request.to_hash).to eq(
|
|
61
|
+
amountOfMoney: { amount: 1500, currencyCode: 'EUR' },
|
|
62
|
+
shoppingCart: { items: [{ invoiceData: { description: 'Updated item' } }] }
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
it 'deserializes the patch response using the create response structure' do
|
|
67
|
+
response = PCPServerSDK::Models::PatchPaymentIntentResponse.build_from_hash(
|
|
68
|
+
'paymentIntentOutput' => { 'paymentIntentId' => 'intent-1' },
|
|
69
|
+
'shoppingCart' => { 'items' => [] }
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
expect(response).to be_a(PCPServerSDK::Models::CreatePaymentIntentResponse)
|
|
73
|
+
expect(response.payment_intent_output.payment_intent_id).to eq('intent-1')
|
|
74
|
+
expect(response.shopping_cart).to be_a(PCPServerSDK::Models::ShoppingCartData)
|
|
75
|
+
expect(response.to_hash.dig(:paymentIntentOutput, :paymentIntentId)).to eq('intent-1')
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
it 'uses redirectData in created payment intent output' do
|
|
79
|
+
response = PCPServerSDK::Models::CreatePaymentIntentResponse.build_from_hash(
|
|
80
|
+
'paymentIntentOutput' => {
|
|
81
|
+
'redirectPaymentMethodSpecificOutput' => {
|
|
82
|
+
'redirectData' => { 'redirectURL' => 'https://example.com/redirect' }
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
redirect_output = response.payment_intent_output.redirect_payment_method_specific_output
|
|
87
|
+
|
|
88
|
+
expect(redirect_output.redirect_data).to be_a(PCPServerSDK::Models::RedirectData)
|
|
89
|
+
expect(redirect_output.redirect_data.redirect_url).to eq('https://example.com/redirect')
|
|
90
|
+
expect(response.to_hash.dig(:paymentIntentOutput, :redirectPaymentMethodSpecificOutput, :redirectData))
|
|
91
|
+
.to eq(redirectURL: 'https://example.com/redirect')
|
|
92
|
+
end
|
|
51
93
|
end
|
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.15.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-09-
|
|
11
|
+
date: 2026-09-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: net-http
|
|
@@ -216,6 +216,8 @@ files:
|
|
|
216
216
|
- lib/PCP-server-Ruby-SDK/models/order_type.rb
|
|
217
217
|
- lib/PCP-server-Ruby-SDK/models/patch_checkout_request.rb
|
|
218
218
|
- lib/PCP-server-Ruby-SDK/models/patch_commerce_case_request.rb
|
|
219
|
+
- lib/PCP-server-Ruby-SDK/models/patch_payment_intent_request.rb
|
|
220
|
+
- lib/PCP-server-Ruby-SDK/models/patch_payment_intent_response.rb
|
|
219
221
|
- lib/PCP-server-Ruby-SDK/models/pause_payment_request.rb
|
|
220
222
|
- lib/PCP-server-Ruby-SDK/models/pause_payment_response.rb
|
|
221
223
|
- lib/PCP-server-Ruby-SDK/models/pay_link_status_value.rb
|
|
@@ -364,25 +366,25 @@ specification_version: 4
|
|
|
364
366
|
summary: Commerce Platform API Ruby Gem
|
|
365
367
|
test_files:
|
|
366
368
|
- spec/communicator_configuration_spec.rb
|
|
367
|
-
- spec/endpoints/checkout_api_client_spec.rb
|
|
368
|
-
- spec/endpoints/payment_execution_api_client_spec.rb
|
|
369
|
-
- spec/endpoints/pay_by_link_api_client_spec.rb
|
|
370
369
|
- spec/endpoints/base_api_client_spec.rb
|
|
371
|
-
- spec/endpoints/
|
|
370
|
+
- spec/endpoints/commerce_case_api_client_spec.rb
|
|
372
371
|
- spec/endpoints/payment_information_api_client_spec.rb
|
|
372
|
+
- spec/endpoints/order_management_checkout_actions_api_client_spec.rb
|
|
373
|
+
- spec/endpoints/pay_by_link_api_client_spec.rb
|
|
373
374
|
- spec/endpoints/authentication_api_client_spec.rb
|
|
374
375
|
- spec/endpoints/payment_intent_api_client_spec.rb
|
|
375
|
-
- spec/endpoints/
|
|
376
|
-
- spec/
|
|
376
|
+
- spec/endpoints/payment_execution_api_client_spec.rb
|
|
377
|
+
- spec/endpoints/checkout_api_client_spec.rb
|
|
377
378
|
- spec/errors/api_response_retrieval_exception_spec.rb
|
|
378
379
|
- spec/errors/api_error_response_exception_spec.rb
|
|
379
|
-
- spec/
|
|
380
|
+
- spec/errors/api_exception_spec.rb
|
|
380
381
|
- spec/models/required_field_validation_spec.rb
|
|
381
|
-
- spec/models/pay_by_link_models_spec.rb
|
|
382
|
-
- spec/models/payment_intent_models_spec.rb
|
|
383
382
|
- spec/models/api_definition_conformance_spec.rb
|
|
384
|
-
- spec/
|
|
383
|
+
- spec/models/payment_intent_models_spec.rb
|
|
384
|
+
- spec/models/model_base_spec.rb
|
|
385
|
+
- spec/models/pay_by_link_models_spec.rb
|
|
385
386
|
- spec/queries/get_commerce_cases_query_spec.rb
|
|
387
|
+
- spec/queries/get_checkouts_query_spec.rb
|
|
386
388
|
- spec/request_header_generator_spec.rb
|
|
387
389
|
- spec/spec_helper.rb
|
|
388
390
|
- spec/transformer/apple_pay_transformer_spec.rb
|