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

Commit

Permalink
Release 1.16.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingenico ePayments committed Dec 18, 2017
1 parent 83d00d8 commit 273fa5f
Show file tree
Hide file tree
Showing 11 changed files with 163 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 = '1.15.0'
spec.version = '1.16.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
14 changes: 14 additions & 0 deletions lib/ingenico/connect/sdk/domain/definitions/airline_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#
require 'ingenico/connect/sdk/data_object'
require 'ingenico/connect/sdk/domain/definitions/airline_flight_leg'
require 'ingenico/connect/sdk/domain/definitions/airline_passenger'

module Ingenico::Connect::SDK
module Domain
Expand Down Expand Up @@ -50,6 +51,9 @@ class AirlineData < Ingenico::Connect::SDK::DataObject
# String
attr_accessor :passenger_name

# Array of {Ingenico::Connect::SDK::Domain::Definitions::AirlinePassenger}
attr_accessor :passengers

# String
attr_accessor :place_of_issue

Expand Down Expand Up @@ -83,6 +87,7 @@ def to_h
add_to_hash(hash, 'merchantCustomerId', @merchant_customer_id)
add_to_hash(hash, 'name', @name)
add_to_hash(hash, 'passengerName', @passenger_name)
add_to_hash(hash, 'passengers', @passengers)
add_to_hash(hash, 'placeOfIssue', @place_of_issue)
add_to_hash(hash, 'pnr', @pnr)
add_to_hash(hash, 'pointOfSale', @point_of_sale)
Expand Down Expand Up @@ -139,6 +144,15 @@ def from_hash(hash)
if hash.has_key?('passengerName')
@passenger_name = hash['passengerName']
end
if hash.has_key?('passengers')
if !(hash['passengers'].is_a? Array)
raise TypeError, "value '%s' is not an Array" % [hash['passengers']]
end
@passengers = []
hash['passengers'].each do |e|
@passengers << Ingenico::Connect::SDK::Domain::Definitions::AirlinePassenger.new_from_hash(e)
end
end
if hash.has_key?('placeOfIssue')
@place_of_issue = hash['placeOfIssue']
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ class AirlineFlightLeg < Ingenico::Connect::SDK::DataObject
# String
attr_accessor :origin_airport

# String
attr_accessor :service_class

# String
attr_accessor :stopover_code

Expand All @@ -55,6 +58,7 @@ def to_h
add_to_hash(hash, 'flightNumber', @flight_number)
add_to_hash(hash, 'number', @number)
add_to_hash(hash, 'originAirport', @origin_airport)
add_to_hash(hash, 'serviceClass', @service_class)
add_to_hash(hash, 'stopoverCode', @stopover_code)
hash
end
Expand Down Expand Up @@ -91,6 +95,9 @@ def from_hash(hash)
if hash.has_key?('originAirport')
@origin_airport = hash['originAirport']
end
if hash.has_key?('serviceClass')
@service_class = hash['serviceClass']
end
if hash.has_key?('stopoverCode')
@stopover_code = hash['stopoverCode']
end
Expand Down
52 changes: 52 additions & 0 deletions lib/ingenico/connect/sdk/domain/definitions/airline_passenger.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#
# This class was auto-generated from the API references found at
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
#
require 'ingenico/connect/sdk/data_object'

module Ingenico::Connect::SDK
module Domain
module Definitions

class AirlinePassenger < Ingenico::Connect::SDK::DataObject

# String
attr_accessor :first_name

# String
attr_accessor :surname

# String
attr_accessor :surname_prefix

# String
attr_accessor :title

def to_h
hash = super
add_to_hash(hash, 'firstName', @first_name)
add_to_hash(hash, 'surname', @surname)
add_to_hash(hash, 'surnamePrefix', @surname_prefix)
add_to_hash(hash, 'title', @title)
hash
end

def from_hash(hash)
super
if hash.has_key?('firstName')
@first_name = hash['firstName']
end
if hash.has_key?('surname')
@surname = hash['surname']
end
if hash.has_key?('surnamePrefix')
@surname_prefix = hash['surnamePrefix']
end
if hash.has_key?('title')
@title = hash['title']
end
end
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ module Mandates

