connect-sdk-ruby 2.17.0 → 2.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/connect-sdk-ruby.gemspec +1 -1
- data/examples/merchant/example_configuration.yml +1 -1
- data/examples/merchant/payments/complete_payment_example.rb +1 -1
- data/examples/merchant/payments/create_payment_example.rb +1 -1
- data/examples/merchant/riskassessments/risk_assessment_cards_example.rb +1 -1
- data/examples/merchant/tokens/update_token_example.rb +1 -1
- data/lib/ingenico/connect/sdk/api_resource.rb +2 -2
- data/lib/ingenico/connect/sdk/domain/definitions/additional_order_input_airline_data.rb +9 -0
- data/lib/ingenico/connect/sdk/domain/definitions/lodging_charge.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/definitions/lodging_data.rb +147 -0
- data/lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb +88 -0
- data/lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb +9 -0
- data/lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb +2 -0
- data/lib/ingenico/connect/sdk/domain/payment/exemption_output.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input.rb +9 -0
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_output.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_product4101_specific_input.rb +39 -0
- data/lib/ingenico/connect/sdk/domain/payment/sdk_data_input.rb +2 -0
- data/lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_input.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/payment/three_d_secure_results.rb +9 -0
- data/lib/ingenico/connect/sdk/domain/services/payment_context.rb +7 -0
- data/lib/ingenico/connect/sdk/factory.rb +15 -15
- data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
- data/lib/ingenico/connect/sdk/modules.rb +1 -1
- data/spec/fixtures/resources/properties.proxy.yml +3 -3
- data/spec/fixtures/resources/properties.yml +1 -1
- data/spec/integration/payment_products_spec.rb +13 -0
- data/spec/integration/sdk_proxy_spec.rb +3 -2
- data/spec/integration_setup.rb +1 -1
- data/spec/lib/communicator_configuration_spec.rb +20 -20
- data/spec/lib/communicator_spec.rb +4 -4
- data/spec/lib/defaultimpl/default_connection_idempotence_spec.rb +7 -8
- data/spec/lib/defaultimpl/default_connection_logger_spec.rb +17 -17
- data/spec/lib/factory_spec.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b5b8f7aa27fc0820c2821ad162c634a592a1aeb3582582120b2c1bcae1c3d0f
|
4
|
+
data.tar.gz: d4df76e3c026c6ae17ae7285e9c990e7bd66d5fc6d8c7c0b019bd48623dc5a0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f1cf43dc3464e888c01c5e412fb28fa3b15795dc396e5275b070d8e6f6ebe580be09bdccff9101a5d08b94c766102251cc8d105557811a46add9f608787781b
|
7
|
+
data.tar.gz: 7954b53ff1e3e4ee765fb036e67e64f0df73378184607ee5378cf10f127b19d49639b6e249d83ff59694873845d4cb1d9a7cb1aaa14cfa35bb7d949ea1ce05f5
|
data/connect-sdk-ruby.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'connect-sdk-ruby'
|
3
|
-
spec.version = '2.
|
3
|
+
spec.version = '2.21.0'
|
4
4
|
spec.authors = ['Ingenico ePayments']
|
5
5
|
spec.email = ['github@epay.ingenico.com']
|
6
6
|
spec.summary = %q{SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API}
|
@@ -15,7 +15,7 @@ def example
|
|
15
15
|
card = Definitions::CardWithoutCvv.new
|
16
16
|
card.card_number = '67030000000000003'
|
17
17
|
card.cardholder_name = 'Wile E. Coyote'
|
18
|
-
card.expiry_date = '
|
18
|
+
card.expiry_date = '1299'
|
19
19
|
|
20
20
|
card_payment_method_specific_input = Payment::CompletePaymentCardPaymentMethodSpecificInput.new
|
21
21
|
card_payment_method_specific_input.card = card
|
@@ -37,7 +37,7 @@ def example
|
|
37
37
|
card.card_number = '4567350000427977'
|
38
38
|
card.cardholder_name = 'Wile E. Coyote'
|
39
39
|
card.cvv = '123'
|
40
|
-
card.expiry_date = '
|
40
|
+
card.expiry_date = '1299'
|
41
41
|
|
42
42
|
authentication_amount = Definitions::AmountOfMoney.new
|
43
43
|
authentication_amount.amount = 2980
|
@@ -47,7 +47,7 @@ def example
|
|
47
47
|
card_without_cvv = Definitions::CardWithoutCvv.new
|
48
48
|
card_without_cvv.card_number = '4567350000427977'
|
49
49
|
card_without_cvv.cardholder_name = 'Wile E. Coyote'
|
50
|
-
card_without_cvv.expiry_date = '
|
50
|
+
card_without_cvv.expiry_date = '1299'
|
51
51
|
card_without_cvv.issue_number = '12'
|
52
52
|
|
53
53
|
data = Token::TokenCardData.new
|
@@ -15,10 +15,10 @@ module Ingenico::Connect::SDK
|
|
15
15
|
# If a parent class is given its communicator will be used for communication.
|
16
16
|
# @param path_context [Hash] hash that contains substitutions for generic locations in the URL path.
|
17
17
|
# This hash will be used to instantiate a concrete URL used to access specific resources.
|
18
|
-
# For example in the URL https://api-
|
18
|
+
# For example in the URL https://eu.sandbox.api-ingenico.com/!{version}/!{merchantId}/payments
|
19
19
|
# !{version} and !{merchantId} can be instantiated using the hash
|
20
20
|
# !{'version' => 'v1', 'merchantId' => '1234'}. The final URL in this case will be
|
21
|
-
# https://api-
|
21
|
+
# https://eu.sandbox.api-ingenico.com/v1/1234/payments.
|
22
22
|
# @param client_meta_info [String] JSON string containing the meta data for the client.
|
23
23
|
def initialize(arg, path_context, client_meta_info=false)
|
24
24
|
if client_meta_info == false
|
@@ -4,20 +4,25 @@
|
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/data_object'
|
6
6
|
require 'ingenico/connect/sdk/domain/definitions/airline_data'
|
7
|
+
require 'ingenico/connect/sdk/domain/definitions/lodging_data'
|
7
8
|
|
8
9
|
module Ingenico::Connect::SDK
|
9
10
|
module Domain
|
10
11
|
module Definitions
|
11
12
|
|
12
13
|
# @attr [Ingenico::Connect::SDK::Domain::Definitions::AirlineData] airline_data
|
14
|
+
# @attr [Ingenico::Connect::SDK::Domain::Definitions::LodgingData] lodging_data
|
13
15
|
class AdditionalOrderInputAirlineData < Ingenico::Connect::SDK::DataObject
|
14
16
|
|
15
17
|
attr_accessor :airline_data
|
16
18
|
|
19
|
+
attr_accessor :lodging_data
|
20
|
+
|
17
21
|
# @return (Hash)
|
18
22
|
def to_h
|
19
23
|
hash = super
|
20
24
|
hash['airlineData'] = @airline_data.to_h unless @airline_data.nil?
|
25
|
+
hash['lodgingData'] = @lodging_data.to_h unless @lodging_data.nil?
|
21
26
|
hash
|
22
27
|
end
|
23
28
|
|
@@ -27,6 +32,10 @@ module Ingenico::Connect::SDK
|
|
27
32
|
raise TypeError, "value '%s' is not a Hash" % [hash['airlineData']] unless hash['airlineData'].is_a? Hash
|
28
33
|
@airline_data = Ingenico::Connect::SDK::Domain::Definitions::AirlineData.new_from_hash(hash['airlineData'])
|
29
34
|
end
|
35
|
+
if hash.has_key? 'lodgingData'
|
36
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['lodgingData']] unless hash['lodgingData'].is_a? Hash
|
37
|
+
@lodging_data = Ingenico::Connect::SDK::Domain::Definitions::LodgingData.new_from_hash(hash['lodgingData'])
|
38
|
+
end
|
30
39
|
end
|
31
40
|
end
|
32
41
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Definitions
|
10
|
+
|
11
|
+
# @attr [Integer] charge_amount
|
12
|
+
# @attr [String] charge_amount_currency_code
|
13
|
+
# @attr [String] charge_type
|
14
|
+
class LodgingCharge < Ingenico::Connect::SDK::DataObject
|
15
|
+
|
16
|
+
attr_accessor :charge_amount
|
17
|
+
|
18
|
+
attr_accessor :charge_amount_currency_code
|
19
|
+
|
20
|
+
attr_accessor :charge_type
|
21
|
+
|
22
|
+
# @return (Hash)
|
23
|
+
def to_h
|
24
|
+
hash = super
|
25
|
+
hash['chargeAmount'] = @charge_amount unless @charge_amount.nil?
|
26
|
+
hash['chargeAmountCurrencyCode'] = @charge_amount_currency_code unless @charge_amount_currency_code.nil?
|
27
|
+
hash['chargeType'] = @charge_type unless @charge_type.nil?
|
28
|
+
hash
|
29
|
+
end
|
30
|
+
|
31
|
+
def from_hash(hash)
|
32
|
+
super
|
33
|
+
if hash.has_key? 'chargeAmount'
|
34
|
+
@charge_amount = hash['chargeAmount']
|
35
|
+
end
|
36
|
+
if hash.has_key? 'chargeAmountCurrencyCode'
|
37
|
+
@charge_amount_currency_code = hash['chargeAmountCurrencyCode']
|
38
|
+
end
|
39
|
+
if hash.has_key? 'chargeType'
|
40
|
+
@charge_type = hash['chargeType']
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,147 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/definitions/lodging_charge'
|
7
|
+
require 'ingenico/connect/sdk/domain/definitions/lodging_room'
|
8
|
+
|
9
|
+
module Ingenico::Connect::SDK
|
10
|
+
module Domain
|
11
|
+
module Definitions
|
12
|
+
|
13
|
+
# @attr [Array<Ingenico::Connect::SDK::Domain::Definitions::LodgingCharge>] charges
|
14
|
+
# @attr [String] check_in_date
|
15
|
+
# @attr [String] check_out_date
|
16
|
+
# @attr [String] folio_number
|
17
|
+
# @attr [true/false] is_confirmed_reservation
|
18
|
+
# @attr [true/false] is_facility_fire_safety_conform
|
19
|
+
# @attr [true/false] is_no_show
|
20
|
+
# @attr [true/false] is_preference_smoking_room
|
21
|
+
# @attr [Integer] number_of_adults
|
22
|
+
# @attr [Integer] number_of_nights
|
23
|
+
# @attr [Integer] number_of_rooms
|
24
|
+
# @attr [String] program_code
|
25
|
+
# @attr [String] property_customer_service_phone_number
|
26
|
+
# @attr [String] property_phone_number
|
27
|
+
# @attr [String] renter_name
|
28
|
+
# @attr [Array<Ingenico::Connect::SDK::Domain::Definitions::LodgingRoom>] rooms
|
29
|
+
class LodgingData < Ingenico::Connect::SDK::DataObject
|
30
|
+
|
31
|
+
attr_accessor :charges
|
32
|
+
|
33
|
+
attr_accessor :check_in_date
|
34
|
+
|
35
|
+
attr_accessor :check_out_date
|
36
|
+
|
37
|
+
attr_accessor :folio_number
|
38
|
+
|
39
|
+
attr_accessor :is_confirmed_reservation
|
40
|
+
|
41
|
+
attr_accessor :is_facility_fire_safety_conform
|
42
|
+
|
43
|
+
attr_accessor :is_no_show
|
44
|
+
|
45
|
+
attr_accessor :is_preference_smoking_room
|
46
|
+
|
47
|
+
attr_accessor :number_of_adults
|
48
|
+
|
49
|
+
attr_accessor :number_of_nights
|
50
|
+
|
51
|
+
attr_accessor :number_of_rooms
|
52
|
+
|
53
|
+
attr_accessor :program_code
|
54
|
+
|
55
|
+
attr_accessor :property_customer_service_phone_number
|
56
|
+
|
57
|
+
attr_accessor :property_phone_number
|
58
|
+
|
59
|
+
attr_accessor :renter_name
|
60
|
+
|
61
|
+
attr_accessor :rooms
|
62
|
+
|
63
|
+
# @return (Hash)
|
64
|
+
def to_h
|
65
|
+
hash = super
|
66
|
+
hash['charges'] = @charges.collect{|val| val.to_h} unless @charges.nil?
|
67
|
+
hash['checkInDate'] = @check_in_date unless @check_in_date.nil?
|
68
|
+
hash['checkOutDate'] = @check_out_date unless @check_out_date.nil?
|
69
|
+
hash['folioNumber'] = @folio_number unless @folio_number.nil?
|
70
|
+
hash['isConfirmedReservation'] = @is_confirmed_reservation unless @is_confirmed_reservation.nil?
|
71
|
+
hash['isFacilityFireSafetyConform'] = @is_facility_fire_safety_conform unless @is_facility_fire_safety_conform.nil?
|
72
|
+
hash['isNoShow'] = @is_no_show unless @is_no_show.nil?
|
73
|
+
hash['isPreferenceSmokingRoom'] = @is_preference_smoking_room unless @is_preference_smoking_room.nil?
|
74
|
+
hash['numberOfAdults'] = @number_of_adults unless @number_of_adults.nil?
|
75
|
+
hash['numberOfNights'] = @number_of_nights unless @number_of_nights.nil?
|
76
|
+
hash['numberOfRooms'] = @number_of_rooms unless @number_of_rooms.nil?
|
77
|
+
hash['programCode'] = @program_code unless @program_code.nil?
|
78
|
+
hash['propertyCustomerServicePhoneNumber'] = @property_customer_service_phone_number unless @property_customer_service_phone_number.nil?
|
79
|
+
hash['propertyPhoneNumber'] = @property_phone_number unless @property_phone_number.nil?
|
80
|
+
hash['renterName'] = @renter_name unless @renter_name.nil?
|
81
|
+
hash['rooms'] = @rooms.collect{|val| val.to_h} unless @rooms.nil?
|
82
|
+
hash
|
83
|
+
end
|
84
|
+
|
85
|
+
def from_hash(hash)
|
86
|
+
super
|
87
|
+
if hash.has_key? 'charges'
|
88
|
+
raise TypeError, "value '%s' is not an Array" % [hash['charges']] unless hash['charges'].is_a? Array
|
89
|
+
@charges = []
|
90
|
+
hash['charges'].each do |e|
|
91
|
+
@charges << Ingenico::Connect::SDK::Domain::Definitions::LodgingCharge.new_from_hash(e)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
if hash.has_key? 'checkInDate'
|
95
|
+
@check_in_date = hash['checkInDate']
|
96
|
+
end
|
97
|
+
if hash.has_key? 'checkOutDate'
|
98
|
+
@check_out_date = hash['checkOutDate']
|
99
|
+
end
|
100
|
+
if hash.has_key? 'folioNumber'
|
101
|
+
@folio_number = hash['folioNumber']
|
102
|
+
end
|
103
|
+
if hash.has_key? 'isConfirmedReservation'
|
104
|
+
@is_confirmed_reservation = hash['isConfirmedReservation']
|
105
|
+
end
|
106
|
+
if hash.has_key? 'isFacilityFireSafetyConform'
|
107
|
+
@is_facility_fire_safety_conform = hash['isFacilityFireSafetyConform']
|
108
|
+
end
|
109
|
+
if hash.has_key? 'isNoShow'
|
110
|
+
@is_no_show = hash['isNoShow']
|
111
|
+
end
|
112
|
+
if hash.has_key? 'isPreferenceSmokingRoom'
|
113
|
+
@is_preference_smoking_room = hash['isPreferenceSmokingRoom']
|
114
|
+
end
|
115
|
+
if hash.has_key? 'numberOfAdults'
|
116
|
+
@number_of_adults = hash['numberOfAdults']
|
117
|
+
end
|
118
|
+
if hash.has_key? 'numberOfNights'
|
119
|
+
@number_of_nights = hash['numberOfNights']
|
120
|
+
end
|
121
|
+
if hash.has_key? 'numberOfRooms'
|
122
|
+
@number_of_rooms = hash['numberOfRooms']
|
123
|
+
end
|
124
|
+
if hash.has_key? 'programCode'
|
125
|
+
@program_code = hash['programCode']
|
126
|
+
end
|
127
|
+
if hash.has_key? 'propertyCustomerServicePhoneNumber'
|
128
|
+
@property_customer_service_phone_number = hash['propertyCustomerServicePhoneNumber']
|
129
|
+
end
|
130
|
+
if hash.has_key? 'propertyPhoneNumber'
|
131
|
+
@property_phone_number = hash['propertyPhoneNumber']
|
132
|
+
end
|
133
|
+
if hash.has_key? 'renterName'
|
134
|
+
@renter_name = hash['renterName']
|
135
|
+
end
|
136
|
+
if hash.has_key? 'rooms'
|
137
|
+
raise TypeError, "value '%s' is not an Array" % [hash['rooms']] unless hash['rooms'].is_a? Array
|
138
|
+
@rooms = []
|
139
|
+
hash['rooms'].each do |e|
|
140
|
+
@rooms << Ingenico::Connect::SDK::Domain::Definitions::LodgingRoom.new_from_hash(e)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Definitions
|
10
|
+
|
11
|
+
# @attr [String] daily_room_rate
|
12
|
+
# @attr [String] daily_room_rate_currency_code
|
13
|
+
# @attr [String] daily_room_tax_amount
|
14
|
+
# @attr [String] daily_room_tax_amount_currency_code
|
15
|
+
# @attr [Integer] number_of_nights_at_room_rate
|
16
|
+
# @attr [String] room_location
|
17
|
+
# @attr [String] room_number
|
18
|
+
# @attr [String] type_of_bed
|
19
|
+
# @attr [String] type_of_room
|
20
|
+
class LodgingRoom < Ingenico::Connect::SDK::DataObject
|
21
|
+
|
22
|
+
attr_accessor :daily_room_rate
|
23
|
+
|
24
|
+
attr_accessor :daily_room_rate_currency_code
|
25
|
+
|
26
|
+
attr_accessor :daily_room_tax_amount
|
27
|
+
|
28
|
+
attr_accessor :daily_room_tax_amount_currency_code
|
29
|
+
|
30
|
+
attr_accessor :number_of_nights_at_room_rate
|
31
|
+
|
32
|
+
attr_accessor :room_location
|
33
|
+
|
34
|
+
attr_accessor :room_number
|
35
|
+
|
36
|
+
attr_accessor :type_of_bed
|
37
|
+
|
38
|
+
attr_accessor :type_of_room
|
39
|
+
|
40
|
+
# @return (Hash)
|
41
|
+
def to_h
|
42
|
+
hash = super
|
43
|
+
hash['dailyRoomRate'] = @daily_room_rate unless @daily_room_rate.nil?
|
44
|
+
hash['dailyRoomRateCurrencyCode'] = @daily_room_rate_currency_code unless @daily_room_rate_currency_code.nil?
|
45
|
+
hash['dailyRoomTaxAmount'] = @daily_room_tax_amount unless @daily_room_tax_amount.nil?
|
46
|
+
hash['dailyRoomTaxAmountCurrencyCode'] = @daily_room_tax_amount_currency_code unless @daily_room_tax_amount_currency_code.nil?
|
47
|
+
hash['numberOfNightsAtRoomRate'] = @number_of_nights_at_room_rate unless @number_of_nights_at_room_rate.nil?
|
48
|
+
hash['roomLocation'] = @room_location unless @room_location.nil?
|
49
|
+
hash['roomNumber'] = @room_number unless @room_number.nil?
|
50
|
+
hash['typeOfBed'] = @type_of_bed unless @type_of_bed.nil?
|
51
|
+
hash['typeOfRoom'] = @type_of_room unless @type_of_room.nil?
|
52
|
+
hash
|
53
|
+
end
|
54
|
+
|
55
|
+
def from_hash(hash)
|
56
|
+
super
|
57
|
+
if hash.has_key? 'dailyRoomRate'
|
58
|
+
@daily_room_rate = hash['dailyRoomRate']
|
59
|
+
end
|
60
|
+
if hash.has_key? 'dailyRoomRateCurrencyCode'
|
61
|
+
@daily_room_rate_currency_code = hash['dailyRoomRateCurrencyCode']
|
62
|
+
end
|
63
|
+
if hash.has_key? 'dailyRoomTaxAmount'
|
64
|
+
@daily_room_tax_amount = hash['dailyRoomTaxAmount']
|
65
|
+
end
|
66
|
+
if hash.has_key? 'dailyRoomTaxAmountCurrencyCode'
|
67
|
+
@daily_room_tax_amount_currency_code = hash['dailyRoomTaxAmountCurrencyCode']
|
68
|
+
end
|
69
|
+
if hash.has_key? 'numberOfNightsAtRoomRate'
|
70
|
+
@number_of_nights_at_room_rate = hash['numberOfNightsAtRoomRate']
|
71
|
+
end
|
72
|
+
if hash.has_key? 'roomLocation'
|
73
|
+
@room_location = hash['roomLocation']
|
74
|
+
end
|
75
|
+
if hash.has_key? 'roomNumber'
|
76
|
+
@room_number = hash['roomNumber']
|
77
|
+
end
|
78
|
+
if hash.has_key? 'typeOfBed'
|
79
|
+
@type_of_bed = hash['typeOfBed']
|
80
|
+
end
|
81
|
+
if hash.has_key? 'typeOfRoom'
|
82
|
+
@type_of_room = hash['typeOfRoom']
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -4,6 +4,7 @@
|
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/data_object'
|
6
6
|
require 'ingenico/connect/sdk/domain/definitions/airline_data'
|
7
|
+
require 'ingenico/connect/sdk/domain/definitions/lodging_data'
|
7
8
|
require 'ingenico/connect/sdk/domain/payment/installments'
|
8
9
|
require 'ingenico/connect/sdk/domain/payment/level3_summary_data'
|
9
10
|
require 'ingenico/connect/sdk/domain/payment/loan_recipient'
|
@@ -17,6 +18,7 @@ module Ingenico::Connect::SDK
|
|
17
18
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::Installments] installments
|
18
19
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::Level3SummaryData] level3_summary_data
|
19
20
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::LoanRecipient] loan_recipient
|
21
|
+
# @attr [Ingenico::Connect::SDK::Domain::Definitions::LodgingData] lodging_data
|
20
22
|
# @attr [Integer] number_of_installments
|
21
23
|
# @attr [String] order_date
|
22
24
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::OrderTypeInformation] type_information
|
@@ -32,6 +34,8 @@ module Ingenico::Connect::SDK
|
|
32
34
|
|
33
35
|
attr_accessor :loan_recipient
|
34
36
|
|
37
|
+
attr_accessor :lodging_data
|
38
|
+
|
35
39
|
#
|
36
40
|
# @deprecated Use installments.numberOfInstallments instead
|
37
41
|
attr_accessor :number_of_installments
|
@@ -47,6 +51,7 @@ module Ingenico::Connect::SDK
|
|
47
51
|
hash['installments'] = @installments.to_h unless @installments.nil?
|
48
52
|
hash['level3SummaryData'] = @level3_summary_data.to_h unless @level3_summary_data.nil?
|
49
53
|
hash['loanRecipient'] = @loan_recipient.to_h unless @loan_recipient.nil?
|
54
|
+
hash['lodgingData'] = @lodging_data.to_h unless @lodging_data.nil?
|
50
55
|
hash['numberOfInstallments'] = @number_of_installments unless @number_of_installments.nil?
|
51
56
|
hash['orderDate'] = @order_date unless @order_date.nil?
|
52
57
|
hash['typeInformation'] = @type_information.to_h unless @type_information.nil?
|
@@ -71,6 +76,10 @@ module Ingenico::Connect::SDK
|
|
71
76
|
raise TypeError, "value '%s' is not a Hash" % [hash['loanRecipient']] unless hash['loanRecipient'].is_a? Hash
|
72
77
|
@loan_recipient = Ingenico::Connect::SDK::Domain::Payment::LoanRecipient.new_from_hash(hash['loanRecipient'])
|
73
78
|
end
|
79
|
+
if hash.has_key? 'lodgingData'
|
80
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['lodgingData']] unless hash['lodgingData'].is_a? Hash
|
81
|
+
@lodging_data = Ingenico::Connect::SDK::Domain::Definitions::LodgingData.new_from_hash(hash['lodgingData'])
|
82
|
+
end
|
74
83
|
if hash.has_key? 'numberOfInstallments'
|
75
84
|
@number_of_installments = hash['numberOfInstallments']
|
76
85
|
end
|