pcp-server-ruby-sdk 1.10.0 → 1.12.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.
@@ -11,6 +11,8 @@ module PCPServerSDK
11
11
  # If left empty, the remaining open amount will be cancelled.
12
12
  attr_accessor :amount
13
13
 
14
+ attr_accessor :fund_split
15
+
14
16
  class EnumAttributeValidator
15
17
  attr_reader :datatype
16
18
  attr_reader :allowable_values
@@ -37,7 +39,8 @@ module PCPServerSDK
37
39
  def self.attribute_map
38
40
  {
39
41
  :'cancellation_reason' => :'cancellationReason',
40
- :'amount' => :'amount'
42
+ :'amount' => :'amount',
43
+ :'fund_split' => :'fundSplit'
41
44
  }
42
45
  end
43
46
 
@@ -50,7 +53,8 @@ module PCPServerSDK
50
53
  def self.openapi_types
51
54
  {
52
55
  :'cancellation_reason' => :'CancellationReason',
53
- :'amount' => :'Integer'
56
+ :'amount' => :'Integer',
57
+ :'fund_split' => :'FundSplit'
54
58
  }
55
59
  end
56
60
 
@@ -82,6 +86,10 @@ module PCPServerSDK
82
86
  if attributes.key?(:'amount')
83
87
  self.amount = attributes[:'amount']
84
88
  end
89
+
90
+ if attributes.key?(:'fund_split')
91
+ self.fund_split = attributes[:'fund_split']
92
+ end
85
93
  end
86
94
 
87
95
  # Checks equality by comparing each attribute.
@@ -90,7 +98,8 @@ module PCPServerSDK
90
98
  return true if self.equal?(o)
91
99
  self.class == o.class &&
92
100
  cancellation_reason == o.cancellation_reason &&
93
- amount == o.amount
101
+ amount == o.amount &&
102
+ fund_split == o.fund_split
94
103
  end
95
104
 
96
105
  # @see the `==` method
@@ -102,7 +111,7 @@ module PCPServerSDK
102
111
  # Calculates hash code according to all attributes.
103
112
  # @return [Integer] Hash code
104
113
  def hash
105
- [cancellation_reason, amount].hash
114
+ [cancellation_reason, amount, fund_split].hash
106
115
  end
107
116
 
108
117
  # Builds the object from hash
@@ -6,10 +6,13 @@ module PCPServerSDK
6
6
  class CancelPaymentResponse
7
7
  attr_accessor :payment
8
8
 
9
+ attr_accessor :fund_split
10
+
9
11
  # Attribute mapping from ruby-style variable name to JSON key.
10
12
  def self.attribute_map
11
13
  {
12
- :'payment' => :'payment'
14
+ :'payment' => :'payment',
15
+ :'fund_split' => :'fundSplit'
13
16
  }
14
17
  end
15
18
 
@@ -21,7 +24,8 @@ module PCPServerSDK
21
24
  # Attribute type mapping.
22
25
  def self.openapi_types
23
26
  {
24
- :'payment' => :'PaymentResponse'
27
+ :'payment' => :'PaymentResponse',
28
+ :'fund_split' => :'FundSplit'
25
29
  }
26
30
  end
27
31
 
@@ -49,6 +53,10 @@ module PCPServerSDK
49
53
  if attributes.key?(:'payment')
50
54
  self.payment = attributes[:'payment']
51
55
  end
56
+
57
+ if attributes.key?(:'fund_split')
58
+ self.fund_split = attributes[:'fund_split']
59
+ end
52
60
  end
53
61
 
54
62
  # Checks equality by comparing each attribute.
@@ -56,7 +64,8 @@ module PCPServerSDK
56
64
  def ==(o)
57
65
  return true if self.equal?(o)
58
66
  self.class == o.class &&
59
- payment == o.payment
67
+ payment == o.payment &&
68
+ fund_split == o.fund_split
60
69
  end
61
70
 
62
71
  # @see the `==` method
@@ -68,7 +77,7 @@ module PCPServerSDK
68
77
  # Calculates hash code according to all attributes.
69
78
  # @return [Integer] Hash code
70
79
  def hash
71
- [payment].hash
80
+ [payment, fund_split].hash
72
81
  end
73
82
 
74
83
  # Builds the object from hash
@@ -5,7 +5,8 @@ module PCPServerSDK
5
5
  module Models
