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
@@ -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
|
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
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/domain/payment/abstract_redirect_payment_method_specific_input'
|
6
|
+
require 'ingenico/connect/sdk/domain/payment/redirect_payment_product4101_specific_input'
|
6
7
|
require 'ingenico/connect/sdk/domain/payment/redirect_payment_product809_specific_input'
|
7
8
|
require 'ingenico/connect/sdk/domain/payment/redirect_payment_product816_specific_input'
|
8
9
|
require 'ingenico/connect/sdk/domain/payment/redirect_payment_product840_specific_input'
|
@@ -17,6 +18,7 @@ module Ingenico::Connect::SDK
|
|
17
18
|
module Payment
|
18
19
|
|
19
20
|
# @attr [true/false] is_recurring
|
21
|
+
# @attr [Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct4101SpecificInput] payment_product4101_specific_input
|
20
22
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct809SpecificInput] payment_product809_specific_input
|
21
23
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct816SpecificInput] payment_product816_specific_input
|
22
24
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct840SpecificInput] payment_product840_specific_input
|
@@ -30,6 +32,8 @@ module Ingenico::Connect::SDK
|
|
30
32
|
|
31
33
|
attr_accessor :is_recurring
|
32
34
|
|
35
|
+
attr_accessor :payment_product4101_specific_input
|
36
|
+
|
33
37
|
attr_accessor :payment_product809_specific_input
|
34
38
|
|
35
39
|
attr_accessor :payment_product816_specific_input
|
@@ -54,6 +58,7 @@ module Ingenico::Connect::SDK
|
|
54
58
|
def to_h
|
55
59
|
hash = super
|
56
60
|
hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
|
61
|
+
hash['paymentProduct4101SpecificInput'] = @payment_product4101_specific_input.to_h unless @payment_product4101_specific_input.nil?
|
57
62
|
hash['paymentProduct809SpecificInput'] = @payment_product809_specific_input.to_h unless @payment_product809_specific_input.nil?
|
58
63
|
hash['paymentProduct816SpecificInput'] = @payment_product816_specific_input.to_h unless @payment_product816_specific_input.nil?
|
59
64
|
hash['paymentProduct840SpecificInput'] = @payment_product840_specific_input.to_h unless @payment_product840_specific_input.nil?
|
@@ -71,6 +76,10 @@ module Ingenico::Connect::SDK
|
|
71
76
|
if hash.has_key? 'isRecurring'
|
72
77
|
@is_recurring = hash['isRecurring']
|
73
78
|
end
|
79
|
+
if hash.has_key? 'paymentProduct4101SpecificInput'
|
80
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct4101SpecificInput']] unless hash['paymentProduct4101SpecificInput'].is_a? Hash
|
81
|
+
@payment_product4101_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct4101SpecificInput.new_from_hash(hash['paymentProduct4101SpecificInput'])
|
82
|
+
end
|
74
83
|
if hash.has_key? 'paymentProduct809SpecificInput'
|
75
84
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct809SpecificInput']] unless hash['paymentProduct809SpecificInput'].is_a? Hash
|
76
85
|
@payment_product809_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct809SpecificInput.new_from_hash(hash['paymentProduct809SpecificInput'])
|
@@ -2,6 +2,7 @@
|
|
2
2
|
# This class was auto-generated from the API references found at
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
|
+
require 'ingenico/connect/sdk/domain/definitions/bank_account_bban'
|
5
6
|
require 'ingenico/connect/sdk/domain/definitions/bank_account_iban'
|
6
7
|
require 'ingenico/connect/sdk/domain/definitions/fraud_results'
|
7
8
|
require 'ingenico/connect/sdk/domain/payment/abstract_payment_method_specific_output'
|
@@ -14,7 +15,9 @@ module Ingenico::Connect::SDK
|
|
14
15
|
module Domain
|
15
16
|
module Payment
|
16
17
|
|
18
|
+
# @attr [Ingenico::Connect::SDK::Domain::Definitions::BankAccountBban] bank_account_bban
|
17
19
|
# @attr [Ingenico::Connect::SDK::Domain::Definitions::BankAccountIban] bank_account_iban
|
20
|
+
# @attr [String] bic
|
18
21
|
# @attr [Ingenico::Connect::SDK::Domain::Definitions::FraudResults] fraud_results
|
19
22
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::PaymentProduct3201SpecificOutput] payment_product3201_specific_output
|
20
23
|
# @attr [Ingenico::Connect::SDK::Domain::Payment::PaymentProduct806SpecificOutput] payment_product806_specific_output
|
@@ -23,8 +26,12 @@ module Ingenico::Connect::SDK
|
|
23
26
|
# @attr [String] token
|
24
27
|
class RedirectPaymentMethodSpecificOutput < Ingenico::Connect::SDK::Domain::Payment::AbstractPaymentMethodSpecificOutput
|
25
28
|
|
29
|
+
attr_accessor :bank_account_bban
|
30
|
+
|
26
31
|
attr_accessor :bank_account_iban
|
27
32
|
|
33
|
+
attr_accessor :bic
|
34
|
+
|
28
35
|
attr_accessor :fraud_results
|
29
36
|
|
30
37
|
attr_accessor :payment_product3201_specific_output
|
@@ -40,7 +47,9 @@ module Ingenico::Connect::SDK
|
|
40
47
|
# @return (Hash)
|
41
48
|
def to_h
|
42
49
|
hash = super
|
50
|
+
hash['bankAccountBban'] = @bank_account_bban.to_h unless @bank_account_bban.nil?
|
43
51
|
hash['bankAccountIban'] = @bank_account_iban.to_h unless @bank_account_iban.nil?
|
52
|
+
hash['bic'] = @bic unless @bic.nil?
|
44
53
|
hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil?
|
45
54
|
hash['paymentProduct3201SpecificOutput'] = @payment_product3201_specific_output.to_h unless @payment_product3201_specific_output.nil?
|
46
55
|
hash['paymentProduct806SpecificOutput'] = @payment_product806_specific_output.to_h unless @payment_product806_specific_output.nil?
|
@@ -52,10 +61,17 @@ module Ingenico::Connect::SDK
|
|
52
61
|
|
53
62
|
def from_hash(hash)
|
54
63
|
super
|
64
|
+
if hash.has_key? 'bankAccountBban'
|
65
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountBban']] unless hash['bankAccountBban'].is_a? Hash
|
66
|
+
@bank_account_bban = Ingenico::Connect::SDK::Domain::Definitions::BankAccountBban.new_from_hash(hash['bankAccountBban'])
|
67
|
+
end
|
55
68
|
if hash.has_key? 'bankAccountIban'
|
56
69
|
raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountIban']] unless hash['bankAccountIban'].is_a? Hash
|
57
70
|
@bank_account_iban = Ingenico::Connect::SDK::Domain::Definitions::BankAccountIban.new_from_hash(hash['bankAccountIban'])
|
58
71
|
end
|
72
|
+
if hash.has_key? 'bic'
|
73
|
+
@bic = hash['bic']
|
74
|
+
end
|
59
75
|
if hash.has_key? 'fraudResults'
|
60
76
|
raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']] unless hash['fraudResults'].is_a? Hash
|
61
77
|
@fraud_results = Ingenico::Connect::SDK::Domain::Definitions::FraudResults.new_from_hash(hash['fraudResults'])
|
@@ -0,0 +1,39 @@
|
|
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] integration_type
|
12
|
+
# @attr [String] vpa
|
13
|
+
class RedirectPaymentProduct4101SpecificInput < Ingenico::Connect::SDK::DataObject
|
14
|
+
|
15
|
+
attr_accessor :integration_type
|
16
|
+
|
17
|
+
attr_accessor :vpa
|
18
|
+
|
19
|
+
# @return (Hash)
|
20
|
+
def to_h
|
21
|
+
hash = super
|
22
|
+
hash['integrationType'] = @integration_type unless @integration_type.nil?
|
23
|
+
hash['vpa'] = @vpa unless @vpa.nil?
|
24
|
+
hash
|
25
|
+
end
|
26
|
+
|
27
|
+
def from_hash(hash)
|
28
|
+
super
|
29
|
+
if hash.has_key? 'integrationType'
|
30
|
+
@integration_type = hash['integrationType']
|
31
|
+
end
|
32
|
+
if hash.has_key? 'vpa'
|
33
|
+
@vpa = hash['vpa']
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
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
|
@@ -11,6 +11,7 @@ module Ingenico::Connect::SDK
|
|
11
11
|
|
12
12
|
# @attr [Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney] amount_of_money
|
13
13
|
# @attr [String] country_code
|
14
|
+
# @attr [true/false] is_installments
|
14
15
|
# @attr [true/false] is_recurring
|
15
16
|
class PaymentContext < Ingenico::Connect::SDK::DataObject
|
16
17
|
|
@@ -18,6 +19,8 @@ module Ingenico::Connect::SDK
|
|
18
19
|
|
19
20
|
attr_accessor :country_code
|
20
21
|
|
22
|
+
attr_accessor :is_installments
|
23
|
+
|
21
24
|
attr_accessor :is_recurring
|
22
25
|
|
23
26
|
# @return (Hash)
|
@@ -25,6 +28,7 @@ module Ingenico::Connect::SDK
|
|
25
28
|
hash = super
|
26
29
|
hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
|
27
30
|
hash['countryCode'] = @country_code unless @country_code.nil?
|
31
|
+
hash['isInstallments'] = @is_installments unless @is_installments.nil?
|
28
32
|
hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
|
29
33
|
hash
|
30
34
|
end
|
@@ -38,6 +42,9 @@ module Ingenico::Connect::SDK
|
|
38
42
|
if hash.has_key? 'countryCode'
|
39
43
|
@country_code = hash['countryCode']
|
40
44
|
end
|
45
|
+
if hash.has_key? 'isInstallments'
|
46
|
+
@is_installments = hash['isInstallments']
|
47
|
+
end
|
41
48
|
if hash.has_key? 'isRecurring'
|
42
49
|
@is_recurring = hash['isRecurring']
|
43
50
|
end
|
@@ -11,8 +11,8 @@ module Ingenico::Connect::SDK
|
|
11
11
|
# located at _configuration_file_name_.
|
12
12
|
#
|
13
13
|
# @param configuration_file_name [String] Path to the configuration file to use, should be in YAML format.
|
14
|
-
# @param api_key_id [String] Key id for the
|
15
|
-
# @param secret_api_key [String] Secret key used for authentication to the
|
14
|
+
# @param api_key_id [String] Key id for the Ingenico ePayments platform.
|
15
|
+
# @param secret_api_key [String] Secret key used for authentication to the Ingenico ePayments platform.
|
16
16
|
# @return [Ingenico::Connect::SDK::CommunicatorConfiguration] The created communicator configuration
|
17
17
|
def self.create_configuration(configuration_file_name, api_key_id, secret_api_key)
|
18
18
|
properties = YAML::load_file(configuration_file_name)
|
@@ -56,8 +56,8 @@ module Ingenico::Connect::SDK
|
|
56
56
|
# using the _api_key_id_ and _secret_api_key_ in the CommunicatorConfiguration.
|
57
57
|
#
|
58
58
|
# @param configuration_file_name [String] Path to the configuration file to use, should be in YAML format.
|
59
|
-
# @param api_key_id [String] Key id for the
|
60
|
-
# @param secret_api_key [String] Secret key used for authentication to the
|
59
|
+
# @param api_key_id [String] Key id for the Ingenico ePayments platform.
|
60
|
+
# @param secret_api_key [String] Secret key used for authentication to the Ingenico ePayments platform.
|
61
61
|
# @param meta_data_provider [Ingenico::Connect::SDK::MetaDataProvider] stores the metadata for the communicating client.
|
62
62
|
# @param connection [Ingenico::Connect::SDK::Connection] connection that can be used to communicate with the Ingenico ePayments platform.
|
63
63
|
# @param authenticator [Ingenico::Connect::SDK::Authenticator] authenticator that can authenticate messages sent to the Ingenico ePayments platform.
|
@@ -69,7 +69,7 @@ module Ingenico::Connect::SDK
|
|
69
69
|
authenticator: authenticator)
|
70
70
|
end
|
71
71
|
|
72
|
-
# Creates and returns an {Ingenico::Connect::SDK::Communicator} that is used for communication with the
|
72
|
+
# Creates and returns an {Ingenico::Connect::SDK::Communicator} that is used for communication with the Ingenico ePayments platform.
|
73
73
|
#
|
74
74
|
# @param session [Ingenico::Connect::SDK::Session] session that the communicator will utilize for communication.
|
75
75
|
# @return [Ingenico::Connect::SDK::Communicator] The created communicator
|
@@ -77,7 +77,7 @@ module Ingenico::Connect::SDK
|
|
77
77
|
Communicator.new(session, DefaultImpl::DefaultMarshaller.INSTANCE)
|
78
78
|
end
|
79
79
|
|
80
|
-
# Creates and returns an {Ingenico::Connect::SDK::Communicator} that can be used for communication with the
|
80
|
+
# Creates and returns an {Ingenico::Connect::SDK::Communicator} that can be used for communication with the Ingenico ePayments platform.
|
81
81
|
#
|
82
82
|
# @param configuration [Ingenico::Connect::SDK::CommunicatorConfiguration] contains configuration settings to be used by the client.
|
83
83
|
# @return [Ingenico::Connect::SDK::Communicator] The created communicator
|
@@ -86,11 +86,11 @@ module Ingenico::Connect::SDK
|
|
86
86
|
Communicator.new(session, DefaultImpl::DefaultMarshaller.INSTANCE)
|
87
87
|
end
|
88
88
|
|
89
|
-
# Creates and returns an {Ingenico::Connect::SDK::Communicator} that is used for communication with the
|
89
|
+
# Creates and returns an {Ingenico::Connect::SDK::Communicator} that is used for communication with the Ingenico ePayments platform.
|
90
90
|
#
|
91
91
|
# @param configuration_file_name [String] Path to the configuration file to use, should be in YAML format.
|
92
|
-
# @param api_key_id [String] Key id for the
|
93
|
-
# @param secret_api_key [String] Secret key used for authentication to the
|
92
|
+
# @param api_key_id [String] Key id for the Ingenico ePayments platform.
|
93
|
+
# @param secret_api_key [String] Secret key used for authentication to the Ingenico ePayments platform.
|
94
94
|
# @return [Ingenico::Connect::SDK::Communicator] The created communicator
|
95
95
|
def self.create_communicator_from_file(configuration_file_name, api_key_id, secret_api_key)
|
96
96
|
configuration = create_configuration(configuration_file_name, api_key_id, secret_api_key)
|
@@ -98,7 +98,7 @@ module Ingenico::Connect::SDK
|
|
98
98
|
Communicator.new(session, DefaultImpl::DefaultMarshaller.INSTANCE)
|
99
99
|
end
|
100
100
|
|
101
|
-
# Creates and returns an {Ingenico::Connect::SDK::Client} that provides the a high-level interface with the
|
101
|
+
# Creates and returns an {Ingenico::Connect::SDK::Client} that provides the a high-level interface with the Ingenico ePayments platform.
|
102
102
|
# If a code block is given, the created client is returned to the code block and closed afterwards.
|
103
103
|
#
|
104
104
|
# @example Providing a code block
|
@@ -123,7 +123,7 @@ module Ingenico::Connect::SDK
|
|
123
123
|
end
|
124
124
|
end
|
125
125
|
|
126
|
-
# Creates and returns an {Ingenico::Connect::SDK::Client} that provides the a high-level interface with the
|
126
|
+
# Creates and returns an {Ingenico::Connect::SDK::Client} that provides the a high-level interface with the Ingenico ePayments platform.
|
127
127
|
# If a code block is given, the created client is returned to the code block and closed afterwards.
|
128
128
|
#
|
129
129
|
# @example Providing a code block
|
@@ -147,7 +147,7 @@ module Ingenico::Connect::SDK
|
|
147
147
|
end
|
148
148
|
end
|
149
149
|
|
150
|
-
# Creates and returns an {Ingenico::Connect::SDK::Client} that provides the a high-level interface with the
|
150
|
+
# Creates and returns an {Ingenico::Connect::SDK::Client} that provides the a high-level interface with the Ingenico ePayments platform.
|
151
151
|
# If a code block is given, the created client is returned to the code block and closed afterwards.
|
152
152
|
#
|
153
153
|
# @example Providing a code block
|
@@ -172,7 +172,7 @@ module Ingenico::Connect::SDK
|
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
175
|
-
# Creates and returns an {Ingenico::Connect::SDK::Client} that provides the a high-level interface with the
|
175
|
+
# Creates and returns an {Ingenico::Connect::SDK::Client} that provides the a high-level interface with the Ingenico ePayments platform.
|
176
176
|
# If a code block is given, the created client is returned to the code block and closed afterwards.
|
177
177
|
#
|
178
178
|
# @example Providing a code block
|
@@ -182,8 +182,8 @@ module Ingenico::Connect::SDK
|
|
182
182
|
# # client is closed here
|
183
183
|
#
|
184
184
|
# @param configuration_file_name [String] Path to the configuration file to use, should be in YAML format.
|
185
|
-
# @param api_key_id [String] Key id for the
|
186
|
-
# @param secret_api_key [String] Secret key used for authentication to the
|
185
|
+
# @param api_key_id [String] Key id for the Ingenico ePayments platform.
|
186
|
+
# @param secret_api_key [String] Secret key used for authentication to the Ingenico ePayments platform.
|
187
187
|
# @return [Ingenico::Connect::SDK::Client] The created client
|
188
188
|
def self.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
189
189
|
communicator = create_communicator_from_file(configuration_file_name, api_key_id, secret_api_key)
|