Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Release 2.40.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
IngenicoEPayments committed Jun 28, 2023
1 parent 0cd09ba commit 2af7bd4
Show file tree
Hide file tree
Showing 7 changed files with 42 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 = '2.39.0'
spec.version = '2.40.0'
spec.authors = ['Ingenico ePayments']
spec.email = ['github@epay.ingenico.com']
spec.summary = %q{SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module Domain
module Hostedcheckout

# @attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::DisplayedData] displayed_data
# @attr [true/false] is_checked_remember_me
# @attr [Ingenico::Connect::SDK::Domain::Payment::Payment] payment
# @attr [Ingenico::Connect::SDK::Domain::Payment::PaymentCreationReferences] payment_creation_references
# @attr [String] payment_status_category
Expand All @@ -21,6 +22,8 @@ class CreatedPaymentOutput < Ingenico::Connect::SDK::DataObject

attr_accessor :displayed_data

attr_accessor :is_checked_remember_me

attr_accessor :payment

attr_accessor :payment_creation_references
Expand All @@ -37,6 +40,7 @@ class CreatedPaymentOutput < Ingenico::Connect::SDK::DataObject
def to_h
hash = super
hash['displayedData'] = @displayed_data.to_h unless @displayed_data.nil?
hash['isCheckedRememberMe'] = @is_checked_remember_me unless @is_checked_remember_me.nil?
hash['payment'] = @payment.to_h unless @payment.nil?
hash['paymentCreationReferences'] = @payment_creation_references.to_h unless @payment_creation_references.nil?
hash['paymentStatusCategory'] = @payment_status_category unless @payment_status_category.nil?
Expand All @@ -51,6 +55,9 @@ def from_hash(hash)
raise TypeError, "value '%s' is not a Hash" % [hash['displayedData']] unless hash['displayedData'].is_a? Hash
@displayed_data = Ingenico::Connect::SDK::Domain::Hostedcheckout::DisplayedData.new_from_hash(hash['displayedData'])
end
if hash.has_key? 'isCheckedRememberMe'
@is_checked_remember_me = hash['isCheckedRememberMe']
end
if hash.has_key? 'payment'
raise TypeError, "value '%s' is not a Hash" % [hash['payment']] unless hash['payment'].is_a? Hash
@payment = Ingenico::Connect::SDK::Domain::Payment::Payment.new_from_hash(hash['payment'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ module Ingenico::Connect::SDK
module Domain
module Payment

# @attr [true/false] is_checked_remember_me
# @attr [true/false] is_new_token
# @attr [String] token
# @attr [true/false] tokenization_succeeded
class PaymentCreationOutput < Ingenico::Connect::SDK::Domain::Payment::PaymentCreationReferences

attr_accessor :is_checked_remember_me

attr_accessor :is_new_token

attr_accessor :token
Expand All @@ -22,6 +25,7 @@ class PaymentCreationOutput < Ingenico::Connect::SDK::Domain::Payment::PaymentCr
# @return (Hash)
def to_h
hash = super
hash['isCheckedRememberMe'] = @is_checked_remember_me unless @is_checked_remember_me.nil?
hash['isNewToken'] = @is_new_token unless @is_new_token.nil?
hash['token'] = @token unless @token.nil?
hash['tokenizationSucceeded'] = @tokenization_succeeded unless @tokenization_succeeded.nil?
Expand All @@ -30,6 +34,9 @@ def to_h

def from_hash(hash)
super
if hash.has_key? 'isCheckedRememberMe'
@is_checked_remember_me = hash['isCheckedRememberMe']
end
if hash.has_key? 'isNewToken'
@is_new_token = hash['isNewToken']
end
Expand Down
7 changes: 7 additions & 0 deletions lib/ingenico/connect/sdk/domain/payment/payment_references.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module Payment
# @attr [String] merchant_reference
# @attr [String] payment_reference
# @attr [String] provider_id
# @attr [String] provider_merchant_id
# @attr [String] provider_reference
# @attr [String] reference_orig_payment
class PaymentReferences < Ingenico::Connect::SDK::DataObject
Expand All @@ -24,6 +25,8 @@ class PaymentReferences < Ingenico::Connect::SDK::DataObject

attr_accessor :provider_id

attr_accessor :provider_merchant_id

attr_accessor :provider_reference

attr_accessor :reference_orig_payment
Expand All @@ -35,6 +38,7 @@ def to_h
hash['merchantReference'] = @merchant_reference unless @merchant_reference.nil?
hash['paymentReference'] = @payment_reference unless @payment_reference.nil?
hash['providerId'] = @provider_id unless @provider_id.nil?
hash['providerMerchantId'] = @provider_merchant_id unless @provider_merchant_id.nil?
hash['providerReference'] = @provider_reference unless @provider_reference.nil?
hash['referenceOrigPayment'] = @reference_orig_payment unless @reference_orig_payment.nil?
hash
Expand All @@ -54,6 +58,9 @@ def from_hash(hash)
if hash.has_key? 'providerId'
@provider_id = hash['providerId']
end
if hash.has_key? 'providerMerchantId'
@provider_merchant_id = hash['providerMerchantId']
end
if hash.has_key? 'providerReference'
@provider_reference = hash['providerReference']
end
Expand Down
12 changes: 12 additions & 0 deletions lib/ingenico/connect/sdk/domain/payment/payment_status_output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# This class was auto-generated from the API references found at
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
#
require 'ingenico/connect/sdk/domain/definitions/key_value_pair'
require 'ingenico/connect/sdk/domain/definitions/order_status_output'

module Ingenico::Connect::SDK
Expand All @@ -11,6 +12,7 @@ module Payment
# @attr [true/false] is_authorized
# @attr [true/false] is_refundable
# @attr [true/false] is_retriable
# @attr [Array<Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair>] provider_raw_output
# @attr [String] three_d_secure_status
class PaymentStatusOutput < Ingenico::Connect::SDK::Domain::Definitions::OrderStatusOutput

Expand All @@ -20,6 +22,8 @@ class PaymentStatusOutput < Ingenico::Connect::SDK::Domain::Definitions::OrderSt

attr_accessor :is_retriable

attr_accessor :provider_raw_output

attr_accessor :three_d_secure_status

# @return (Hash)
Expand All @@ -28,6 +32,7 @@ def to_h
hash['isAuthorized'] = @is_authorized unless @is_authorized.nil?
hash['isRefundable'] = @is_refundable unless @is_refundable.nil?
hash['isRetriable'] = @is_retriable unless @is_retriable.nil?
hash['providerRawOutput'] = @provider_raw_output.collect{|val| val.to_h} unless @provider_raw_output.nil?
hash['threeDSecureStatus'] = @three_d_secure_status unless @three_d_secure_status.nil?
hash
end
Expand All @@ -43,6 +48,13 @@ def from_hash(hash)
if hash.has_key? 'isRetriable'
@is_retriable = hash['isRetriable']
end
if hash.has_key? 'providerRawOutput'
raise TypeError, "value '%s' is not an Array" % [hash['providerRawOutput']] unless hash['providerRawOutput'].is_a? Array
@provider_raw_output = []
hash['providerRawOutput'].each do |e|
@provider_raw_output << Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair.new_from_hash(e)
end
end
if hash.has_key? 'threeDSecureStatus'
@three_d_secure_status = hash['threeDSecureStatus']
end
Expand Down
7 changes: 7 additions & 0 deletions lib/ingenico/connect/sdk/domain/payment/scheme_token_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ module Ingenico::Connect::SDK
module Domain
module Payment

# @attr [String] cardholder_name
# @attr [String] cryptogram
# @attr [String] eci
# @attr [String] network_token
# @attr [String] token_expiry_date
class SchemeTokenData < Ingenico::Connect::SDK::DataObject

attr_accessor :cardholder_name

attr_accessor :cryptogram

attr_accessor :eci
Expand All @@ -25,6 +28,7 @@ class SchemeTokenData < Ingenico::Connect::SDK::DataObject
# @return (Hash)
def to_h
hash = super
hash['cardholderName'] = @cardholder_name unless @cardholder_name.nil?
hash['cryptogram'] = @cryptogram unless @cryptogram.nil?
hash['eci'] = @eci unless @eci.nil?
hash['networkToken'] = @network_token unless @network_token.nil?
Expand All @@ -34,6 +38,9 @@ def to_h

def from_hash(hash)
super
if hash.has_key? 'cardholderName'
@cardholder_name = hash['cardholderName']
end
if hash.has_key? 'cryptogram'
@cryptogram = hash['cryptogram']
end
Expand Down
2 changes: 1 addition & 1 deletion lib/ingenico/connect/sdk/meta_data_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Ingenico::Connect::SDK
#
# @attr_reader [Array<Ingenico::Connect::SDK::RequestHeader>] meta_data_headers List of headers that should be used in all requests.
class MetaDataProvider
@@SDK_VERSION = '2.39.0'
@@SDK_VERSION = '2.40.0'
@@SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'
@@PROHIBITED_HEADERS = [@@SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key',
'Date', 'Content-Type', 'Authorization'].sort!.freeze
Expand Down

0 comments on commit 2af7bd4

Please sign in to comment.