6
6
  # Object containing the line items of the invoice or shopping cart.
7
7
  class CartItemInvoiceData
8
- # Shopping cart item description. The description will also be displayed in the portal as the product name.
8
+ # Shopping cart item description. The description will also be displayed in the portal as the product name
9
+ # if orderLineDetails.productName is not set.
9
10
  attr_accessor :description
10
11
 
11
12
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -34,6 +34,9 @@ module PCPServerSDK
34
34
  # Optional parameter to define the delivery shop or touchpoint where an item has been collected (e.g. for Click & Collect or Click & Reserve).
35
35
  attr_accessor :merchant_shop_delivery_reference
36
36
 
37
+ # The name of the product, will be displayed in Portal if set.
38
+ attr_accessor :product_name
39
+
37
40
  class EnumAttributeValidator
38
41
  attr_reader :datatype
39
42
  attr_reader :allowable_values
@@ -68,7 +71,8 @@ module PCPServerSDK
68
71
  :'product_url' => :'productUrl',
69
72
  :'product_image_url' => :'productImageUrl',
70
73
  :'product_category_path' => :'productCategoryPath',
71
- :'merchant_shop_delivery_reference' => :'merchantShopDeliveryReference'
74
+ :'merchant_shop_delivery_reference' => :'merchantShopDeliveryReference',
75
+ :'product_name' => :'productName'
72
76
  }
73
77
  end
74
78
 
@@ -89,7 +93,8 @@ module PCPServerSDK
89
93
  :'product_url' => :'String',
90
94
  :'product_image_url' => :'String',
91
95
  :'product_category_path' => :'String',
92
- :'merchant_shop_delivery_reference' => :'String'
96
+ :'merchant_shop_delivery_reference' => :'String',
97
+ :'product_name' => :'String'
93
98
  }
94
99
  end
95
100
 
@@ -157,6 +162,10 @@ module PCPServerSDK
157
162
  if attributes.key?(:'merchant_shop_delivery_reference')
158
163
  self.merchant_shop_delivery_reference = attributes[:'merchant_shop_delivery_reference']
159
164
  end
165
+
166
+ if attributes.key?(:'product_name')
167
+ self.product_name = attributes[:'product_name']
168
+ end
160
169
  end
161
170
 
162
171
  # Checks equality by comparing each attribute.
@@ -173,7 +182,8 @@ module PCPServerSDK
173
182
  product_url == o.product_url &&
174
183
  product_image_url == o.product_image_url &&
175
184
  product_category_path == o.product_category_path &&
176
- merchant_shop_delivery_reference == o.merchant_shop_delivery_reference
185
+ merchant_shop_delivery_reference == o.merchant_shop_delivery_reference &&
186
+ product_name == o.product_name
177
187
  end
178
188
 
179
189
  # @see the `==` method
@@ -185,7 +195,7 @@ module PCPServerSDK
185
195
  # Calculates hash code according to all attributes.
186
196
  # @return [Integer] Hash code
187
197
  def hash
188
- [product_code, product_price, product_type, quantity, tax_amount, tax_amount_per_unit, product_url, product_image_url, product_category_path, merchant_shop_delivery_reference].hash
198
+ [product_code, product_price, product_type, quantity, tax_amount, tax_amount_per_unit, product_url, product_image_url, product_category_path, merchant_shop_delivery_reference, product_name].hash
189
199
  end
190
200
 
191
201
  # Builds the object from hash
@@ -1,4 +1,4 @@
1
1
 
2
2
  module PCPServerSDK
