diff --git a/connect-sdk-ruby.gemspec b/connect-sdk-ruby.gemspec index 9ade300..c607068 100644 --- a/connect-sdk-ruby.gemspec +++ b/connect-sdk-ruby.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |spec| spec.name = 'connect-sdk-ruby' - spec.version = '2.18.1' + spec.version = '2.19.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} diff --git a/examples/merchant/payments/complete_payment_example.rb b/examples/merchant/payments/complete_payment_example.rb index 85c25e6..e9f6137 100644 --- a/examples/merchant/payments/complete_payment_example.rb +++ b/examples/merchant/payments/complete_payment_example.rb @@ -15,7 +15,7 @@ def example card = Definitions::CardWithoutCvv.new card.card_number = '67030000000000003' card.cardholder_name = 'Wile E. Coyote' - card.expiry_date = '1220' + card.expiry_date = '1299' card_payment_method_specific_input = Payment::CompletePaymentCardPaymentMethodSpecificInput.new card_payment_method_specific_input.card = card diff --git a/examples/merchant/payments/create_payment_example.rb b/examples/merchant/payments/create_payment_example.rb index fe81694..905b276 100644 --- a/examples/merchant/payments/create_payment_example.rb +++ b/examples/merchant/payments/create_payment_example.rb @@ -37,7 +37,7 @@ def example card.card_number = '4567350000427977' card.cardholder_name = 'Wile E. Coyote' card.cvv = '123' - card.expiry_date = '1220' + card.expiry_date = '1299' authentication_amount = Definitions::AmountOfMoney.new authentication_amount.amount = 2980 diff --git a/examples/merchant/riskassessments/risk_assessment_cards_example.rb b/examples/merchant/riskassessments/risk_assessment_cards_example.rb index b5bcb37..7bb4780 100644 --- a/examples/merchant/riskassessments/risk_assessment_cards_example.rb +++ b/examples/merchant/riskassessments/risk_assessment_cards_example.rb @@ -21,7 +21,7 @@ def example card = Definitions::Card.new card.card_number = '4567350000427977' card.cvv = '123' - card.expiry_date = '0820' + card.expiry_date = '1299' flight_legs = [] diff --git a/examples/merchant/tokens/update_token_example.rb b/examples/merchant/tokens/update_token_example.rb index 5c37cf7..5f7a987 100644 --- a/examples/merchant/tokens/update_token_example.rb +++ b/examples/merchant/tokens/update_token_example.rb @@ -47,7 +47,7 @@ def example card_without_cvv = Definitions::CardWithoutCvv.new card_without_cvv.card_number = '4567350000427977' card_without_cvv.cardholder_name = 'Wile E. Coyote' - card_without_cvv.expiry_date = '0820' + card_without_cvv.expiry_date = '1299' card_without_cvv.issue_number = '12' data = Token::TokenCardData.new diff --git a/lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb b/lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb index be02a40..8f6ab42 100644 --- a/lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb +++ b/lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb @@ -16,6 +16,7 @@ module Payment # @attr [Ingenico::Connect::SDK::Domain::Payment::NonSepaDirectDebitPaymentProduct705SpecificInput] payment_product705_specific_input # @attr [Ingenico::Connect::SDK::Domain::Payment::NonSepaDirectDebitPaymentProduct730SpecificInput] payment_product730_specific_input # @attr [String] recurring_payment_sequence_indicator + # @attr [true/false] requires_approval # @attr [String] token # @attr [true/false] tokenize class NonSepaDirectDebitPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput @@ -32,6 +33,8 @@ class NonSepaDirectDebitPaymentMethodSpecificInput < Ingenico::Connect::SDK::Dom attr_accessor :recurring_payment_sequence_indicator + attr_accessor :requires_approval + attr_accessor :token attr_accessor :tokenize @@ -45,6 +48,7 @@ def to_h hash['paymentProduct705SpecificInput'] = @payment_product705_specific_input.to_h unless @payment_product705_specific_input.nil? hash['paymentProduct730SpecificInput'] = @payment_product730_specific_input.to_h unless @payment_product730_specific_input.nil? hash['recurringPaymentSequenceIndicator'] = @recurring_payment_sequence_indicator unless @recurring_payment_sequence_indicator.nil? + hash['requiresApproval'] = @requires_approval unless @requires_approval.nil? hash['token'] = @token unless @token.nil? hash['tokenize'] = @tokenize unless @tokenize.nil? hash @@ -72,6 +76,9 @@ def from_hash(hash) if hash.has_key? 'recurringPaymentSequenceIndicator' @recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator'] end + if hash.has_key? 'requiresApproval' + @requires_approval = hash['requiresApproval'] + end if hash.has_key? 'token' @token = hash['token'] end diff --git a/lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_input.rb b/lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_input.rb index 8348071..e80d560 100644 --- a/lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_input.rb +++ b/lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_input.rb @@ -14,6 +14,7 @@ module Payment # @attr [true/false] is_recurring # @attr [Ingenico::Connect::SDK::Domain::Payment::SepaDirectDebitPaymentProduct771SpecificInput] payment_product771_specific_input # @attr [String] recurring_payment_sequence_indicator + # @attr [true/false] requires_approval # @attr [String] token # @attr [true/false] tokenize class SepaDirectDebitPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Payment::AbstractSepaDirectDebitPaymentMethodSpecificInput @@ -28,6 +29,8 @@ class SepaDirectDebitPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain attr_accessor :recurring_payment_sequence_indicator + attr_accessor :requires_approval + attr_accessor :token attr_accessor :tokenize @@ -40,6 +43,7 @@ def to_h hash['isRecurring'] = @is_recurring unless @is_recurring.nil? hash['paymentProduct771SpecificInput'] = @payment_product771_specific_input.to_h unless @payment_product771_specific_input.nil? hash['recurringPaymentSequenceIndicator'] = @recurring_payment_sequence_indicator unless @recurring_payment_sequence_indicator.nil? + hash['requiresApproval'] = @requires_approval unless @requires_approval.nil? hash['token'] = @token unless @token.nil? hash['tokenize'] = @tokenize unless @tokenize.nil? hash @@ -63,6 +67,9 @@ def from_hash(hash) if hash.has_key? 'recurringPaymentSequenceIndicator' @recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator'] end + if hash.has_key? 'requiresApproval' + @requires_approval = hash['requiresApproval'] + end if hash.has_key? 'token' @token = hash['token'] end diff --git a/lib/ingenico/connect/sdk/meta_data_provider.rb b/lib/ingenico/connect/sdk/meta_data_provider.rb index c1ef574..7750295 100644 --- a/lib/ingenico/connect/sdk/meta_data_provider.rb +++ b/lib/ingenico/connect/sdk/meta_data_provider.rb @@ -7,7 +7,7 @@ module Ingenico::Connect::SDK # # @attr_reader [Array] meta_data_headers List of headers that should be used in all requests. class MetaDataProvider - @@SDK_VERSION = '2.18.1' + @@SDK_VERSION = '2.19.0' @@SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo' @@PROHIBITED_HEADERS = [@@SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key', 'Date', 'Content-Type', 'Authorization'].sort!.freeze