Skip to content

Commit

Permalink
Release 4.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wallee-deployment-user committed Feb 12, 2024
1 parent b147517 commit 1d30c6d
Show file tree
Hide file tree
Showing 20 changed files with 764 additions and 212 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
test:
strategy:
matrix:
ruby-version: ['3.0.0', '3.1.0']
ruby-version: ['3.0.0', '3.3.0']
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
Expand All @@ -43,7 +43,7 @@ jobs:
# change this to (see https://github.com/ruby/setup-ruby#versioning):
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.0'
ruby-version: '3.3.0'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Publish to RubyGems
run: |
Expand Down
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Rake::TestTask.new do |t|
t.libs = ["lib"]
t.warning = true
t.verbose = true
t.test_files = FileList['test/*.rb']
t.test_files = FileList['test/*_test.rb']
t.options = "-v --stop-on-failure"
end


Expand Down
2 changes: 1 addition & 1 deletion lib/wallee-ruby-sdk/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def build_request(http_method, path, opts = {})
http_method = http_method.to_sym.downcase

default_headers = {
'x-meta-sdk-version': "4.4.0",
'x-meta-sdk-version': "4.5.0",
'x-meta-sdk-language': "ruby",
'x-meta-sdk-provider': "wallee",
'x-meta-sdk-language-version': RUBY_VERSION
Expand Down
3 changes: 1 addition & 2 deletions lib/wallee-ruby-sdk/encryption_util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ def self.is_content_valid(content, signature, public_key, encryption_algorithm)
public_key = OpenSSL::PKey.read(public_key_bytes)

begin
public_key.verify(OpenSSL::Digest::SHA256.new, signature, content)
return true
return public_key.verify(OpenSSL::Digest::SHA256.new, signature, content)
rescue OpenSSL::PKey::PKeyError, OpenSSL::PKey::ECError, OpenSSL::PKey::EC::Point::Error
return false
end
Expand Down
12 changes: 11 additions & 1 deletion lib/wallee-ruby-sdk/models/abstract_webhook_listener_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

module Wallee
class AbstractWebhookListenerUpdate
# Whether signature header and state property are enabled in webhook payload.
attr_accessor :enable_payload_signature_and_state

# The entity's target states that are to be monitored.
attr_accessor :entity_states

Expand All @@ -34,6 +37,7 @@ class AbstractWebhookListenerUpdate
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'enable_payload_signature_and_state' => :'enablePayloadSignatureAndState',
:'entity_states' => :'entityStates',
:'name' => :'name',
:'notify_every_change' => :'notifyEveryChange',
Expand All @@ -44,6 +48,7 @@ def self.attribute_map
# Attribute type mapping.
def self.swagger_types
{
:'enable_payload_signature_and_state' => :'BOOLEAN',
:'entity_states' => :'Array<String>',
:'name' => :'String',
:'notify_every_change' => :'BOOLEAN',
Expand All @@ -59,6 +64,10 @@ def initialize(attributes = {})
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

if attributes.has_key?(:'enablePayloadSignatureAndState')
self.enable_payload_signature_and_state = attributes[:'enablePayloadSignatureAndState']
end

if attributes.has_key?(:'entityStates')
if (value = attributes[:'entityStates']).is_a?(Array)
self.entity_states = value
Expand Down Expand Up @@ -111,6 +120,7 @@ def name=(name)
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
enable_payload_signature_and_state == o.enable_payload_signature_and_state &&
entity_states == o.entity_states &&
name == o.name &&
notify_every_change == o.notify_every_change &&
Expand All @@ -126,7 +136,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
[entity_states, name, notify_every_change, state].hash
[enable_payload_signature_and_state, entity_states, name, notify_every_change, state].hash
end

# Builds the object from hash
Expand Down
12 changes: 11 additions & 1 deletion lib/wallee-ruby-sdk/models/payment_connector_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class PaymentConnectorConfiguration
# A unique identifier for the object.
attr_accessor :id

#
attr_accessor :image_path

# The ID of the space this object belongs to.
attr_accessor :linked_space_id

Expand Down Expand Up @@ -71,6 +74,7 @@ def self.attribute_map
:'enabled_sales_channels' => :'enabledSalesChannels',
:'enabled_space_views' => :'enabledSpaceViews',
:'id' => :'id',
:'image_path' => :'imagePath',
:'linked_space_id' => :'linkedSpaceId',
:'name' => :'name',
:'payment_method_configuration' => :'paymentMethodConfiguration',
Expand All @@ -91,6 +95,7 @@ def self.swagger_types
:'enabled_sales_channels' => :'Array<SalesChannel>',
:'enabled_space_views' => :'Array<Integer>',
:'id' => :'Integer',
:'image_path' => :'String',
:'linked_space_id' => :'Integer',
:'name' => :'String',
:'payment_method_configuration' => :'PaymentMethodConfiguration',
Expand Down Expand Up @@ -140,6 +145,10 @@ def initialize(attributes = {})
self.id = attributes[:'id']
end

if attributes.has_key?(:'imagePath')
self.image_path = attributes[:'imagePath']
end

if attributes.has_key?(:'linkedSpaceId')
self.linked_space_id = attributes[:'linkedSpaceId']
end
Expand Down Expand Up @@ -212,6 +221,7 @@ def ==(o)
enabled_sales_channels == o.enabled_sales_channels &&
enabled_space_views == o.enabled_space_views &&
id == o.id &&
image_path == o.image_path &&
linked_space_id == o.linked_space_id &&
name == o.name &&
payment_method_configuration == o.payment_method_configuration &&
Expand All @@ -231,7 +241,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
[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
[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
end

# Builds the object from hash
Expand Down
12 changes: 11 additions & 1 deletion lib/wallee-ruby-sdk/models/webhook_listener.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
module Wallee
#
class WebhookListener
# Whether signature header and state property are enabled in webhook payload.
attr_accessor :enable_payload_signature_and_state

# The entity that is to be monitored.
attr_accessor :entity

Expand Down Expand Up @@ -56,6 +59,7 @@ class WebhookListener
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'enable_payload_signature_and_state' => :'enablePayloadSignatureAndState',
:'entity' => :'entity',
:'entity_states' => :'entityStates',
:'id' => :'id',
Expand All @@ -73,6 +77,7 @@ def self.attribute_map
# Attribute type mapping.
def self.swagger_types
{
:'enable_payload_signature_and_state' => :'BOOLEAN',
:'entity' => :'Integer',
:'entity_states' => :'Array<String>',
:'id' => :'Integer',
Expand All @@ -95,6 +100,10 @@ def initialize(attributes = {})
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

if attributes.has_key?(:'enablePayloadSignatureAndState')
self.enable_payload_signature_and_state = attributes[:'enablePayloadSignatureAndState']
end

if attributes.has_key?(:'entity')
self.entity = attributes[:'entity']
end
Expand Down Expand Up @@ -175,6 +184,7 @@ def name=(name)
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
enable_payload_signature_and_state == o.enable_payload_signature_and_state &&
entity == o.entity &&
entity_states == o.entity_states &&
id == o.id &&
Expand All @@ -197,7 +207,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
[entity, entity_states, id, identity, linked_space_id, name, notify_every_change, planned_purge_date, state, url, version].hash
[enable_payload_signature_and_state, entity, entity_states, id, identity, linked_space_id, name, notify_every_change, planned_purge_date, state, url, version].hash
end

# Builds the object from hash
Expand Down
12 changes: 11 additions & 1 deletion lib/wallee-ruby-sdk/models/webhook_listener_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
module Wallee
#
class WebhookListenerCreate
# Whether signature header and state property are enabled in webhook payload.
attr_accessor :enable_payload_signature_and_state

# The entity's target states that are to be monitored.
attr_accessor :entity_states

Expand All @@ -44,6 +47,7 @@ class WebhookListenerCreate
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'enable_payload_signature_and_state' => :'enablePayloadSignatureAndState',
:'entity_states' => :'entityStates',
:'name' => :'name',
:'notify_every_change' => :'notifyEveryChange',
Expand All @@ -57,6 +61,7 @@ def self.attribute_map
# Attribute type mapping.
def self.swagger_types
{
:'enable_payload_signature_and_state' => :'BOOLEAN',
:'entity_states' => :'Array<String>',
:'name' => :'String',
:'notify_every_change' => :'BOOLEAN',
Expand All @@ -75,6 +80,10 @@ def initialize(attributes = {})
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

if attributes.has_key?(:'enablePayloadSignatureAndState')
self.enable_payload_signature_and_state = attributes[:'enablePayloadSignatureAndState']
end

if attributes.has_key?(:'entityStates')
if (value = attributes[:'entityStates']).is_a?(Array)
self.entity_states = value
Expand Down Expand Up @@ -149,6 +158,7 @@ def name=(name)
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
enable_payload_signature_and_state == o.enable_payload_signature_and_state &&
entity_states == o.entity_states &&
name == o.name &&
notify_every_change == o.notify_every_change &&
Expand All @@ -167,7 +177,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
[entity_states, name, notify_every_change, state, entity, identity, url].hash
[enable_payload_signature_and_state, entity_states, name, notify_every_change, state, entity, identity, url].hash
end

# Builds the object from hash
Expand Down
12 changes: 11 additions & 1 deletion lib/wallee-ruby-sdk/models/webhook_listener_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
module Wallee
#
class WebhookListenerUpdate
# Whether signature header and state property are enabled in webhook payload.
attr_accessor :enable_payload_signature_and_state

# The entity's target states that are to be monitored.
attr_accessor :entity_states

Expand All @@ -41,6 +44,7 @@ class WebhookListenerUpdate
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'enable_payload_signature_and_state' => :'enablePayloadSignatureAndState',
:'entity_states' => :'entityStates',
:'name' => :'name',
:'notify_every_change' => :'notifyEveryChange',
Expand All @@ -53,6 +57,7 @@ def self.attribute_map
# Attribute type mapping.
def self.swagger_types
{
:'enable_payload_signature_and_state' => :'BOOLEAN',
:'entity_states' => :'Array<String>',
:'name' => :'String',
:'notify_every_change' => :'BOOLEAN',
Expand All @@ -70,6 +75,10 @@ def initialize(attributes = {})
# convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

if attributes.has_key?(:'enablePayloadSignatureAndState')
self.enable_payload_signature_and_state = attributes[:'enablePayloadSignatureAndState']
end

if attributes.has_key?(:'entityStates')
if (value = attributes[:'entityStates']).is_a?(Array)
self.entity_states = value
Expand Down Expand Up @@ -140,6 +149,7 @@ def name=(name)
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
enable_payload_signature_and_state == o.enable_payload_signature_and_state &&
entity_states == o.entity_states &&
name == o.name &&
notify_every_change == o.notify_every_change &&
Expand All @@ -157,7 +167,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
[entity_states, name, notify_every_change, state, id, version].hash
[enable_payload_signature_and_state, entity_states, name, notify_every_change, state, id, version].hash
end

# Builds the object from hash
Expand Down
2 changes: 1 addition & 1 deletion lib/wallee-ruby-sdk/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
=end

module Wallee
VERSION = '4.4.0'
VERSION = '4.5.0'
end
24 changes: 0 additions & 24 deletions test/condition_type_service_test.rb

This file was deleted.

Loading

0 comments on commit 1d30c6d

Please sign in to comment.