pcp-server-ruby-sdk 1.11.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/api-definition.yaml +5210 -5206
- data/lib/PCP-server-Ruby-SDK/models/cancel_payment_request.rb +13 -4
- data/lib/PCP-server-Ruby-SDK/models/cancel_payment_response.rb +13 -4
- data/lib/PCP-server-Ruby-SDK/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/spec/models/required_field_validation_spec.rb +64 -0
- metadata +2 -2
|
@@ -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
|
data/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pcp-serversdk-ruby",
|
|
3
|
-
"version": "1.
|
|
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.
|
|
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
|
@@ -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.
|
|
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-
|
|
11
|
+
date: 2026-07-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: net-http
|