Skip to content

Commit

Permalink
Release 3.3.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
WorldlineConnect committed Jan 21, 2025
1 parent 6c6a4e9 commit 297e582
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 2 deletions.
2 changes: 1 addition & 1 deletion connect-sdk-ruby.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = 'connect-sdk-ruby'
spec.version = '3.2.0'
spec.version = '3.3.0'
spec.authors = ['Worldline Global Collect']
spec.email = ['github.connect@worldline.com']
spec.summary = %q{SDK to communicate with the Worldline Global Collect platform using the Worldline Connect Server API}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module Communication
class MetadataProvider
private

SDK_VERSION = '3.2.0'.freeze
SDK_VERSION = '3.3.0'.freeze
SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'.freeze
PROHIBITED_HEADERS = [SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key','Date', 'Content-Type', 'Authorization'].sort!.freeze
CHARSET = 'utf-8'.freeze
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#
# This class was auto-generated from the API references found at
# https://apireference.connect.worldline-solutions.com/
#
require 'worldline/connect/sdk/domain/data_object'

module Worldline
module Connect
module SDK
module V1
module Domain
# @attr [String] clause_name
# @attr [Integer] fraud_score
# @attr [String] policy_applied
# @attr [Array<String>] reason_codes
class CybersourceDecisionManager < Worldline::Connect::SDK::Domain::DataObject

attr_accessor :clause_name

attr_accessor :fraud_score

attr_accessor :policy_applied

attr_accessor :reason_codes

# @return (Hash)
def to_h
hash = super
hash['clauseName'] = @clause_name unless @clause_name.nil?
hash['fraudScore'] = @fraud_score unless @fraud_score.nil?
hash['policyApplied'] = @policy_applied unless @policy_applied.nil?
hash['reasonCodes'] = @reason_codes unless @reason_codes.nil?
hash
end

def from_hash(hash)
super
if hash.has_key? 'clauseName'
@clause_name = hash['clauseName']
end
if hash.has_key? 'fraudScore'
@fraud_score = hash['fraudScore']
end
if hash.has_key? 'policyApplied'
@policy_applied = hash['policyApplied']
end
if hash.has_key? 'reasonCodes'
raise TypeError, "value '%s' is not an Array" % [hash['reasonCodes']] unless hash['reasonCodes'].is_a? Array
@reason_codes = []
hash['reasonCodes'].each do |e|
@reason_codes << e
end
end
end
end
end
end
end
end
end
9 changes: 9 additions & 0 deletions lib/worldline/connect/sdk/v1/domain/fraud_results.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# https://apireference.connect.worldline-solutions.com/
#
require 'worldline/connect/sdk/domain/data_object'
require 'worldline/connect/sdk/v1/domain/cybersource_decision_manager'
require 'worldline/connect/sdk/v1/domain/in_auth'
require 'worldline/connect/sdk/v1/domain/microsoft_fraud_results'

Expand All @@ -11,11 +12,14 @@ module Connect
module SDK
module V1
module Domain
# @attr [Worldline::Connect::SDK::V1::Domain::CybersourceDecisionManager] cybersource_decision_manager
# @attr [String] fraud_service_result
# @attr [Worldline::Connect::SDK::V1::Domain::InAuth] in_auth
# @attr [Worldline::Connect::SDK::V1::Domain::MicrosoftFraudResults] microsoft_fraud_protection
class FraudResults < Worldline::Connect::SDK::Domain::DataObject

attr_accessor :cybersource_decision_manager

attr_accessor :fraud_service_result

attr_accessor :in_auth
Expand All @@ -25,6 +29,7 @@ class FraudResults < Worldline::Connect::SDK::Domain::DataObject
# @return (Hash)
def to_h
hash = super
hash['cybersourceDecisionManager'] = @cybersource_decision_manager.to_h unless @cybersource_decision_manager.nil?
hash['fraudServiceResult'] = @fraud_service_result unless @fraud_service_result.nil?
hash['inAuth'] = @in_auth.to_h unless @in_auth.nil?
hash['microsoftFraudProtection'] = @microsoft_fraud_protection.to_h unless @microsoft_fraud_protection.nil?
Expand All @@ -33,6 +38,10 @@ def to_h

def from_hash(hash)
super
if hash.has_key? 'cybersourceDecisionManager'
raise TypeError, "value '%s' is not a Hash" % [hash['cybersourceDecisionManager']] unless hash['cybersourceDecisionManager'].is_a? Hash
@cybersource_decision_manager = Worldline::Connect::SDK::V1::Domain::CybersourceDecisionManager.new_from_hash(hash['cybersourceDecisionManager'])
end
if hash.has_key? 'fraudServiceResult'
@fraud_service_result = hash['fraudServiceResult']
end
Expand Down
11 changes: 11 additions & 0 deletions lib/worldline/connect/sdk/v1/domain/microsoft_fraud_results.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module Domain
# @attr [String] device_id
# @attr [Integer] fraud_score
# @attr [String] policy_applied
# @attr [Array<String>] reason_codes
# @attr [String] true_ip_address
# @attr [String] user_device_type
class MicrosoftFraudResults < Worldline::Connect::SDK::Domain::DataObject
Expand All @@ -28,6 +29,8 @@ class MicrosoftFraudResults < Worldline::Connect::SDK::Domain::DataObject

attr_accessor :policy_applied

attr_accessor :reason_codes

attr_accessor :true_ip_address

attr_accessor :user_device_type
Expand All @@ -40,6 +43,7 @@ def to_h
hash['deviceId'] = @device_id unless @device_id.nil?
hash['fraudScore'] = @fraud_score unless @fraud_score.nil?
hash['policyApplied'] = @policy_applied unless @policy_applied.nil?
hash['reasonCodes'] = @reason_codes unless @reason_codes.nil?
hash['trueIpAddress'] = @true_ip_address unless @true_ip_address.nil?
hash['userDeviceType'] = @user_device_type unless @user_device_type.nil?
hash
Expand All @@ -62,6 +66,13 @@ def from_hash(hash)
if hash.has_key? 'policyApplied'
@policy_applied = hash['policyApplied']
end
if hash.has_key? 'reasonCodes'
raise TypeError, "value '%s' is not an Array" % [hash['reasonCodes']] unless hash['reasonCodes'].is_a? Array
@reason_codes = []
hash['reasonCodes'].each do |e|
@reason_codes << e
end
end
if hash.has_key? 'trueIpAddress'
@true_ip_address = hash['trueIpAddress']
end
Expand Down

0 comments on commit 297e582

Please sign in to comment.