class CreateMandateBase < Ingenico::Connect::SDK::DataObject

# String
attr_accessor :alias

# {Ingenico::Connect::SDK::Domain::Mandates::MandateCustomer}
attr_accessor :customer

Expand All @@ -28,6 +31,7 @@ class CreateMandateBase < Ingenico::Connect::SDK::DataObject

def to_h
hash = super
add_to_hash(hash, 'alias', @alias)
add_to_hash(hash, 'customer', @customer)
add_to_hash(hash, 'customerReference', @customer_reference)
add_to_hash(hash, 'language', @language)
Expand All @@ -38,6 +42,9 @@ def to_h

def from_hash(hash)
super
if hash.has_key?('alias')
@alias = hash['alias']
end
if hash.has_key?('customer')
if !(hash['customer'].is_a? Hash)
raise TypeError, "value '%s' is not a Hash" % [hash['customer']]
Expand Down
7 changes: 7 additions & 0 deletions lib/ingenico/connect/sdk/domain/mandates/mandate_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ module Mandates

class MandateResponse < Ingenico::Connect::SDK::DataObject

# String
attr_accessor :alias

# {Ingenico::Connect::SDK::Domain::Mandates::MandateCustomer}
attr_accessor :customer

Expand All @@ -28,6 +31,7 @@ class MandateResponse < Ingenico::Connect::SDK::DataObject

def to_h
hash = super
add_to_hash(hash, 'alias', @alias)
add_to_hash(hash, 'customer', @customer)
add_to_hash(hash, 'customerReference', @customer_reference)
add_to_hash(hash, 'recurrenceType', @recurrence_type)
Expand All @@ -38,6 +42,9 @@ def to_h

def from_hash(hash)
super
if hash.has_key?('alias')
@alias = hash['alias']
end
if hash.has_key?('customer')
if !(hash['customer'].is_a? Hash)
raise TypeError, "value '%s' is not a Hash" % [hash['customer']]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# This class was auto-generated from the API references found at
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
#
require 'ingenico/connect/sdk/data_object'

module Ingenico::Connect::SDK
module Domain
module Payment

class HostedCheckoutSpecificOutput < Ingenico::Connect::SDK::DataObject

# String
attr_accessor :hosted_checkout_id

# String
attr_accessor :variant

def to_h
hash = super
add_to_hash(hash, 'hostedCheckoutId', @hosted_checkout_id)
add_to_hash(hash, 'variant', @variant)
hash
end

def from_hash(hash)
super
if hash.has_key?('hostedCheckoutId')
@hosted_checkout_id = hash['hostedCheckoutId']
end
if hash.has_key?('variant')
@variant = hash['variant']
end
end
end
end
end
end
11 changes: 11 additions & 0 deletions lib/ingenico/connect/sdk/domain/payment/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
#
require 'ingenico/connect/sdk/domain/definitions/abstract_order_status'
require 'ingenico/connect/sdk/domain/payment/hosted_checkout_specific_output'
require 'ingenico/connect/sdk/domain/payment/payment_output'
require 'ingenico/connect/sdk/domain/payment/payment_status_output'

Expand All @@ -12,6 +13,9 @@ module Payment

class Payment < Ingenico::Connect::SDK::Domain::Definitions::AbstractOrderStatus

# {Ingenico::Connect::SDK::Domain::Payment::HostedCheckoutSpecificOutput}
attr_accessor :hosted_checkout_specific_output

# {Ingenico::Connect::SDK::Domain::Payment::PaymentOutput}
attr_accessor :payment_output

Expand All @@ -23,6 +27,7 @@ class Payment < Ingenico::Connect::SDK::Domain::Definitions::AbstractOrderStatus

def to_h
hash = super
add_to_hash(hash, 'hostedCheckoutSpecificOutput', @hosted_checkout_specific_output)
add_to_hash(hash, 'paymentOutput', @payment_output)
add_to_hash(hash, 'status', @status)
add_to_hash(hash, 'statusOutput', @status_output)
Expand All @@ -31,6 +36,12 @@ def to_h