3
- VERSION = '1.10.0'
3
+ VERSION = '1.12.0'
4
4
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pcp-serversdk-ruby",
3
- "version": "1.10.0",
3
+ "version": "1.12.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pcp-serversdk-ruby",
9
- "version": "1.10.0",
9
+ "version": "1.12.0",
10
10
  "devDependencies": {
11
11
  "@commitlint/cli": "19.4.0",
12
12
  "@commitlint/config-conventional": "19.2.2",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcp-serversdk-ruby",
3
- "version": "1.10.0",
3
+ "version": "1.12.0",
4
4
  "type": "commonjs",
5
5
  "scripts": {
6
6
  "changelog": "conventional-changelog -i CHANGELOG.md -s --config ./changelog.config.js"
@@ -459,6 +459,70 @@ RSpec.describe 'required field validation' do
459
459
  end
460
460
  end
461
461
 
462
+ describe PCPServerSDK::Models::CancelPaymentRequest do
463
+ let(:fund_split) do
464
+ PCPServerSDK::Models::FundSplit.new(
465
+ fund_distributions: [
466
+ PCPServerSDK::Models::FundDistribution.new(account_id: 'account-1', amount: 100, type: 'MARKETPLACE')
467
+ ]
468
+ )
469
+ end
470
+
471
+ it 'serializes fund_split using the API field name' do
472
+ request = described_class.new(amount: 100, fund_split: fund_split)
473
+
474
+ expect(request.to_hash).to include(
475
+ amount: 100,
476
+ fundSplit: {
477
+ fundDistributions: [
478
+ {
479
+ accountId: 'account-1',
480
+ amount: 100,
481
+ type: 'MARKETPLACE'
482
+ }
483
+ ]
484
+ }
485
+ )
486
+ end
487
+
488
+ it 'deserializes fundSplit into a FundSplit model' do
489
+ request = described_class.build_from_hash({
490
+ 'amount' => 100,
491
+ 'fundSplit' => {
492
+ 'fundDistributions' => [
493
+ {
494
+ 'accountId' => 'account-1',
495
+ 'amount' => 100,
496
+ 'type' => 'MARKETPLACE'
497
+ }
498
+ ]
499
+ }
500
+ })
501
+
502
+ expect(request.fund_split).to be_a(PCPServerSDK::Models::FundSplit)
503
+ expect(request.fund_split.fund_distributions.first.account_id).to eq('account-1')
504
+ end
505
+ end
506
+
507
+ describe PCPServerSDK::Models::CancelPaymentResponse do
508
+ it 'deserializes fundSplit into a FundSplit model' do
509
+ response = described_class.build_from_hash({
510
+ 'fundSplit' => {
511
+ 'fundDistributions' => [
512
+ {
513
+ 'accountId' => 'account-1',
514
+ 'amount' => 100,
515
+ 'type' => 'MARKETPLACE'
516
+ }
517
+ ]
518
+ }
519
+ })
520
+
521
+ expect(response.fund_split).to be_a(PCPServerSDK::Models::FundSplit)
522
+ expect(response.fund_split.fund_distributions.first.amount).to eq(100)
523
+ end
524
+ end
525
+
462
526
  describe PCPServerSDK::Models::DeliverItem do
463
527
  it 'rejects partially initialized item models missing required fields' do
464
528
  expect 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.10.0
4
+ version: 1.12.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-05-22 00:00:00.000000000 Z
11
+ date: 2026-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-http
@@ -335,19 +335,19 @@ specification_version: 4
335
335
  summary: Commerce Platform API Ruby Gem
336
336
  test_files:
337
337
  - spec/communicator_configuration_spec.rb
338
- - spec/endpoints/order_management_checkout_actions_api_client_spec.rb
339
- - spec/endpoints/base_api_client_spec.rb
340
338
  - spec/endpoints/payment_execution_api_client_spec.rb
339
+ - spec/endpoints/base_api_client_spec.rb
340
+ - spec/endpoints/commerce_case_api_client_spec.rb
341
+ - spec/endpoints/checkout_api_client_spec.rb
341
342
  - spec/endpoints/payment_information_api_client_spec.rb
343
+ - spec/endpoints/order_management_checkout_actions_api_client_spec.rb
342
344
  - spec/endpoints/authentication_api_client_spec.rb
343
- - spec/endpoints/checkout_api_client_spec.rb
344
- - spec/endpoints/commerce_case_api_client_spec.rb
345
- - spec/errors/api_response_retrieval_exception_spec.rb
346
- - spec/errors/api_exception_spec.rb
347
345
  - spec/errors/api_error_response_exception_spec.rb
346
+ - spec/errors/api_exception_spec.rb
347
+ - spec/errors/api_response_retrieval_exception_spec.rb
348
348
  - spec/models/required_field_validation_spec.rb
349
- - spec/queries/get_checkouts_query_spec.rb
350
349
  - spec/queries/get_commerce_cases_query_spec.rb
350
+ - spec/queries/get_checkouts_query_spec.rb
351
351
  - spec/request_header_generator_spec.rb
352
352
  - spec/spec_helper.rb
353
353
  - spec/transformer/apple_pay_transformer_spec.rb