Skip to content

Commit 1d30c6d

Browse files
Release 4.5.0
1 parent b147517 commit 1d30c6d

20 files changed

+764
-212
lines changed

.github/workflows/publish-ruby.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
test:
2020
strategy:
2121
matrix:
22-
ruby-version: ['3.0.0', '3.1.0']
22+
ruby-version: ['3.0.0', '3.3.0']
2323
runs-on: ubuntu-20.04
2424
steps:
2525
- uses: actions/checkout@v3
@@ -43,7 +43,7 @@ jobs:
4343
# change this to (see https://github.com/ruby/setup-ruby#versioning):
4444
uses: ruby/setup-ruby@v1
4545
with:
46-
ruby-version: '3.1.0'
46+
ruby-version: '3.3.0'
4747
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
4848
- name: Publish to RubyGems
4949
run: |

Rakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Rake::TestTask.new do |t|
44
t.libs = ["lib"]
55
t.warning = true
66
t.verbose = true
7-
t.test_files = FileList['test/*.rb']
7+
t.test_files = FileList['test/*_test.rb']
8+
t.options = "-v --stop-on-failure"
89
end
910

1011

lib/wallee-ruby-sdk/api_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def build_request(http_method, path, opts = {})
102102
http_method = http_method.to_sym.downcase
103103

