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

Commit

Permalink
Release 2.39.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
IngenicoEPayments committed May 16, 2023
1 parent a9e8efc commit 0cd09ba
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 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.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}
Expand Down
7 changes: 7 additions & 0 deletions lib/ingenico/connect/sdk/domain/definitions/airline_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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<Ingenico::Connect::SDK::Domain::Definitions::AirlinePassenger>] passengers
# @attr [String] place_of_issue
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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?
Expand Down Expand Up @@ -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
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.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
Expand Down
18 changes: 10 additions & 8 deletions spec/integration/multipart_form_data_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand Down

0 comments on commit 0cd09ba

Please sign in to comment.