connect-sdk-ruby 2.15.0 → 2.19.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/payments/complete_payment_example.rb +1 -1
- data/examples/merchant/payments/create_payment_example.rb +1 -1
- data/examples/merchant/products/create_payment_product_session_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/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/hostedcheckout/mobile_payment_method_specific_input_hosted_checkout.rb +28 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/mobile_payment_product320_specific_input_hosted_checkout.rb +9 -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/g_pay_three_d_secure.rb +62 -0
- data/lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_input.rb +16 -0
- data/lib/ingenico/connect/sdk/domain/payment/mobile_payment_product320_specific_input.rb +34 -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/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/product/payment_product.rb +7 -0
- data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
- data/spec/integration/payment_products_spec.rb +13 -0
- data/spec/integration/token_spec.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab500d1794ddeac60cc23464a21c5b96093f594f42410f708de6185080ea8432
|
4
|
+
data.tar.gz: bcfab9d7858aa7f249e400f4e14b9bc0faf2df97901880328e5301f21014d0d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c362b90a182eca7d0ec52b61b9095a4e3982e84cbcdd4c39a4a49fde7ef557c46a2398632adc62109f21e1cbcfc44f02c0d0b1af4ba0debd329227cd8884401f
|
7
|
+
data.tar.gz: 06d5e09ea6c58b8fafb75559d1ef50a439bab792d0ea74cfb3612d68b991b5a95ce02f2bcd9dcaca897d3d107ffcbbb36dd0c943835dc144ade6cbaeacabf11f
|
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.19.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
|
@@ -13,7 +13,7 @@ def example
|
|
13
13
|
payment_product_session302_specific_input = Product::MobilePaymentProductSession302SpecificInput.new
|
14
14
|
payment_product_session302_specific_input.display_name = 'Ingenico'
|
15
15
|
payment_product_session302_specific_input.domain_name = 'pay1.secured-by-ingenico.com'
|
16
|
-
payment_product_session302_specific_input.validation_url = '
|
16
|
+
payment_product_session302_specific_input.validation_url = '<VALIDATION URL RECEIVED FROM APPLE>'
|
17
17
|
|
18
18
|
body = Product::CreatePaymentProductSessionRequest.new
|
19
19
|
body.payment_product_session302_specific_input = payment_product_session302_specific_input
|
@@ -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
|
@@ -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
|
@@ -10,24 +10,46 @@ module Ingenico::Connect::SDK
|
|
10
10
|
module Domain
|
11
11
|
module Hostedcheckout
|
12
12
|
|
13
|
+
# @attr [String] authorization_mode
|
14
|
+
# @attr [String] customer_reference
|
13
15
|
# @attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentProduct302SpecificInputHostedCheckout] payment_product302_specific_input
|
14
16
|
# @attr [Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentProduct320SpecificInputHostedCheckout] payment_product320_specific_input
|
17
|
+
# @attr [true/false] requires_approval
|
18
|
+
# @attr [true/false] skip_fraud_service
|
15
19
|
class MobilePaymentMethodSpecificInputHostedCheckout < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
|
16
20
|
|
21
|
+
attr_accessor :authorization_mode
|
22
|
+
|
23
|
+
attr_accessor :customer_reference
|
24
|
+
|
17
25
|
attr_accessor :payment_product302_specific_input
|
18
26
|
|
19
27
|
attr_accessor :payment_product320_specific_input
|
20
28
|
|
29
|
+
attr_accessor :requires_approval
|
30
|
+
|
31
|
+
attr_accessor :skip_fraud_service
|
32
|
+
|
21
33
|
# @return (Hash)
|
22
34
|
def to_h
|
23
35
|
hash = super
|
36
|
+
hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
|
37
|
+
hash['customerReference'] = @customer_reference unless @customer_reference.nil?
|
24
38
|
hash['paymentProduct302SpecificInput'] = @payment_product302_specific_input.to_h unless @payment_product302_specific_input.nil?
|
25
39
|
hash['paymentProduct320SpecificInput'] = @payment_product320_specific_input.to_h unless @payment_product320_specific_input.nil?
|
40
|
+
hash['requiresApproval'] = @requires_approval unless @requires_approval.nil?
|
41
|
+
hash['skipFraudService'] = @skip_fraud_service unless @skip_fraud_service.nil?
|
26
42
|
hash
|
27
43
|
end
|
28
44
|
|
29
45
|
def from_hash(hash)
|
30
46
|
super
|
47
|
+
if hash.has_key? 'authorizationMode'
|
48
|
+
@authorization_mode = hash['authorizationMode']
|
49
|
+
end
|
50
|
+
if hash.has_key? 'customerReference'
|
51
|
+
@customer_reference = hash['customerReference']
|
52
|
+
end
|
31
53
|
if hash.has_key? 'paymentProduct302SpecificInput'
|
32
54
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct302SpecificInput']] unless hash['paymentProduct302SpecificInput'].is_a? Hash
|
33
55
|
@payment_product302_specific_input = Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentProduct302SpecificInputHostedCheckout.new_from_hash(hash['paymentProduct302SpecificInput'])
|
@@ -36,6 +58,12 @@ module Ingenico::Connect::SDK
|
|
36
58
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct320SpecificInput']] unless hash['paymentProduct320SpecificInput'].is_a? Hash
|
37
59
|
@payment_product320_specific_input = Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentProduct320SpecificInputHostedCheckout.new_from_hash(hash['paymentProduct320SpecificInput'])
|
38
60
|
end
|
61
|
+
if hash.has_key? 'requiresApproval'
|
62
|
+
@requires_approval = hash['requiresApproval']
|
63
|
+
end
|
64
|
+
if hash.has_key? 'skipFraudService'
|
65
|
+
@skip_fraud_service = hash['skipFraudService']
|
66
|
+
end
|
39
67
|
end
|
40
68
|
end
|
41
69
|
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/payment/g_pay_three_d_secure'
|
6
7
|
|
7
8
|
module Ingenico::Connect::SDK
|
8
9
|
module Domain
|
@@ -10,17 +11,21 @@ module Ingenico::Connect::SDK
|
|
10
11
|
|
11
12
|
# @attr [String] merchant_name
|
12
13
|
# @attr [String] merchant_origin
|
14
|
+
# @attr [Ingenico::Connect::SDK::Domain::Payment::GPayThreeDSecure] three_d_secure
|
13
15
|
class MobilePaymentProduct320SpecificInputHostedCheckout < Ingenico::Connect::SDK::DataObject
|
14
16
|
|
15
17
|
attr_accessor :merchant_name
|
16
18
|
|
17
19
|
attr_accessor :merchant_origin
|
18
20
|
|
21
|
+
attr_accessor :three_d_secure
|
22
|
+
|
19
23
|
# @return (Hash)
|
20
24
|
def to_h
|
21
25
|
hash = super
|
22
26
|
hash['merchantName'] = @merchant_name unless @merchant_name.nil?
|
23
27
|
hash['merchantOrigin'] = @merchant_origin unless @merchant_origin.nil?
|
28
|
+
hash['threeDSecure'] = @three_d_secure.to_h unless @three_d_secure.nil?
|
24
29
|
hash
|
25
30
|
end
|
26
31
|
|
@@ -32,6 +37,10 @@ module Ingenico::Connect::SDK
|
|
32
37
|
if hash.has_key? 'merchantOrigin'
|
33
38
|
@merchant_origin = hash['merchantOrigin']
|
34
39
|
end
|
40
|
+
if hash.has_key? 'threeDSecure'
|
41
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecure']] unless hash['threeDSecure'].is_a? Hash
|
42
|
+
@three_d_secure = Ingenico::Connect::SDK::Domain::Payment::GPayThreeDSecure.new_from_hash(hash['threeDSecure'])
|
43
|
+
end
|
35
44
|
end
|
36
45
|
end
|
37
46
|
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
|
@@ -18,6 +18,8 @@ module Ingenico::Connect::SDK
|
|
18
18
|
# @attr [String] payment_method
|
19
19
|
class DecryptedPaymentData < Ingenico::Connect::SDK::DataObject
|
20
20
|
|
21
|
+
#
|
22
|
+
# @deprecated Use decryptedPaymentData.paymentMethod instead
|
21
23
|
attr_accessor :auth_method
|
22
24
|
|
23
25
|
attr_accessor :cardholder_name
|
@@ -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 Payment
|
10
|
+
|
11
|
+
# @attr [String] exemption_raised
|
12
|
+
# @attr [String] exemption_rejection_reason
|
13
|
+
# @attr [String] exemption_request
|
14
|
+
class ExemptionOutput < Ingenico::Connect::SDK::DataObject
|
15
|
+
|
16
|
+
attr_accessor :exemption_raised
|
17
|
+
|
18
|
+
attr_accessor :exemption_rejection_reason
|
19
|
+
|
20
|
+
attr_accessor :exemption_request
|
21
|
+
|
22
|
+
# @return (Hash)
|
23
|
+
def to_h
|
24
|
+
hash = super
|
25
|
+
hash['exemptionRaised'] = @exemption_raised unless @exemption_raised.nil?
|
26
|
+
hash['exemptionRejectionReason'] = @exemption_rejection_reason unless @exemption_rejection_reason.nil?
|
27
|
+
hash['exemptionRequest'] = @exemption_request unless @exemption_request.nil?
|
28
|
+
hash
|
29
|
+
end
|
30
|
+
|
31
|
+
def from_hash(hash)
|
32
|
+
super
|
33
|
+
if hash.has_key? 'exemptionRaised'
|
34
|
+
@exemption_raised = hash['exemptionRaised']
|
35
|
+
end
|
36
|
+
if hash.has_key? 'exemptionRejectionReason'
|
37
|
+
@exemption_rejection_reason = hash['exemptionRejectionReason']
|
38
|
+
end
|
39
|
+
if hash.has_key? 'exemptionRequest'
|
40
|
+
@exemption_request = hash['exemptionRequest']
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,62 @@
|
|
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/payment/redirection_data'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Payment
|
11
|
+
|
12
|
+
# @attr [String] challenge_canvas_size
|
13
|
+
# @attr [String] challenge_indicator
|
14
|
+
# @attr [String] exemption_request
|
15
|
+
# @attr [Ingenico::Connect::SDK::Domain::Payment::RedirectionData] redirection_data
|
16
|
+
# @attr [true/false] skip_authentication
|
17
|
+
class GPayThreeDSecure < Ingenico::Connect::SDK::DataObject
|
18
|
+
|
19
|
+
attr_accessor :challenge_canvas_size
|
20
|
+
|
21
|
+
attr_accessor :challenge_indicator
|
22
|
+
|
23
|
+
attr_accessor :exemption_request
|
24
|
+
|
25
|
+
attr_accessor :redirection_data
|
26
|
+
|
27
|
+
attr_accessor :skip_authentication
|
28
|
+
|
29
|
+
# @return (Hash)
|
30
|
+
def to_h
|
31
|
+
hash = super
|
32
|
+
hash['challengeCanvasSize'] = @challenge_canvas_size unless @challenge_canvas_size.nil?
|
33
|
+
hash['challengeIndicator'] = @challenge_indicator unless @challenge_indicator.nil?
|
34
|
+
hash['exemptionRequest'] = @exemption_request unless @exemption_request.nil?
|
35
|
+
hash['redirectionData'] = @redirection_data.to_h unless @redirection_data.nil?
|
36
|
+
hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
|
37
|
+
hash
|
38
|
+
end
|
39
|
+
|
40
|
+
def from_hash(hash)
|
41
|
+
super
|
42
|
+
if hash.has_key? 'challengeCanvasSize'
|
43
|
+
@challenge_canvas_size = hash['challengeCanvasSize']
|
44
|
+
end
|
45
|
+
if hash.has_key? 'challengeIndicator'
|
46
|
+
@challenge_indicator = hash['challengeIndicator']
|
47
|
+
end
|
48
|
+
if hash.has_key? 'exemptionRequest'
|
49
|
+
@exemption_request = hash['exemptionRequest']
|
50
|
+
end
|
51
|
+
if hash.has_key? 'redirectionData'
|
52
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['redirectionData']] unless hash['redirectionData'].is_a? Hash
|
53
|
+
@redirection_data = Ingenico::Connect::SDK::Domain::Payment::RedirectionData.new_from_hash(hash['redirectionData'])
|
54
|
+
end
|
55
|
+
if hash.has_key? 'skipAuthentication'
|
56
|
+
@skip_authentication = hash['skipAuthentication']
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -4,24 +4,31 @@
|
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/domain/definitions/abstract_payment_method_specific_input'
|
6
6
|
require 'ingenico/connect/sdk/domain/payment/decrypted_payment_data'
|
7
|
+
require 'ingenico/connect/sdk/domain/payment/mobile_payment_product320_specific_input'
|
7
8
|
|
8
9
|
module Ingenico::Connect::SDK
|
9
10
|
module Domain
|
10
11
|
module Payment
|
11
12
|
|
12
13
|
# @attr [String] authorization_mode
|
14
|
+
# @attr [String] customer_reference
|
13
15
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::DecryptedPaymentData] decrypted_payment_data
|
14
16
|
# @attr [String] encrypted_payment_data
|
17
|
+
# @attr [Ingenico::Connect::SDK::Domain::Payment::MobilePaymentProduct320SpecificInput] payment_product320_specific_input
|
15
18
|
# @attr [true/false] requires_approval
|
16
19
|
# @attr [true/false] skip_fraud_service
|
17
20
|
class MobilePaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
|
18
21
|
|
19
22
|
attr_accessor :authorization_mode
|
20
23
|
|
24
|
+
attr_accessor :customer_reference
|
25
|
+
|
21
26
|
attr_accessor :decrypted_payment_data
|
22
27
|
|
23
28
|
attr_accessor :encrypted_payment_data
|
24
29
|
|
30
|
+
attr_accessor :payment_product320_specific_input
|
31
|
+
|
25
32
|
attr_accessor :requires_approval
|
26
33
|
|
27
34
|
attr_accessor :skip_fraud_service
|
@@ -30,8 +37,10 @@ module Ingenico::Connect::SDK
|
|
30
37
|
def to_h
|
31
38
|
hash = super
|
32
39
|
hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
|
40
|
+
hash['customerReference'] = @customer_reference unless @customer_reference.nil?
|
33
41
|
hash['decryptedPaymentData'] = @decrypted_payment_data.to_h unless @decrypted_payment_data.nil?
|
34
42
|
hash['encryptedPaymentData'] = @encrypted_payment_data unless @encrypted_payment_data.nil?
|
43
|
+
hash['paymentProduct320SpecificInput'] = @payment_product320_specific_input.to_h unless @payment_product320_specific_input.nil?
|
35
44
|
hash['requiresApproval'] = @requires_approval unless @requires_approval.nil?
|
36
45
|
hash['skipFraudService'] = @skip_fraud_service unless @skip_fraud_service.nil?
|
37
46
|
hash
|
@@ -42,6 +51,9 @@ module Ingenico::Connect::SDK
|
|
42
51
|
if hash.has_key? 'authorizationMode'
|
43
52
|
@authorization_mode = hash['authorizationMode']
|
44
53
|
end
|
54
|
+
if hash.has_key? 'customerReference'
|
55
|
+
@customer_reference = hash['customerReference']
|
56
|
+
end
|
45
57
|
if hash.has_key? 'decryptedPaymentData'
|
46
58
|
raise TypeError, "value '%s' is not a Hash" % [hash['decryptedPaymentData']] unless hash['decryptedPaymentData'].is_a? Hash
|
47
59
|
@decrypted_payment_data = Ingenico::Connect::SDK::Domain::Payment::DecryptedPaymentData.new_from_hash(hash['decryptedPaymentData'])
|
@@ -49,6 +61,10 @@ module Ingenico::Connect::SDK
|
|
49
61
|
if hash.has_key? 'encryptedPaymentData'
|
50
62
|
@encrypted_payment_data = hash['encryptedPaymentData']
|
51
63
|
end
|
64
|
+
if hash.has_key? 'paymentProduct320SpecificInput'
|
65
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct320SpecificInput']] unless hash['paymentProduct320SpecificInput'].is_a? Hash
|
66
|
+
@payment_product320_specific_input = Ingenico::Connect::SDK::Domain::Payment::MobilePaymentProduct320SpecificInput.new_from_hash(hash['paymentProduct320SpecificInput'])
|
67
|
+
end
|
52
68
|
if hash.has_key? 'requiresApproval'
|
53
69
|
@requires_approval = hash['requiresApproval']
|
54
70
|
end
|
@@ -0,0 +1,34 @@
|
|
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/payment/g_pay_three_d_secure'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Payment
|
11
|
+
|
12
|
+
# @attr [Ingenico::Connect::SDK::Domain::Payment::GPayThreeDSecure] three_d_secure
|
13
|
+
class MobilePaymentProduct320SpecificInput < Ingenico::Connect::SDK::DataObject
|
14
|
+
|
15
|
+
attr_accessor :three_d_secure
|
16
|
+
|
17
|
+
# @return (Hash)
|
18
|
+
def to_h
|
19
|
+
hash = super
|
20
|
+
hash['threeDSecure'] = @three_d_secure.to_h unless @three_d_secure.nil?
|
21
|
+
hash
|
22
|
+
end
|
23
|
+
|
24
|
+
def from_hash(hash)
|
25
|
+
super
|
26
|
+
if hash.has_key? 'threeDSecure'
|
27
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecure']] unless hash['threeDSecure'].is_a? Hash
|
28
|
+
@three_d_secure = Ingenico::Connect::SDK::Domain::Payment::GPayThreeDSecure.new_from_hash(hash['threeDSecure'])
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb
CHANGED
@@ -16,6 +16,7 @@ module Ingenico::Connect::SDK
|
|
16
16
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::NonSepaDirectDebitPaymentProduct705SpecificInput] payment_product705_specific_input
|
17
17
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::NonSepaDirectDebitPaymentProduct730SpecificInput] payment_product730_specific_input
|
18
18
|
# @attr [String] recurring_payment_sequence_indicator
|
19
|
+
# @attr [true/false] requires_approval
|
19
20
|
# @attr [String] token
|
20
21
|
# @attr [true/false] tokenize
|
21
22
|
class NonSepaDirectDebitPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
|
@@ -32,6 +33,8 @@ module Ingenico::Connect::SDK
|
|
32
33
|
|
33
34
|
attr_accessor :recurring_payment_sequence_indicator
|
34
35
|
|
36
|
+
attr_accessor :requires_approval
|
37
|
+
|
35
38
|
attr_accessor :token
|
36
39
|
|
37
40
|
attr_accessor :tokenize
|
@@ -45,6 +48,7 @@ module Ingenico::Connect::SDK
|
|
45
48
|
hash['paymentProduct705SpecificInput'] = @payment_product705_specific_input.to_h unless @payment_product705_specific_input.nil?
|
46
49
|
hash['paymentProduct730SpecificInput'] = @payment_product730_specific_input.to_h unless @payment_product730_specific_input.nil?
|
47
50
|
hash['recurringPaymentSequenceIndicator'] = @recurring_payment_sequence_indicator unless @recurring_payment_sequence_indicator.nil?
|
51
|
+
hash['requiresApproval'] = @requires_approval unless @requires_approval.nil?
|
48
52
|
hash['token'] = @token unless @token.nil?
|
49
53
|
hash['tokenize'] = @tokenize unless @tokenize.nil?
|
50
54
|
hash
|
@@ -72,6 +76,9 @@ module Ingenico::Connect::SDK
|
|
72
76
|
if hash.has_key? 'recurringPaymentSequenceIndicator'
|
73
77
|
@recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator']
|
74
78
|
end
|
79
|
+
if hash.has_key? 'requiresApproval'
|
80
|
+
@requires_approval = hash['requiresApproval']
|
81
|
+
end
|
75
82
|
if hash.has_key? 'token'
|
76
83
|
@token = hash['token']
|
77
84
|
end
|
data/lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_input.rb
CHANGED
@@ -14,6 +14,7 @@ module Ingenico::Connect::SDK
|
|
14
14
|
# @attr [true/false] is_recurring
|
15
15
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::SepaDirectDebitPaymentProduct771SpecificInput] payment_product771_specific_input
|
16
16
|
# @attr [String] recurring_payment_sequence_indicator
|
17
|
+
# @attr [true/false] requires_approval
|
17
18
|
# @attr [String] token
|
18
19
|
# @attr [true/false] tokenize
|
19
20
|
class SepaDirectDebitPaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Payment::AbstractSepaDirectDebitPaymentMethodSpecificInput
|
@@ -28,6 +29,8 @@ module Ingenico::Connect::SDK
|
|
28
29
|
|
29
30
|
attr_accessor :recurring_payment_sequence_indicator
|
30
31
|
|
32
|
+
attr_accessor :requires_approval
|
33
|
+
|
31
34
|
attr_accessor :token
|
32
35
|
|
33
36
|
attr_accessor :tokenize
|
@@ -40,6 +43,7 @@ module Ingenico::Connect::SDK
|
|
40
43
|
hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
|
41
44
|
hash['paymentProduct771SpecificInput'] = @payment_product771_specific_input.to_h unless @payment_product771_specific_input.nil?
|
42
45
|
hash['recurringPaymentSequenceIndicator'] = @recurring_payment_sequence_indicator unless @recurring_payment_sequence_indicator.nil?
|
46
|
+
hash['requiresApproval'] = @requires_approval unless @requires_approval.nil?
|
43
47
|
hash['token'] = @token unless @token.nil?
|
44
48
|
hash['tokenize'] = @tokenize unless @tokenize.nil?
|
45
49
|
hash
|
@@ -63,6 +67,9 @@ module Ingenico::Connect::SDK
|
|
63
67
|
if hash.has_key? 'recurringPaymentSequenceIndicator'
|
64
68
|
@recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator']
|
65
69
|
end
|
70
|
+
if hash.has_key? 'requiresApproval'
|
71
|
+
@requires_approval = hash['requiresApproval']
|
72
|
+
end
|
66
73
|
if hash.has_key? 'token'
|
67
74
|
@token = hash['token']
|
68
75
|
end
|
@@ -4,6 +4,7 @@
|
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/data_object'
|
6
6
|
require 'ingenico/connect/sdk/domain/definitions/amount_of_money'
|
7
|
+
require 'ingenico/connect/sdk/domain/payment/exemption_output'
|
7
8
|
require 'ingenico/connect/sdk/domain/payment/sdk_data_output'
|
8
9
|
require 'ingenico/connect/sdk/domain/payment/three_d_secure_data'
|
9
10
|
|
@@ -17,6 +18,7 @@ module Ingenico::Connect::SDK
|
|
17
18
|
# @attr [String] cavv
|
18
19
|
# @attr [String] directory_server_transaction_id
|
19
20
|
# @attr [String] eci
|
21
|
+
# @attr [Ingenico::Connect::SDK::Domain::Payment::ExemptionOutput] exemption_output
|
20
22
|
# @attr [Integer] scheme_risk_score
|
21
23
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::SdkDataOutput] sdk_data
|
22
24
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::ThreeDSecureData] three_d_secure_data
|
@@ -37,6 +39,8 @@ module Ingenico::Connect::SDK
|
|
37
39
|
|
38
40
|
attr_accessor :eci
|
39
41
|
|
42
|
+
attr_accessor :exemption_output
|
43
|
+
|
40
44
|
attr_accessor :scheme_risk_score
|
41
45
|
|
42
46
|
attr_accessor :sdk_data
|
@@ -58,6 +62,7 @@ module Ingenico::Connect::SDK
|
|
58
62
|
hash['cavv'] = @cavv unless @cavv.nil?
|
59
63
|
hash['directoryServerTransactionId'] = @directory_server_transaction_id unless @directory_server_transaction_id.nil?
|
60
64
|
hash['eci'] = @eci unless @eci.nil?
|
65
|
+
hash['exemptionOutput'] = @exemption_output.to_h unless @exemption_output.nil?
|
61
66
|
hash['schemeRiskScore'] = @scheme_risk_score unless @scheme_risk_score.nil?
|
62
67
|
hash['sdkData'] = @sdk_data.to_h unless @sdk_data.nil?
|
63
68
|
hash['threeDSecureData'] = @three_d_secure_data.to_h unless @three_d_secure_data.nil?
|
@@ -88,6 +93,10 @@ module Ingenico::Connect::SDK
|
|
88
93
|
if hash.has_key? 'eci'
|
89
94
|
@eci = hash['eci']
|
90
95
|
end
|
96
|
+
if hash.has_key? 'exemptionOutput'
|
97
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['exemptionOutput']] unless hash['exemptionOutput'].is_a? Hash
|
98
|
+
@exemption_output = Ingenico::Connect::SDK::Domain::Payment::ExemptionOutput.new_from_hash(hash['exemptionOutput'])
|
99
|
+
end
|
91
100
|
if hash.has_key? 'schemeRiskScore'
|
92
101
|
@scheme_risk_score = hash['schemeRiskScore']
|
93
102
|
end
|
@@ -16,6 +16,7 @@ module Ingenico::Connect::SDK
|
|
16
16
|
module Product
|
17
17
|
|
18
18
|
# @attr [Array<Ingenico::Connect::SDK::Domain::Product::AccountOnFile>] accounts_on_file
|
19
|
+
# @attr [String] acquirer_country
|
19
20
|
# @attr [true/false] allows_installments
|
20
21
|
# @attr [true/false] allows_recurring
|
21
22
|
# @attr [true/false] allows_tokenization
|
@@ -41,6 +42,8 @@ module Ingenico::Connect::SDK
|
|
41
42
|
|
42
43
|
attr_accessor :accounts_on_file
|
43
44
|
|
45
|
+
attr_accessor :acquirer_country
|
46
|
+
|
44
47
|
attr_accessor :allows_installments
|
45
48
|
|
46
49
|
attr_accessor :allows_recurring
|
@@ -87,6 +90,7 @@ module Ingenico::Connect::SDK
|
|
87
90
|
def to_h
|
88
91
|
hash = super
|
89
92
|
hash['accountsOnFile'] = @accounts_on_file.collect{|val| val.to_h} unless @accounts_on_file.nil?
|
93
|
+
hash['acquirerCountry'] = @acquirer_country unless @acquirer_country.nil?
|
90
94
|
hash['allowsInstallments'] = @allows_installments unless @allows_installments.nil?
|
91
95
|
hash['allowsRecurring'] = @allows_recurring unless @allows_recurring.nil?
|
92
96
|
hash['allowsTokenization'] = @allows_tokenization unless @allows_tokenization.nil?
|
@@ -120,6 +124,9 @@ module Ingenico::Connect::SDK
|
|
120
124
|
@accounts_on_file << Ingenico::Connect::SDK::Domain::Product::AccountOnFile.new_from_hash(e)
|
121
125
|
end
|
122
126
|
end
|
127
|
+
if hash.has_key? 'acquirerCountry'
|
128
|
+
@acquirer_country = hash['acquirerCountry']
|
129
|
+
end
|
123
130
|
if hash.has_key? 'allowsInstallments'
|
124
131
|
@allows_installments = hash['allowsInstallments']
|
125
132
|
end
|
@@ -7,7 +7,7 @@ module Ingenico::Connect::SDK
|
|
7
7
|
#
|
8
8
|
# @attr_reader [Array<Ingenico::Connect::SDK::RequestHeader>] meta_data_headers List of headers that should be used in all requests.
|
9
9
|
class MetaDataProvider
|
10
|
-
@@SDK_VERSION = '2.
|
10
|
+
@@SDK_VERSION = '2.19.0'
|
11
11
|
@@SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'
|
12
12
|
@@PROHIBITED_HEADERS = [@@SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key',
|
13
13
|
'Date', 'Content-Type', 'Authorization'].sort!.freeze
|
@@ -2,6 +2,7 @@ require 'spec_helper'
|
|
2
2
|
require 'integration_setup'
|
3
3
|
require 'webmock/rspec'
|
4
4
|
require 'ingenico/connect/sdk/merchant/products/directory_params'
|
5
|
+
require 'ingenico/connect/sdk/merchant/products/find_products_params'
|
5
6
|
|
6
7
|
describe 'PaymentProducts' do
|
7
8
|
|
@@ -10,6 +11,18 @@ describe 'PaymentProducts' do
|
|
10
11
|
|
11
12
|
it 'can be accessed' do
|
12
13
|
|
14
|
+
params = Ingenico::Connect::SDK::Merchant::Products::FindProductsParams.new
|
15
|
+
params.country_code = 'NL'
|
16
|
+
params.currency_code = 'EUR'
|
17
|
+
|
18
|
+
Integration.init_client(false) do |client|
|
19
|
+
response = client.merchant(Integration::MERCHANT_ID).products.find(params)
|
20
|
+
expect(response.payment_products.length).to be > 0
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'has directories that can be accessed' do
|
25
|
+
|
13
26
|
params = Ingenico::Connect::SDK::Merchant::Products::DirectoryParams.new
|
14
27
|
params.country_code = 'NL'
|
15
28
|
params.currency_code = 'EUR'
|
@@ -23,7 +23,7 @@ describe 'token' do
|
|
23
23
|
card_without_ccv.cardholder_name = 'Jan'
|
24
24
|
card_without_ccv.issue_number = '12'
|
25
25
|
card_without_ccv.card_number = '4567350000427977'
|
26
|
-
card_without_ccv.expiry_date = '
|
26
|
+
card_without_ccv.expiry_date = '1225'
|
27
27
|
card_data = Ingenico::Connect::SDK::Domain::Token::TokenCardData.new
|
28
28
|
card_data.card_without_cvv = card_without_ccv
|
29
29
|
card = Ingenico::Connect::SDK::Domain::Token::TokenCard.new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: connect-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ingenico ePayments
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -246,6 +246,9 @@ files:
|
|
246
246
|
- lib/ingenico/connect/sdk/domain/definitions/fraugster_results.rb
|
247
247
|
- lib/ingenico/connect/sdk/domain/definitions/in_auth.rb
|
248
248
|
- lib/ingenico/connect/sdk/domain/definitions/key_value_pair.rb
|
249
|
+
- lib/ingenico/connect/sdk/domain/definitions/lodging_charge.rb
|
250
|
+
- lib/ingenico/connect/sdk/domain/definitions/lodging_data.rb
|
251
|
+
- lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb
|
249
252
|
- lib/ingenico/connect/sdk/domain/definitions/order_status_output.rb
|
250
253
|
- lib/ingenico/connect/sdk/domain/definitions/payment_product_filter.rb
|
251
254
|
- lib/ingenico/connect/sdk/domain/definitions/personal_name_base.rb
|
@@ -359,8 +362,10 @@ files:
|
|
359
362
|
- lib/ingenico/connect/sdk/domain/payment/e_invoice_payment_method_specific_output.rb
|
360
363
|
- lib/ingenico/connect/sdk/domain/payment/e_invoice_payment_product9000_specific_input.rb
|
361
364
|
- lib/ingenico/connect/sdk/domain/payment/e_invoice_payment_product9000_specific_output.rb
|
365
|
+
- lib/ingenico/connect/sdk/domain/payment/exemption_output.rb
|
362
366
|
- lib/ingenico/connect/sdk/domain/payment/external_cardholder_authentication_data.rb
|
363
367
|
- lib/ingenico/connect/sdk/domain/payment/find_payments_response.rb
|
368
|
+
- lib/ingenico/connect/sdk/domain/payment/g_pay_three_d_secure.rb
|
364
369
|
- lib/ingenico/connect/sdk/domain/payment/gift_card_purchase.rb
|
365
370
|
- lib/ingenico/connect/sdk/domain/payment/hosted_checkout_specific_output.rb
|
366
371
|
- lib/ingenico/connect/sdk/domain/payment/installments.rb
|
@@ -376,6 +381,7 @@ files:
|
|
376
381
|
- lib/ingenico/connect/sdk/domain/payment/mobile_payment_data.rb
|
377
382
|
- lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_input.rb
|
378
383
|
- lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_output.rb
|
384
|
+
- lib/ingenico/connect/sdk/domain/payment/mobile_payment_product320_specific_input.rb
|
379
385
|
- lib/ingenico/connect/sdk/domain/payment/mobile_three_d_secure_challenge_parameters.rb
|
380
386
|
- lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb
|
381
387
|
- lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_output.rb
|