104104
default_headers = {
105-
'x-meta-sdk-version': "4.4.0",
105+
'x-meta-sdk-version': "4.5.0",
106106
'x-meta-sdk-language': "ruby",
107107
'x-meta-sdk-provider': "wallee",
108108
'x-meta-sdk-language-version': RUBY_VERSION

lib/wallee-ruby-sdk/encryption_util.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ def self.is_content_valid(content, signature, public_key, encryption_algorithm)
2222
public_key = OpenSSL::PKey.read(public_key_bytes)
2323

2424
begin
25-
public_key.verify(OpenSSL::Digest::SHA256.new, signature, content)
26-
return true
25+
return public_key.verify(OpenSSL::Digest::SHA256.new, signature, content)
2726
rescue OpenSSL::PKey::PKeyError, OpenSSL::PKey::ECError, OpenSSL::PKey::EC::Point::Error
2827
return false
2928
end

lib/wallee-ruby-sdk/models/abstract_webhook_listener_update.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919

2020
module Wallee
2121
class AbstractWebhookListenerUpdate
22+
# Whether signature header and state property are enabled in webhook payload.
23+
attr_accessor :enable_payload_signature_and_state
24+
2225
# The entity's target states that are to be monitored.
2326
attr_accessor :entity_states
2427

@@ -34,6 +37,7 @@ class AbstractWebhookListenerUpdate
3437
# Attribute mapping from ruby-style variable name to JSON key.
3538
def self.attribute_map
3639
{
40+
:'enable_payload_signature_and_state' => :'enablePayloadSignatureAndState',
3741
:'entity_states' => :'entityStates',
3842
:'name' => :'name',
3943
:'notify_every_change' => :'notifyEveryChange',
@@ -44,6 +48,7 @@ def self.attribute_map
4448
# Attribute type mapping.
4549
def self.swagger_types
4650
{
51+
:'enable_payload_signature_and_state' => :'BOOLEAN',
4752
:'entity_states' => :'Array<String>',
4853
:'name' => :'String',
4954
:'notify_every_change' => :'BOOLEAN',
@@ -59,6 +64,10 @@ def initialize(attributes = {})
5964
# convert string to symbol for hash key
6065
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
6166

67+
if attributes.has_key?(:'enablePayloadSignatureAndState')
68+
self.enable_payload_signature_and_state = attributes[:'enablePayloadSignatureAndState']
69+
end
70+
6271
if attributes.has_key?(:'entityStates')
6372
if (value = attributes[:'entityStates']).is_a?(Array)
6473
self.entity_states = value
@@ -111,6 +120,7 @@ def name=(name)
111120
def ==(o)
112121
return true if self.equal?(o)
113122
self.class == o.class &&
123+
enable_payload_signature_and_state == o.enable_payload_signature_and_state &&
114124
entity_states == o.entity_states &&
115125
name == o.name &&
116126
notify_every_change == o.notify_every_change &&
@@ -126,7 +136,7 @@ def eql?(o)
126136
# Calculates hash code according to all attributes.
127137
# @return [Fixnum] Hash code
128138
def hash
129-
[entity_states, name, notify_every_change, state].hash
139+
[enable_payload_signature_and_state, entity_states, name, notify_every_change, state].hash
130140
end
131141

132142
# Builds the object from hash

lib/wallee-ruby-sdk/models/payment_connector_configuration.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ class PaymentConnectorConfiguration
3838
# A unique identifier for the object.
3939
attr_accessor :id
4040

41+
#
42+
attr_accessor :image_path
43+
4144
# The ID of the space this object belongs to.
4245
attr_accessor :linked_space_id
4346

@@ -71,6 +74,7 @@ def self.attribute_map
7174
:'enabled_sales_channels' => :'enabledSalesChannels',
7275
:'enabled_space_views' => :'enabledSpaceViews',
7376
:'id' => :'id',
77+
:'image_path' => :'imagePath',
7478
:'linked_space_id' => :'linkedSpaceId',
7579
:'name' => :'name',
7680
:'payment_method_configuration' => :'paymentMethodConfiguration',
@@ -91,6 +95,7 @@ def self.swagger_types
9195
:'enabled_sales_channels' => :'Array<SalesChannel>',
9296
:'enabled_space_views' => :'Array<Integer>',
9397
:'id' => :'Integer',
98+
:'image_path' => :'String',
9499
:'linked_space_id' => :'Integer',
95100
:'name' => :'String',
96101
:'payment_method_configuration' => :'PaymentMethodConfiguration',
@@ -140,6 +145,10 @@ def initialize(attributes = {})
140145
self.id = attributes[:'id']
141146
end
142147

148+
if attributes.has_key?(:'imagePath')
149+
self.image_path = attributes[:'imagePath']
150+
end
151+
143152
if attributes.has_key?(:'linkedSpaceId')
144153
self.linked_space_id = attributes[:'linkedSpaceId']
145154
end
@@ -212,6 +221,7 @@ def ==(o)
212221
enabled_sales_channels == o.enabled_sales_channels &&
213222
enabled_space_views == o.enabled_space_views &&
214223
id == o.id &&
224+
image_path == o.image_path &&
215225
linked_space_id == o.linked_space_id &&
216226
name == o.name &&
217227
payment_method_configuration == o.payment_method_configuration &&
@@ -231,7 +241,7 @@ def eql?(o)
231241
# Calculates hash code according to all attributes.
232242
# @return [Fixnum] Hash code
233243
def hash
234-
[applicable_for_transaction_processing, conditions, connector, enabled_sales_channels, enabled_space_views, id, linked_space_id, name, payment_method_configuration, planned_purge_date, priority, processor_configuration, state, version].hash
244+
[applicable_for_transaction_processing, conditions, connector, enabled_sales_channels, enabled_space_views, id, image_path, linked_space_id, name, payment_method_configuration, planned_purge_date, priority, processor_configuration, state, version].hash
235245
end
236246

237247
# Builds the object from hash

lib/wallee-ruby-sdk/models/webhook_listener.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
module Wallee
2121
#
2222
class WebhookListener
23+
# Whether signature header and state property are enabled in webhook payload.
24+
attr_accessor :enable_payload_signature_and_state
25+
2326
# The entity that is to be monitored.
2427
attr_accessor :entity
2528

@@ -56,6 +59,7 @@ class WebhookListener
5659
# Attribute mapping from ruby-style variable name to JSON key.
5760
def self.attribute_map
5861
{
62+
:'enable_payload_signature_and_state' => :'enablePayloadSignatureAndState',
5963
:'entity' => :'entity',
6064
:'entity_states' => :'entityStates',
6165
:'id' => :'id',
@@ -73,6 +77,7 @@ def self.attribute_map
7377
# Attribute type mapping.
7478
def self.swagger_types
7579
{
80+
:'enable_payload_signature_and_state' => :'BOOLEAN',
7681
:'entity' => :'Integer',
7782
:'entity_states' => :'Array<String>',
7883
:'id' => :'Integer',
@@ -95,6 +100,10 @@ def initialize(attributes = {})
95100
# convert string to symbol for hash key
96101
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
97102

103+
if attributes.has_key?(:'enablePayloadSignatureAndState')
104+
self.enable_payload_signature_and_state = attributes[:'enablePayloadSignatureAndState']
105+
end
106+
98107
if attributes.has_key?(:'entity')
99108
self.entity = attributes[:'entity']
100109
end
@@ -175,6 +184,7 @@ def name=(name)
175184
def ==(o)
176185
return true if self.equal?(o)
177186
self.class == o.class &&
187+
enable_payload_signature_and_state == o.enable_payload_signature_and_state &&
178188
entity == o.entity &&
179189
entity_states == o.entity_states &&
180190
id == o.id &&
@@ -197,7 +207,7 @@ def eql?(o)
197207
# Calculates hash code according to all attributes.
198208
# @return [Fixnum] Hash code
199209
def hash
200-
[entity, entity_states, id, identity, linked_space_id, name, notify_every_change, planned_purge_date, state, url, version].hash
210+
[enable_payload_signature_and_state, entity, entity_states, id, identity, linked_space_id, name, notify_every_change, planned_purge_date, state, url, version].hash
201211
end
202212

203213
# Builds the object from hash

lib/wallee-ruby-sdk/models/webhook_listener_create.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
module Wallee
2121
#
2222
class WebhookListenerCreate
23+
# Whether signature header and state property are enabled in webhook payload.
24+
attr_accessor :enable_payload_signature_and_state
25+
2326
# The entity's target states that are to be monitored.
2427
attr_accessor :entity_states
2528

@@ -44,6 +47,7 @@ class WebhookListenerCreate
4447
# Attribute mapping from ruby-style variable name to JSON key.
4548
def self.attribute_map
4649
{
50+
:'enable_payload_signature_and_state' => :'enablePayloadSignatureAndState',
4751
:'entity_states' => :'entityStates',
4852
:'name' => :'name',
4953
:'notify_every_change' => :'notifyEveryChange',
@@ -57,6 +61,7 @@ def self.attribute_map
5761
# Attribute type mapping.
5862
def self.swagger_types
5963
{
64+
:'enable_payload_signature_and_state' => :'BOOLEAN',
6065
:'entity_states' => :'Array<String>',
6166
:'name' => :'String',
6267
:'notify_every_change' => :'BOOLEAN',
@@ -75,6 +80,10 @@ def initialize(attributes = {})
7580
# convert string to symbol for hash key
7681
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
7782

83+
if attributes.has_key?(:'enablePayloadSignatureAndState')
84+
self.enable_payload_signature_and_state = attributes[:'enablePayloadSignatureAndState']
85+
end
86+
7887
if attributes.has_key?(:'entityStates')
7988
if (value = attributes[:'entityStates']).is_a?(Array)
8089
self.entity_states = value
@@ -149,6 +158,7 @@ def name=(name)
149158
def ==(o)
150159
return true if self.equal?(o)
151160
self.class == o.class &&
161+
enable_payload_signature_and_state == o.enable_payload_signature_and_state &&
152162
entity_states == o.entity_states &&
153163
name == o.name &&
154164
notify_every_change == o.notify_every_change &&
@@ -167,7 +177,7 @@ def eql?(o)
167177
# Calculates hash code according to all attributes.
168178
# @return [Fixnum] Hash code
169179
def hash
170-
[entity_states, name, notify_every_change, state, entity, identity, url].hash
180+
[enable_payload_signature_and_state, entity_states, name, notify_every_change, state, entity, identity, url].hash
171181
end
172182

173183
# Builds the object from hash

lib/wallee-ruby-sdk/models/webhook_listener_update.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
module Wallee
2121
#
2222
class WebhookListenerUpdate
23+
# Whether signature header and state property are enabled in webhook payload.
24+
attr_accessor :enable_payload_signature_and_state
25+
2326
# The entity's target states that are to be monitored.
2427
attr_accessor :entity_states
2528

@@ -41,6 +44,7 @@ class WebhookListenerUpdate
4144
# Attribute mapping from ruby-style variable name to JSON key.
4245
def self.attribute_map
4346
{
47+
:'enable_payload_signature_and_state' => :'enablePayloadSignatureAndState',
4448
:'entity_states' => :'entityStates',
4549
:'name' => :'name',
4650
:'notify_every_change' => :'notifyEveryChange',
@@ -53,6 +57,7 @@ def self.attribute_map
5357
# Attribute type mapping.
5458
def self.swagger_types
5559
{
60+
:'enable_payload_signature_and_state' => :'BOOLEAN',
5661
:'entity_states' => :'Array<String>',
5762
:'name' => :'String',
5863
:'notify_every_change' => :'BOOLEAN',
@@ -70,6 +75,10 @@ def initialize(attributes = {})
7075
# convert string to symbol for hash key
7176
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
7277

78+
if attributes.has_key?(:'enablePayloadSignatureAndState')
79+
self.enable_payload_signature_and_state = attributes[:'enablePayloadSignatureAndState']
80+
end
81+
7382
if attributes.has_key?(:'entityStates')
7483
if (value = attributes[:'entityStates']).is_a?(Array)
7584
self.entity_states = value
@@ -140,6 +149,7 @@ def name=(name)
140149
def ==(o)
141150
return true if self.equal?(o)
142151
self.class == o.class &&
152+
enable_payload_signature_and_state == o.enable_payload_signature_and_state &&
143153
entity_states == o.entity_states &&
144154
name == o.name &&
145155
notify_every_change == o.notify_every_change &&
@@ -157,7 +167,7 @@ def eql?(o)
157167
# Calculates hash code according to all attributes.
158168
# @return [Fixnum] Hash code
159169
def hash
160-
[entity_states, name, notify_every_change, state, id, version].hash
170+
[enable_payload_signature_and_state, entity_states, name, notify_every_change, state, id, version].hash
161171
end
162172

163173
# Builds the object from hash

lib/wallee-ruby-sdk/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
=end
1717

1818
module Wallee
19-
VERSION = '4.4.0'
19+
VERSION = '4.5.0'
2020
end

0 commit comments

Comments
 (0)