def from_hash(hash)
super
if hash.has_key?('hostedCheckoutSpecificOutput')
if !(hash['hostedCheckoutSpecificOutput'].is_a? Hash)
raise TypeError, "value '%s' is not a Hash" % [hash['hostedCheckoutSpecificOutput']]
end
@hosted_checkout_specific_output = Ingenico::Connect::SDK::Domain::Payment::HostedCheckoutSpecificOutput.new_from_hash(hash['hostedCheckoutSpecificOutput'])
end
if hash.has_key?('paymentOutput')
if !(hash['paymentOutput'].is_a? Hash)
raise TypeError, "value '%s' is not a Hash" % [hash['paymentOutput']]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
#
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'
require 'ingenico/connect/sdk/domain/payment/payment_product836_specific_output'
require 'ingenico/connect/sdk/domain/payment/payment_product840_specific_output'
Expand All @@ -16,6 +17,9 @@ class RedirectPaymentMethodSpecificOutput < Ingenico::Connect::SDK::Domain::Paym
# {Ingenico::Connect::SDK::Domain::Definitions::BankAccountIban}
attr_accessor :bank_account_iban

# {Ingenico::Connect::SDK::Domain::Definitions::FraudResults}
attr_accessor :fraud_results

# {Ingenico::Connect::SDK::Domain::Payment::PaymentProduct836SpecificOutput}
attr_accessor :payment_product836_specific_output

Expand All @@ -25,6 +29,7 @@ class RedirectPaymentMethodSpecificOutput < Ingenico::Connect::SDK::Domain::Paym
def to_h
hash = super
add_to_hash(hash, 'bankAccountIban', @bank_account_iban)
add_to_hash(hash, 'fraudResults', @fraud_results)
add_to_hash(hash, 'paymentProduct836SpecificOutput', @payment_product836_specific_output)
add_to_hash(hash, 'paymentProduct840SpecificOutput', @payment_product840_specific_output)
hash
Expand All @@ -38,6 +43,12 @@ def from_hash(hash)
end
@bank_account_iban = Ingenico::Connect::SDK::Domain::Definitions::BankAccountIban.new_from_hash(hash['bankAccountIban'])
end
if hash.has_key?('fraudResults')
if !(hash['fraudResults'].is_a? Hash)
raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']]
end
@fraud_results = Ingenico::Connect::SDK::Domain::Definitions::FraudResults.new_from_hash(hash['fraudResults'])
end
if hash.has_key?('paymentProduct836SpecificOutput')
if !(hash['paymentProduct836SpecificOutput'].is_a? Hash)
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct836SpecificOutput']]
Expand Down
14 changes: 14 additions & 0 deletions lib/ingenico/connect/sdk/domain/sessions/session_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ module Sessions

class SessionResponse < Ingenico::Connect::SDK::DataObject

# String
attr_accessor :asset_url

# String
attr_accessor :client_api_url

# String
attr_accessor :client_session_id

Expand All @@ -24,6 +30,8 @@ class SessionResponse < Ingenico::Connect::SDK::DataObject

def to_h
hash = super
add_to_hash(hash, 'assetUrl', @asset_url)
add_to_hash(hash, 'clientApiUrl', @client_api_url)
add_to_hash(hash, 'clientSessionId', @client_session_id)
add_to_hash(hash, 'customerId', @customer_id)
add_to_hash(hash, 'invalidTokens', @invalid_tokens)
Expand All @@ -33,6 +41,12 @@ def to_h

def from_hash(hash)
super
if hash.has_key?('assetUrl')
@asset_url = hash['assetUrl']
end
if hash.has_key?('clientApiUrl')
@client_api_url = hash['clientApiUrl']
end
if hash.has_key?('clientSessionId')
@client_session_id = hash['clientSessionId']
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 @@ -5,7 +5,7 @@ module Ingenico::Connect::SDK

# Manages metadata about the server using the SDK
class MetaDataProvider
@@SDK_VERSION = '1.15.0'
@@SDK_VERSION = '1.16.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 273fa5f

Please sign in to comment.