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

Commit

Permalink
Release 2.20.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
IngenicoEPayments authored and jenkins committed Apr 9, 2021
1 parent 5fe3d99 commit 479962f
Show file tree
Hide file tree
Showing 4 changed files with 25 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.19.0'
spec.version = '2.20.0'
spec.authors = ['Ingenico ePayments']
spec.email = ['[email protected]']
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 @@ -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/bank_account_bban'
require 'ingenico/connect/sdk/domain/definitions/bank_account_iban'
require 'ingenico/connect/sdk/domain/definitions/fraud_results'
require 'ingenico/connect/sdk/domain/payment/abstract_payment_method_specific_output'
Expand All @@ -14,7 +15,9 @@ module Ingenico::Connect::SDK
module Domain
module Payment

# @attr [Ingenico::Connect::SDK::Domain::Definitions::BankAccountBban] bank_account_bban
# @attr [Ingenico::Connect::SDK::Domain::Definitions::BankAccountIban] bank_account_iban
# @attr [String] bic
# @attr [Ingenico::Connect::SDK::Domain::Definitions::FraudResults] fraud_results
# @attr [Ingenico::Connect::SDK::Domain::Payment::PaymentProduct3201SpecificOutput] payment_product3201_specific_output
# @attr [Ingenico::Connect::SDK::Domain::Payment::PaymentProduct806SpecificOutput] payment_product806_specific_output
Expand All @@ -23,8 +26,12 @@ module Payment
# @attr [String] token
class RedirectPaymentMethodSpecificOutput < Ingenico::Connect::SDK::Domain::Payment::AbstractPaymentMethodSpecificOutput

attr_accessor :bank_account_bban

attr_accessor :bank_account_iban

attr_accessor :bic

attr_accessor :fraud_results

attr_accessor :payment_product3201_specific_output
Expand All @@ -40,7 +47,9 @@ class RedirectPaymentMethodSpecificOutput < Ingenico::Connect::SDK::Domain::Paym
# @return (Hash)
def to_h
hash = super
hash['bankAccountBban'] = @bank_account_bban.to_h unless @bank_account_bban.nil?
hash['bankAccountIban'] = @bank_account_iban.to_h unless @bank_account_iban.nil?
hash['bic'] = @bic unless @bic.nil?
hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil?
hash['paymentProduct3201SpecificOutput'] = @payment_product3201_specific_output.to_h unless @payment_product3201_specific_output.nil?
hash['paymentProduct806SpecificOutput'] = @payment_product806_specific_output.to_h unless @payment_product806_specific_output.nil?
Expand All @@ -52,10 +61,17 @@ def to_h

def from_hash(hash)
super
if hash.has_key? 'bankAccountBban'
raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountBban']] unless hash['bankAccountBban'].is_a? Hash
@bank_account_bban = Ingenico::Connect::SDK::Domain::Definitions::BankAccountBban.new_from_hash(hash['bankAccountBban'])
end
if hash.has_key? 'bankAccountIban'
raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountIban']] unless hash['bankAccountIban'].is_a? Hash
@bank_account_iban = Ingenico::Connect::SDK::Domain::Definitions::BankAccountIban.new_from_hash(hash['bankAccountIban'])
end
if hash.has_key? 'bic'
@bic = hash['bic']
end
if hash.has_key? 'fraudResults'
raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']] unless hash['fraudResults'].is_a? Hash
@fraud_results = Ingenico::Connect::SDK::Domain::Definitions::FraudResults.new_from_hash(hash['fraudResults'])
Expand Down
7 changes: 7 additions & 0 deletions lib/ingenico/connect/sdk/domain/services/payment_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,24 @@ module Services

# @attr [Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney] amount_of_money
# @attr [String] country_code
# @attr [true/false] is_installments
# @attr [true/false] is_recurring
class PaymentContext < Ingenico::Connect::SDK::DataObject

attr_accessor :amount_of_money

attr_accessor :country_code

attr_accessor :is_installments

attr_accessor :is_recurring

# @return (Hash)
def to_h
hash = super
hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
hash['countryCode'] = @country_code unless @country_code.nil?
hash['isInstallments'] = @is_installments unless @is_installments.nil?
hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
hash
end
Expand All @@ -38,6 +42,9 @@ def from_hash(hash)
if hash.has_key? 'countryCode'
@country_code = hash['countryCode']
end
if hash.has_key? 'isInstallments'
@is_installments = hash['isInstallments']
end
if hash.has_key? 'isRecurring'
@is_recurring = hash['isRecurring']
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.19.0'
@@SDK_VERSION = '2.20.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 479962f

Please sign in to comment.