connect-sdk-ruby 1.33.0 → 1.34.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/create_payment_example.rb +64 -18
- data/examples/merchant/riskassessments/risk_assessment_cards_example.rb +1 -1
- data/lib/ingenico/connect/sdk/domain/definitions/airline_data.rb +2 -0
- data/lib/ingenico/connect/sdk/domain/definitions/company_information.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/definitions/customer_base.rb +2 -0
- data/lib/ingenico/connect/sdk/domain/definitions/fraud_fields.rb +24 -0
- data/lib/ingenico/connect/sdk/domain/definitions/fraud_fields_shipping_details.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb +11 -0
- data/lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb +1 -1
- data/lib/ingenico/connect/sdk/domain/payment/abstract_card_payment_method_specific_input.rb +24 -0
- data/lib/ingenico/connect/sdk/domain/payment/abstract_sepa_direct_debit_payment_product771_specific_input.rb +1 -1
- data/lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb +74 -0
- data/lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb +1 -1
- data/lib/ingenico/connect/sdk/domain/payment/browser_data.rb +73 -0
- data/lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb +15 -0
- data/lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb +20 -0
- data/lib/ingenico/connect/sdk/domain/payment/card_recurrence_details.rb +45 -0
- data/lib/ingenico/connect/sdk/domain/payment/cash_payment_method_specific_input.rb +2 -0
- data/lib/ingenico/connect/sdk/domain/payment/cash_payment_product1503_specific_input.rb +3 -0
- data/lib/ingenico/connect/sdk/domain/payment/complete_payment_request.rb +11 -0
- data/lib/ingenico/connect/sdk/domain/payment/contact_details.rb +14 -0
- data/lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb +11 -0
- data/lib/ingenico/connect/sdk/domain/payment/customer.rb +38 -0
- data/lib/ingenico/connect/sdk/domain/payment/customer_account.rb +120 -0
- data/lib/ingenico/connect/sdk/domain/payment/customer_account_authentication.rb +38 -0
- data/lib/ingenico/connect/sdk/domain/payment/customer_approve_payment.rb +31 -0
- data/lib/ingenico/connect/sdk/domain/payment/customer_device.rb +84 -0
- data/lib/ingenico/connect/sdk/domain/payment/customer_payment_activity.rb +45 -0
- data/lib/ingenico/connect/sdk/domain/payment/device_render_options.rb +38 -0
- data/lib/ingenico/connect/sdk/domain/payment/external_cardholder_authentication_data.rb +21 -0
- data/lib/ingenico/connect/sdk/domain/payment/gift_card_purchase.rb +42 -0
- data/lib/ingenico/connect/sdk/domain/payment/level3_summary_data.rb +4 -4
- data/lib/ingenico/connect/sdk/domain/payment/merchant.rb +49 -0
- data/lib/ingenico/connect/sdk/domain/payment/merchant_action.rb +11 -0
- data/lib/ingenico/connect/sdk/domain/payment/mobile_three_d_secure_challenge_parameters.rb +52 -0
- data/lib/ingenico/connect/sdk/domain/payment/order.rb +3 -1
- data/lib/ingenico/connect/sdk/domain/payment/order_approve_payment.rb +11 -0
- data/lib/ingenico/connect/sdk/domain/payment/order_type_information.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/payment/payment_account_on_file.rb +38 -0
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input.rb +13 -0
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_product840_specific_input.rb +1 -1
- data/lib/ingenico/connect/sdk/domain/payment/redirection_data.rb +38 -0
- data/lib/ingenico/connect/sdk/domain/payment/sdk_data_input.rb +84 -0
- data/lib/ingenico/connect/sdk/domain/payment/sdk_data_output.rb +31 -0
- data/lib/ingenico/connect/sdk/domain/payment/shipping.rb +53 -0
- data/lib/ingenico/connect/sdk/domain/payment/shopping_cart.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/three_d_secure.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/payment/three_d_secure_base.rb +15 -0
- data/lib/ingenico/connect/sdk/domain/payment/three_d_secure_data.rb +45 -0
- data/lib/ingenico/connect/sdk/domain/payment/three_d_secure_results.rb +43 -0
- data/lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb +6 -6
- data/lib/ingenico/connect/sdk/domain/product/value_mapping_element.rb +1 -1
- data/lib/ingenico/connect/sdk/domain/riskassessments/customer_account_risk_assessment.rb +38 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/customer_device_risk_assessment.rb +38 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/customer_risk_assessment.rb +38 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/merchant_risk_assessment.rb +31 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/order_risk_assessment.rb +11 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/risk_assessment.rb +11 -0
- data/lib/ingenico/connect/sdk/domain/riskassessments/shipping_risk_assessment.rb +49 -0
- data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
- metadata +25 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f90ebf9942717f2734929d062449e19c0f52faf864a2ebe5a0217de9344cff6c
|
4
|
+
data.tar.gz: e5f3b1ba31d47befc71fc2da226700e9580d9356e5b9734cdc9da331c7b02537
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4b5ec63b26fa654d92bd01d2c1ce58832af52493e2b626f4d9f313a5aad2cba97c59230db0ac4f78a4ff5cd9544031d2652a02a9cea455eec395f2876186022
|
7
|
+
data.tar.gz: 0f94785f73786e5baf709181b18b15a631a2a466218d5616afdcd234692a47f481142fd690fec27b27b612c949d8cad8d1c57609e196b99a0e2ffc64bc7cbb7b
|
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 = '1.
|
3
|
+
spec.version = '1.34.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}
|
@@ -14,6 +14,8 @@ require 'ingenico/connect/sdk/domain/payment/card_payment_method_specific_input'
|
|
14
14
|
require 'ingenico/connect/sdk/domain/payment/contact_details'
|
15
15
|
require 'ingenico/connect/sdk/domain/payment/create_payment_request'
|
16
16
|
require 'ingenico/connect/sdk/domain/payment/customer'
|
17
|
+
require 'ingenico/connect/sdk/domain/payment/device_render_options'
|
18
|
+
require 'ingenico/connect/sdk/domain/payment/external_cardholder_authentication_data'
|
17
19
|
require 'ingenico/connect/sdk/domain/payment/line_item'
|
18
20
|
require 'ingenico/connect/sdk/domain/payment/line_item_invoice_data'
|
19
21
|
require 'ingenico/connect/sdk/domain/payment/order'
|
@@ -21,7 +23,11 @@ require 'ingenico/connect/sdk/domain/payment/order_invoice_data'
|
|
21
23
|
require 'ingenico/connect/sdk/domain/payment/order_references'
|
22
24
|
require 'ingenico/connect/sdk/domain/payment/personal_information'
|
23
25
|
require 'ingenico/connect/sdk/domain/payment/personal_name'
|
26
|
+
require 'ingenico/connect/sdk/domain/payment/sdk_data_input'
|
27
|
+
require 'ingenico/connect/sdk/domain/payment/shipping'
|
24
28
|
require 'ingenico/connect/sdk/domain/payment/shopping_cart'
|
29
|
+
require 'ingenico/connect/sdk/domain/payment/three_d_secure'
|
30
|
+
require 'ingenico/connect/sdk/domain/payment/three_d_secure_data'
|
25
31
|
|
26
32
|
Definitions = Ingenico::Connect::SDK::Domain::Definitions
|
27
33
|
Payment = Ingenico::Connect::SDK::Domain::Payment
|
@@ -34,10 +40,47 @@ def example
|
|
34
40
|
card.cvv = '123'
|
35
41
|
card.expiry_date = '1220'
|
36
42
|
|
43
|
+
external_cardholder_authentication_data = Payment::ExternalCardholderAuthenticationData.new
|
44
|
+
external_cardholder_authentication_data.cavv = 'AgAAAAAABk4DWZ4C28yUQAAAAAA='
|
45
|
+
external_cardholder_authentication_data.cavv_algorithm = '1'
|
46
|
+
external_cardholder_authentication_data.eci = 8
|
47
|
+
external_cardholder_authentication_data.three_d_secure_version = 'v2'
|
48
|
+
external_cardholder_authentication_data.three_d_server_transaction_id = '3DSTID1234'
|
49
|
+
external_cardholder_authentication_data.validation_result = 'Y'
|
50
|
+
external_cardholder_authentication_data.xid = 'n3h2uOQPUgnmqhCkXNfxl8pOZJA='
|
51
|
+
|
52
|
+
prior_three_d_secure_data = Payment::ThreeDSecureData.new
|
53
|
+
prior_three_d_secure_data.acs_transaction_id = 'empty'
|
54
|
+
prior_three_d_secure_data.method = 'challenged'
|
55
|
+
prior_three_d_secure_data.utc_timestamp = '201901311530'
|
56
|
+
|
57
|
+
device_render_options = Payment::DeviceRenderOptions.new
|
58
|
+
device_render_options.sdk_interface = 'native'
|
59
|
+
device_render_options.sdk_ui_type = 'multi-select'
|
60
|
+
|
61
|
+
sdk_data = Payment::SdkDataInput.new
|
62
|
+
sdk_data.device_info = 'abc123'
|
63
|
+
sdk_data.device_render_options = device_render_options
|
64
|
+
sdk_data.sdk_app_id = 'xyz'
|
65
|
+
sdk_data.sdk_encrypted_data = 'abc123'
|
66
|
+
sdk_data.sdk_ephemeral_public_key = '123xyz'
|
67
|
+
sdk_data.sdk_max_timeout = '30'
|
68
|
+
sdk_data.sdk_reference_number = 'zaq123'
|
69
|
+
sdk_data.sdk_transaction_id = 'xsw321'
|
70
|
+
|
71
|
+
three_d_secure = Payment::ThreeDSecure.new
|
72
|
+
three_d_secure.authentication_flow = 'browser'
|
73
|
+
three_d_secure.challenge_canvas_size = '600x400'
|
74
|
+
three_d_secure.challenge_indicator = 'challenge-requested'
|
75
|
+
three_d_secure.external_cardholder_authentication_data = external_cardholder_authentication_data
|
76
|
+
three_d_secure.prior_three_d_secure_data = prior_three_d_secure_data
|
77
|
+
three_d_secure.sdk_data = sdk_data
|
78
|
+
three_d_secure.skip_authentication = false
|
79
|
+
|
37
80
|
card_payment_method_specific_input = Payment::CardPaymentMethodSpecificInput.new
|
38
81
|
card_payment_method_specific_input.card = card
|
39
82
|
card_payment_method_specific_input.payment_product_id = 1
|
40
|
-
card_payment_method_specific_input.
|
83
|
+
card_payment_method_specific_input.three_d_secure = three_d_secure
|
41
84
|
|
42
85
|
amount_of_money = Definitions::AmountOfMoney.new
|
43
86
|
amount_of_money.amount = 2980
|
@@ -54,6 +97,7 @@ def example
|
|
54
97
|
|
55
98
|
company_information = Definitions::CompanyInformation.new
|
56
99
|
company_information.name = 'Acme Labs'
|
100
|
+
company_information.vat_number = '1234AB5678CD'
|
57
101
|
|
58
102
|
contact_details = Payment::ContactDetails.new
|
59
103
|
contact_details.email_address = 'wile.e.coyote@acmelabs.com'
|
@@ -72,21 +116,6 @@ def example
|
|
72
116
|
personal_information.gender = 'male'
|
73
117
|
personal_information.name = name
|
74
118
|
|
75
|
-
shipping_name = Payment::PersonalName.new
|
76
|
-
shipping_name.first_name = 'Road'
|
77
|
-
shipping_name.surname = 'Runner'
|
78
|
-
shipping_name.title = 'Miss'
|
79
|
-
|
80
|
-
shipping_address = Payment::AddressPersonal.new
|
81
|
-
shipping_address.additional_info = 'Suite II'
|
82
|
-
shipping_address.city = 'Monument Valley'
|
83
|
-
shipping_address.country_code = 'US'
|
84
|
-
shipping_address.house_number = '1'
|
85
|
-
shipping_address.name = shipping_name
|
86
|
-
shipping_address.state = 'Utah'
|
87
|
-
shipping_address.street = 'Desertroad'
|
88
|
-
shipping_address.zip = '84536'
|
89
|
-
|
90
119
|
customer = Payment::Customer.new
|
91
120
|
customer.billing_address = billing_address
|
92
121
|
customer.company_information = company_information
|
@@ -94,8 +123,6 @@ def example
|
|
94
123
|
customer.locale = 'en_US'
|
95
124
|
customer.merchant_customer_id = '1234'
|
96
125
|
customer.personal_information = personal_information
|
97
|
-
customer.shipping_address = shipping_address
|
98
|
-
customer.vat_number = '1234AB5678CD'
|
99
126
|
|
100
127
|
invoice_data = Payment::OrderInvoiceData.new
|
101
128
|
invoice_data.invoice_date = '20140306191500'
|
@@ -107,6 +134,24 @@ def example
|
|
107
134
|
references.merchant_order_id = 123456
|
108
135
|
references.merchant_reference = 'AcmeOrder0001'
|
109
136
|
|
137
|
+
shipping_name = Payment::PersonalName.new
|
138
|
+
shipping_name.first_name = 'Road'
|
139
|
+
shipping_name.surname = 'Runner'
|
140
|
+
shipping_name.title = 'Miss'
|
141
|
+
|
142
|
+
address = Payment::AddressPersonal.new
|
143
|
+
address.additional_info = 'Suite II'
|
144
|
+
address.city = 'Monument Valley'
|
145
|
+
address.country_code = 'US'
|
146
|
+
address.house_number = '1'
|
147
|
+
address.name = shipping_name
|
148
|
+
address.state = 'Utah'
|
149
|
+
address.street = 'Desertroad'
|
150
|
+
address.zip = '84536'
|
151
|
+
|
152
|
+
shipping = Payment::Shipping.new
|
153
|
+
shipping.address = address
|
154
|
+
|
110
155
|
items = []
|
111
156
|
|
112
157
|
item1_amount_of_money = Definitions::AmountOfMoney.new
|
@@ -146,6 +191,7 @@ def example
|
|
146
191
|
order.amount_of_money = amount_of_money
|
147
192
|
order.customer = customer
|
148
193
|
order.references = references
|
194
|
+
order.shipping = shipping
|
149
195
|
order.shopping_cart = shopping_cart
|
150
196
|
|
151
197
|
body = Payment::CreatePaymentRequest.new
|
@@ -62,7 +62,6 @@ def example
|
|
62
62
|
airline_data.flight_legs = flight_legs
|
63
63
|
airline_data.invoice_number = '123456'
|
64
64
|
airline_data.is_e_ticket = true
|
65
|
-
airline_data.is_registered_customer = true
|
66
65
|
airline_data.is_restricted_ticket = true
|
67
66
|
airline_data.is_third_party = true
|
68
67
|
airline_data.issue_date = '20150101'
|
@@ -87,6 +86,7 @@ def example
|
|
87
86
|
billing_address.country_code = 'US'
|
88
87
|
|
89
88
|
customer = Riskassessments::CustomerRiskAssessment.new
|
89
|
+
customer.account_type = 'existing'
|
90
90
|
customer.billing_address = billing_address
|
91
91
|
customer.locale = 'en_US'
|
92
92
|
|
@@ -13,9 +13,13 @@ module Ingenico::Connect::SDK
|
|
13
13
|
# String
|
14
14
|
attr_accessor :name
|
15
15
|
|
16
|
+
# String
|
17
|
+
attr_accessor :vat_number
|
18
|
+
|
16
19
|
def to_h
|
17
20
|
hash = super
|
18
21
|
add_to_hash(hash, 'name', @name)
|
22
|
+
add_to_hash(hash, 'vatNumber', @vat_number)
|
19
23
|
hash
|
20
24
|
end
|
21
25
|
|
@@ -24,6 +28,9 @@ module Ingenico::Connect::SDK
|
|
24
28
|
if hash.has_key?('name')
|
25
29
|
@name = hash['name']
|
26
30
|
end
|
31
|
+
if hash.has_key?('vatNumber')
|
32
|
+
@vat_number = hash['vatNumber']
|
33
|
+
end
|
27
34
|
end
|
28
35
|
end
|
29
36
|
end
|
@@ -13,24 +13,34 @@ module Ingenico::Connect::SDK
|
|
13
13
|
class FraudFields < Ingenico::Connect::SDK::DataObject
|
14
14
|
|
15
15
|
# true/false
|
16
|
+
#
|
17
|
+
# Deprecated; For risk assessments there is no replacement. For other calls, use Order.shipping.addressIndicator instead
|
16
18
|
attr_accessor :addresses_are_identical
|
17
19
|
|
18
20
|
# String
|
19
21
|
attr_accessor :black_list_data
|
20
22
|
|
21
23
|
# {Ingenico::Connect::SDK::Domain::Definitions::Address}
|
24
|
+
#
|
25
|
+
# Deprecated; This should be the same as Order.customer.billingAddress
|
22
26
|
attr_accessor :card_owner_address
|
23
27
|
|
24
28
|
# String
|
25
29
|
attr_accessor :customer_ip_address
|
26
30
|
|
27
31
|
# String
|
32
|
+
#
|
33
|
+
# Deprecated; Use Order.customer.device.defaultFormFill instead
|
28
34
|
attr_accessor :default_form_fill
|
29
35
|
|
30
36
|
# true/false
|
37
|
+
#
|
38
|
+
# Deprecated; No replacement
|
31
39
|
attr_accessor :device_fingerprint_activated
|
32
40
|
|
33
41
|
# String
|
42
|
+
#
|
43
|
+
# Deprecated; Use Order.customer.device.deviceFingerprintTransactionId instead
|
34
44
|
attr_accessor :device_fingerprint_transaction_id
|
35
45
|
|
36
46
|
# String
|
@@ -40,30 +50,44 @@ module Ingenico::Connect::SDK
|
|
40
50
|
attr_accessor :gift_message
|
41
51
|
|
42
52
|
# true/false
|
53
|
+
#
|
54
|
+
# Deprecated; Use Order.customer.account.hasForgottenPassword instead
|
43
55
|
attr_accessor :has_forgotten_pwd
|
44
56
|
|
45
57
|
# true/false
|
58
|
+
#
|
59
|
+
# Deprecated; Use Order.customer.account.hasPassword instead
|
46
60
|
attr_accessor :has_password
|
47
61
|
|
48
62
|
# true/false
|
63
|
+
#
|
64
|
+
# Deprecated; Use Order.customer.isPreviousCustomer instead
|
49
65
|
attr_accessor :is_previous_customer
|
50
66
|
|
51
67
|
# String
|
52
68
|
attr_accessor :order_timezone
|
53
69
|
|
54
70
|
# String
|
71
|
+
#
|
72
|
+
# Deprecated; Use Order.shipping.comments instead
|
55
73
|
attr_accessor :ship_comments
|
56
74
|
|
57
75
|
# String
|
76
|
+
#
|
77
|
+
# Deprecated; Use Order.shipping.trackingNumber instead
|
58
78
|
attr_accessor :shipment_tracking_number
|
59
79
|
|
60
80
|
# {Ingenico::Connect::SDK::Domain::Definitions::FraudFieldsShippingDetails}
|
81
|
+
#
|
82
|
+
# Deprecated; No replacement
|
61
83
|
attr_accessor :shipping_details
|
62
84
|
|
63
85
|
# Array of String
|
64
86
|
attr_accessor :user_data
|
65
87
|
|
66
88
|
# String
|
89
|
+
#
|
90
|
+
# Deprecated; Use Merchant.websiteUrl instead
|
67
91
|
attr_accessor :website
|
68
92
|
|
69
93
|
def to_h
|
@@ -8,15 +8,22 @@ module Ingenico::Connect::SDK
|
|
8
8
|
module Domain
|
9
9
|
module Definitions
|
10
10
|
|
11
|
+
# Deprecated; No replacement
|
11
12
|
class FraudFieldsShippingDetails < Ingenico::Connect::SDK::DataObject
|
12
13
|
|
13
14
|
# String
|
15
|
+
#
|
16
|
+
# Deprecated; No replacement
|
14
17
|
attr_accessor :method_details
|
15
18
|
|
16
19
|
# Integer
|
20
|
+
#
|
21
|
+
# Deprecated; No replacement
|
17
22
|
attr_accessor :method_speed
|
18
23
|
|
19
24
|
# Integer
|
25
|
+
#
|
26
|
+
# Deprecated; No replacement
|
20
27
|
attr_accessor :method_type
|
21
28
|
|
22
29
|
def to_h
|
@@ -10,6 +10,7 @@ require 'ingenico/connect/sdk/domain/payment/bank_transfer_payment_method_specif
|
|
10
10
|
require 'ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base'
|
11
11
|
require 'ingenico/connect/sdk/domain/payment/cash_payment_method_specific_input_base'
|
12
12
|
require 'ingenico/connect/sdk/domain/payment/e_invoice_payment_method_specific_input_base'
|
13
|
+
require 'ingenico/connect/sdk/domain/payment/merchant'
|
13
14
|
require 'ingenico/connect/sdk/domain/payment/order'
|
14
15
|
require 'ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input_base'
|
15
16
|
require 'ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_input_base'
|
@@ -38,6 +39,9 @@ module Ingenico::Connect::SDK
|
|
38
39
|
# {Ingenico::Connect::SDK::Domain::Hostedcheckout::HostedCheckoutSpecificInput}
|
39
40
|
attr_accessor :hosted_checkout_specific_input
|
40
41
|
|
42
|
+
# {Ingenico::Connect::SDK::Domain::Payment::Merchant}
|
43
|
+
attr_accessor :merchant
|
44
|
+
|
41
45
|
# {Ingenico::Connect::SDK::Domain::Hostedcheckout::MobilePaymentMethodSpecificInputHostedCheckout}
|
42
46
|
attr_accessor :mobile_payment_method_specific_input
|
43
47
|
|
@@ -58,6 +62,7 @@ module Ingenico::Connect::SDK
|
|
58
62
|
add_to_hash(hash, 'eInvoicePaymentMethodSpecificInput', @e_invoice_payment_method_specific_input)
|
59
63
|
add_to_hash(hash, 'fraudFields', @fraud_fields)
|
60
64
|
add_to_hash(hash, 'hostedCheckoutSpecificInput', @hosted_checkout_specific_input)
|
65
|
+
add_to_hash(hash, 'merchant', @merchant)
|
61
66
|
add_to_hash(hash, 'mobilePaymentMethodSpecificInput', @mobile_payment_method_specific_input)
|
62
67
|
add_to_hash(hash, 'order', @order)
|
63
68
|
add_to_hash(hash, 'redirectPaymentMethodSpecificInput', @redirect_payment_method_specific_input)
|
@@ -103,6 +108,12 @@ module Ingenico::Connect::SDK
|
|
103
108
|
end
|
104
109
|
@hosted_checkout_specific_input = Ingenico::Connect::SDK::Domain::Hostedcheckout::HostedCheckoutSpecificInput.new_from_hash(hash['hostedCheckoutSpecificInput'])
|
105
110
|
end
|
111
|
+
if hash.has_key?('merchant')
|
112
|
+
if !(hash['merchant'].is_a? Hash)
|
113
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['merchant']]
|
114
|
+
end
|
115
|
+
@merchant = Ingenico::Connect::SDK::Domain::Payment::Merchant.new_from_hash(hash['merchant'])
|
116
|
+
end
|
106
117
|
if hash.has_key?('mobilePaymentMethodSpecificInput')
|
107
118
|
if !(hash['mobilePaymentMethodSpecificInput'].is_a? Hash)
|
108
119
|
raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificInput']]
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/domain/definitions/abstract_payment_method_specific_input'
|
6
|
+
require 'ingenico/connect/sdk/domain/payment/card_recurrence_details'
|
6
7
|
|
7
8
|
module Ingenico::Connect::SDK
|
8
9
|
module Domain
|
@@ -16,13 +17,20 @@ module Ingenico::Connect::SDK
|
|
16
17
|
# String
|
17
18
|
attr_accessor :customer_reference
|
18
19
|
|
20
|
+
# {Ingenico::Connect::SDK::Domain::Payment::CardRecurrenceDetails}
|
21
|
+
attr_accessor :recurring
|
22
|
+
|
19
23
|
# String
|
24
|
+
#
|
25
|
+
# Deprecated; Use recurring.recurringPaymentSequenceIndicator instead
|
20
26
|
attr_accessor :recurring_payment_sequence_indicator
|
21
27
|
|
22
28
|
# true/false
|
23
29
|
attr_accessor :requires_approval
|
24
30
|
|
25
31
|
# true/false
|
32
|
+
#
|
33
|
+
# Deprecated; Use threeDSecure.skipAuthentication instead
|
26
34
|
attr_accessor :skip_authentication
|
27
35
|
|
28
36
|
# true/false
|
@@ -38,15 +46,21 @@ module Ingenico::Connect::SDK
|
|
38
46
|
attr_accessor :transaction_channel
|
39
47
|
|
40
48
|
# String
|
49
|
+
#
|
50
|
+
# Deprecated; Use unscheduledCardOnFileSequenceIndicator instead
|
41
51
|
attr_accessor :unscheduled_card_on_file_indicator
|
42
52
|
|
43
53
|
# String
|
44
54
|
attr_accessor :unscheduled_card_on_file_requestor
|
45
55
|
|
56
|
+
# String
|
57
|
+
attr_accessor :unscheduled_card_on_file_sequence_indicator
|
58
|
+
|
46
59
|
def to_h
|
47
60
|
hash = super
|
48
61
|
add_to_hash(hash, 'authorizationMode', @authorization_mode)
|
49
62
|
add_to_hash(hash, 'customerReference', @customer_reference)
|
63
|
+
add_to_hash(hash, 'recurring', @recurring)
|
50
64
|
add_to_hash(hash, 'recurringPaymentSequenceIndicator', @recurring_payment_sequence_indicator)
|
51
65
|
add_to_hash(hash, 'requiresApproval', @requires_approval)
|
52
66
|
add_to_hash(hash, 'skipAuthentication', @skip_authentication)
|
@@ -56,6 +70,7 @@ module Ingenico::Connect::SDK
|
|
56
70
|
add_to_hash(hash, 'transactionChannel', @transaction_channel)
|
57
71
|
add_to_hash(hash, 'unscheduledCardOnFileIndicator', @unscheduled_card_on_file_indicator)
|
58
72
|
add_to_hash(hash, 'unscheduledCardOnFileRequestor', @unscheduled_card_on_file_requestor)
|
73
|
+
add_to_hash(hash, 'unscheduledCardOnFileSequenceIndicator', @unscheduled_card_on_file_sequence_indicator)
|
59
74
|
hash
|
60
75
|
end
|
61
76
|
|
@@ -67,6 +82,12 @@ module Ingenico::Connect::SDK
|
|
67
82
|
if hash.has_key?('customerReference')
|
68
83
|
@customer_reference = hash['customerReference']
|
69
84
|
end
|
85
|
+
if hash.has_key?('recurring')
|
86
|
+
if !(hash['recurring'].is_a? Hash)
|
87
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['recurring']]
|
88
|
+
end
|
89
|
+
@recurring = Ingenico::Connect::SDK::Domain::Payment::CardRecurrenceDetails.new_from_hash(hash['recurring'])
|
90
|
+
end
|
70
91
|
if hash.has_key?('recurringPaymentSequenceIndicator')
|
71
92
|
@recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator']
|
72
93
|
end
|
@@ -94,6 +115,9 @@ module Ingenico::Connect::SDK
|
|
94
115
|
if hash.has_key?('unscheduledCardOnFileRequestor')
|
95
116
|
@unscheduled_card_on_file_requestor = hash['unscheduledCardOnFileRequestor']
|
96
117
|
end
|
118
|
+
if hash.has_key?('unscheduledCardOnFileSequenceIndicator')
|
119
|
+
@unscheduled_card_on_file_sequence_indicator = hash['unscheduledCardOnFileSequenceIndicator']
|
120
|
+
end
|
97
121
|
end
|
98
122
|
end
|
99
123
|
end
|