From 0cd09ba43a5982990a056fc3af8d9ab019da2c51 Mon Sep 17 00:00:00 2001 From: Ingenico ePayments Date: Tue, 16 May 2023 10:20:36 +0200 Subject: [PATCH] Release 2.39.0. --- connect-sdk-ruby.gemspec | 2 +- .../sdk/domain/definitions/airline_data.rb | 7 +++++++ lib/ingenico/connect/sdk/meta_data_provider.rb | 2 +- spec/integration/multipart_form_data_spec.rb | 18 ++++++++++-------- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/connect-sdk-ruby.gemspec b/connect-sdk-ruby.gemspec index 0c9d8d3..f2d5e09 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.38.0' + spec.version = '2.39.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/lib/ingenico/connect/sdk/domain/definitions/airline_data.rb b/lib/ingenico/connect/sdk/domain/definitions/airline_data.rb index 5f234ec..8104e4e 100644 --- a/lib/ingenico/connect/sdk/domain/definitions/airline_data.rb +++ b/lib/ingenico/connect/sdk/domain/definitions/airline_data.rb @@ -22,6 +22,7 @@ module Definitions # @attr [String] issue_date # @attr [String] merchant_customer_id # @attr [String] name + # @attr [Integer] number_in_party # @attr [String] passenger_name # @attr [Array] passengers # @attr [String] place_of_issue @@ -62,6 +63,8 @@ class AirlineData < Ingenico::Connect::SDK::DataObject attr_accessor :name + attr_accessor :number_in_party + attr_accessor :passenger_name attr_accessor :passengers @@ -101,6 +104,7 @@ def to_h hash['issueDate'] = @issue_date unless @issue_date.nil? hash['merchantCustomerId'] = @merchant_customer_id unless @merchant_customer_id.nil? hash['name'] = @name unless @name.nil? + hash['numberInParty'] = @number_in_party unless @number_in_party.nil? hash['passengerName'] = @passenger_name unless @passenger_name.nil? hash['passengers'] = @passengers.collect{|val| val.to_h} unless @passengers.nil? hash['placeOfIssue'] = @place_of_issue unless @place_of_issue.nil? @@ -158,6 +162,9 @@ def from_hash(hash) if hash.has_key? 'name' @name = hash['name'] end + if hash.has_key? 'numberInParty' + @number_in_party = hash['numberInParty'] + end if hash.has_key? 'passengerName' @passenger_name = hash['passengerName'] end diff --git a/lib/ingenico/connect/sdk/meta_data_provider.rb b/lib/ingenico/connect/sdk/meta_data_provider.rb index 6781f91..01a6a3a 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.38.0' + @@SDK_VERSION = '2.39.0' @@SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo' @@PROHIBITED_HEADERS = [@@SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key', 'Date', 'Content-Type', 'Authorization'].sort!.freeze diff --git a/spec/integration/multipart_form_data_spec.rb b/spec/integration/multipart_form_data_spec.rb index aa276af..75519c8 100644 --- a/spec/integration/multipart_form_data_spec.rb +++ b/spec/integration/multipart_form_data_spec.rb @@ -9,12 +9,14 @@ require 'ingenico/connect/sdk/uploadable_file' describe 'multipart/form-data support' do + HTTPBIN_URL = ENV['httpbin_url'] || 'http://httpbin.org' + before(:context) { WebMock.allow_net_connect! } after(:context) { WebMock.disable_net_connect! } it 'Can send a Multipart Form Data Object POST upload with a response' do configuration = Integration.init_communicator_configuration - configuration.api_endpoint = 'http://httpbin.org' + configuration.api_endpoint = HTTPBIN_URL multipart = Ingenico::Connect::SDK::MultipartFormDataObject.new multipart.add_file 'file', Ingenico::Connect::SDK::UploadableFile.new( @@ -34,7 +36,7 @@ it 'Can send a Multipart Form Data Request POST upload with a response' do configuration = Integration.init_communicator_configuration - configuration.api_endpoint = 'http://httpbin.org' + configuration.api_endpoint = HTTPBIN_URL multipart = Ingenico::Connect::SDK::MultipartFormDataObject.new multipart.add_file 'file', Ingenico::Connect::SDK::UploadableFile.new( @@ -54,7 +56,7 @@ it 'Can send a Multipart Form Data Object POST upload with a binary response' do configuration = Integration.init_communicator_configuration - configuration.api_endpoint = 'http://httpbin.org' + configuration.api_endpoint = HTTPBIN_URL multipart = Ingenico::Connect::SDK::MultipartFormDataObject.new multipart.add_file 'file', Ingenico::Connect::SDK::UploadableFile.new( @@ -77,7 +79,7 @@ it 'Can send a Multipart Form Data Request POST upload with a binary response' do configuration = Integration.init_communicator_configuration - configuration.api_endpoint = 'http://httpbin.org' + configuration.api_endpoint = HTTPBIN_URL multipart = Ingenico::Connect::SDK::MultipartFormDataObject.new multipart.add_file 'file', Ingenico::Connect::SDK::UploadableFile.new( @@ -100,7 +102,7 @@ it 'Can send a Multipart Form Data Object PUT upload with a response' do configuration = Integration.init_communicator_configuration - configuration.api_endpoint = 'http://httpbin.org' + configuration.api_endpoint = HTTPBIN_URL multipart = Ingenico::Connect::SDK::MultipartFormDataObject.new multipart.add_file 'file', Ingenico::Connect::SDK::UploadableFile.new( @@ -120,7 +122,7 @@ it 'Can send a Multipart Form Data Request PUT upload with a response' do configuration = Integration.init_communicator_configuration - configuration.api_endpoint = 'http://httpbin.org' + configuration.api_endpoint = HTTPBIN_URL multipart = Ingenico::Connect::SDK::MultipartFormDataObject.new multipart.add_file 'file', Ingenico::Connect::SDK::UploadableFile.new( @@ -140,7 +142,7 @@ it 'Can send a Multipart Form Data Object PUT upload with a binary response' do configuration = Integration.init_communicator_configuration - configuration.api_endpoint = 'http://httpbin.org' + configuration.api_endpoint = HTTPBIN_URL multipart = Ingenico::Connect::SDK::MultipartFormDataObject.new multipart.add_file 'file', Ingenico::Connect::SDK::UploadableFile.new( @@ -163,7 +165,7 @@ it 'Can send a Multipart Form Data Request PUT upload with a binary response' do configuration = Integration.init_communicator_configuration - configuration.api_endpoint = 'http://httpbin.org' + configuration.api_endpoint = HTTPBIN_URL multipart = Ingenico::Connect::SDK::MultipartFormDataObject.new multipart.add_file 'file', Ingenico::Connect::SDK::UploadableFile.new(