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
@@ -8,22 +8,22 @@ module Ingenico::Connect::SDK
|
|
8
8
|
module Domain
|
9
9
|
module Payment
|
10
10
|
|
11
|
-
# Deprecated; Use
|
11
|
+
# Deprecated; Use ShoppingCart.amountBreakdown instead
|
12
12
|
class Level3SummaryData < Ingenico::Connect::SDK::DataObject
|
13
13
|
|
14
14
|
# Integer
|
15
15
|
#
|
16
|
-
# Deprecated; Use ShoppingCart.
|
16
|
+
# Deprecated; Use ShoppingCart.amountBreakdown with type DISCOUNT instead
|
17
17
|
attr_accessor :discount_amount
|
18
18
|
|
19
19
|
# Integer
|
20
20
|
#
|
21
|
-
# Deprecated; Use ShoppingCart.
|
21
|
+
# Deprecated; Use ShoppingCart.amountBreakdown with type DUTY instead
|
22
22
|
attr_accessor :duty_amount
|
23
23
|
|
24
24
|
# Integer
|
25
25
|
#
|
26
|
-
# Deprecated; Use ShoppingCart.
|
26
|
+
# Deprecated; Use ShoppingCart.amountBreakdown with type SHIPPING instead
|
27
27
|
attr_accessor :shipping_amount
|
28
28
|
|
29
29
|
def to_h
|
@@ -0,0 +1,49 @@
|
|
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/seller'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Payment
|
11
|
+
|
12
|
+
class Merchant < Ingenico::Connect::SDK::DataObject
|
13
|
+
|
14
|
+
# String
|
15
|
+
attr_accessor :contact_website_url
|
16
|
+
|
17
|
+
# {Ingenico::Connect::SDK::Domain::Payment::Seller}
|
18
|
+
attr_accessor :seller
|
19
|
+
|
20
|
+
# String
|
21
|
+
attr_accessor :website_url
|
22
|
+
|
23
|
+
def to_h
|
24
|
+
hash = super
|
25
|
+
add_to_hash(hash, 'contactWebsiteUrl', @contact_website_url)
|
26
|
+
add_to_hash(hash, 'seller', @seller)
|
27
|
+
add_to_hash(hash, 'websiteUrl', @website_url)
|
28
|
+
hash
|
29
|
+
end
|
30
|
+
|
31
|
+
def from_hash(hash)
|
32
|
+
super
|
33
|
+
if hash.has_key?('contactWebsiteUrl')
|
34
|
+
@contact_website_url = hash['contactWebsiteUrl']
|
35
|
+
end
|
36
|
+
if hash.has_key?('seller')
|
37
|
+
if !(hash['seller'].is_a? Hash)
|
38
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['seller']]
|
39
|
+
end
|
40
|
+
@seller = Ingenico::Connect::SDK::Domain::Payment::Seller.new_from_hash(hash['seller'])
|
41
|
+
end
|
42
|
+
if hash.has_key?('websiteUrl')
|
43
|
+
@website_url = hash['websiteUrl']
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -4,6 +4,7 @@
|
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/data_object'
|
6
6
|
require 'ingenico/connect/sdk/domain/definitions/key_value_pair'
|
7
|
+
require 'ingenico/connect/sdk/domain/payment/mobile_three_d_secure_challenge_parameters'
|
7
8
|
require 'ingenico/connect/sdk/domain/payment/redirect_data'
|
8
9
|
require 'ingenico/connect/sdk/domain/product/payment_product_field'
|
9
10
|
|
@@ -19,6 +20,9 @@ module Ingenico::Connect::SDK
|
|
19
20
|
# Array of {Ingenico::Connect::SDK::Domain::Product::PaymentProductField}
|
20
21
|
attr_accessor :form_fields
|
21
22
|
|
23
|
+
# {Ingenico::Connect::SDK::Domain::Payment::MobileThreeDSecureChallengeParameters}
|
24
|
+
attr_accessor :mobile_three_d_secure_challenge_parameters
|
25
|
+
|
22
26
|
# {Ingenico::Connect::SDK::Domain::Payment::RedirectData}
|
23
27
|
attr_accessor :redirect_data
|
24
28
|
|
@@ -32,6 +36,7 @@ module Ingenico::Connect::SDK
|
|
32
36
|
hash = super
|
33
37
|
add_to_hash(hash, 'actionType', @action_type)
|
34
38
|
add_to_hash(hash, 'formFields', @form_fields)
|
39
|
+
add_to_hash(hash, 'mobileThreeDSecureChallengeParameters', @mobile_three_d_secure_challenge_parameters)
|
35
40
|
add_to_hash(hash, 'redirectData', @redirect_data)
|
36
41
|
add_to_hash(hash, 'renderingData', @rendering_data)
|
37
42
|
add_to_hash(hash, 'showData', @show_data)
|
@@ -52,6 +57,12 @@ module Ingenico::Connect::SDK
|
|
52
57
|
@form_fields << Ingenico::Connect::SDK::Domain::Product::PaymentProductField.new_from_hash(e)
|
53
58
|
end
|
54
59
|
end
|
60
|
+
if hash.has_key?('mobileThreeDSecureChallengeParameters')
|
61
|
+
if !(hash['mobileThreeDSecureChallengeParameters'].is_a? Hash)
|
62
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['mobileThreeDSecureChallengeParameters']]
|
63
|
+
end
|
64
|
+
@mobile_three_d_secure_challenge_parameters = Ingenico::Connect::SDK::Domain::Payment::MobileThreeDSecureChallengeParameters.new_from_hash(hash['mobileThreeDSecureChallengeParameters'])
|
65
|
+
end
|
55
66
|
if hash.has_key?('redirectData')
|
56
67
|
if !(hash['redirectData'].is_a? Hash)
|
57
68
|
raise TypeError, "value '%s' is not a Hash" % [hash['redirectData']]
|
@@ -0,0 +1,52 @@
|
|
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
|
+
class MobileThreeDSecureChallengeParameters < Ingenico::Connect::SDK::DataObject
|
12
|
+
|
13
|
+
# String
|
14
|
+
attr_accessor :acs_reference_number
|
15
|
+
|
16
|
+
# String
|
17
|
+
attr_accessor :acs_signed_content
|
18
|
+
|
19
|
+
# String
|
20
|
+
attr_accessor :acs_transaction_id
|
21
|
+
|
22
|
+
# String
|
23
|
+
attr_accessor :three_d_server_transaction_id
|
24
|
+
|
25
|
+
def to_h
|
26
|
+
hash = super
|
27
|
+
add_to_hash(hash, 'acsReferenceNumber', @acs_reference_number)
|
28
|
+
add_to_hash(hash, 'acsSignedContent', @acs_signed_content)
|
29
|
+
add_to_hash(hash, 'acsTransactionId', @acs_transaction_id)
|
30
|
+
add_to_hash(hash, 'threeDServerTransactionId', @three_d_server_transaction_id)
|
31
|
+
hash
|
32
|
+
end
|
33
|
+
|
34
|
+
def from_hash(hash)
|
35
|
+
super
|
36
|
+
if hash.has_key?('acsReferenceNumber')
|
37
|
+
@acs_reference_number = hash['acsReferenceNumber']
|
38
|
+
end
|
39
|
+
if hash.has_key?('acsSignedContent')
|
40
|
+
@acs_signed_content = hash['acsSignedContent']
|
41
|
+
end
|
42
|
+
if hash.has_key?('acsTransactionId')
|
43
|
+
@acs_transaction_id = hash['acsTransactionId']
|
44
|
+
end
|
45
|
+
if hash.has_key?('threeDServerTransactionId')
|
46
|
+
@three_d_server_transaction_id = hash['threeDServerTransactionId']
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -29,13 +29,15 @@ module Ingenico::Connect::SDK
|
|
29
29
|
|
30
30
|
# Array of {Ingenico::Connect::SDK::Domain::Payment::LineItem}
|
31
31
|
#
|
32
|
-
# Deprecated; Use
|
32
|
+
# Deprecated; Use shoppingCart.items instead
|
33
33
|
attr_accessor :items
|
34
34
|
|
35
35
|
# {Ingenico::Connect::SDK::Domain::Payment::OrderReferences}
|
36
36
|
attr_accessor :references
|
37
37
|
|
38
38
|
# {Ingenico::Connect::SDK::Domain::Payment::Seller}
|
39
|
+
#
|
40
|
+
# Deprecated; Use Merchant.seller instead
|
39
41
|
attr_accessor :seller
|
40
42
|
|
41
43
|
# {Ingenico::Connect::SDK::Domain::Payment::Shipping}
|
@@ -4,6 +4,7 @@
|
|
4
4
|
#
|
5
5
|
require 'ingenico/connect/sdk/data_object'
|
6
6
|
require 'ingenico/connect/sdk/domain/definitions/additional_order_input_airline_data'
|
7
|
+
require 'ingenico/connect/sdk/domain/payment/customer_approve_payment'
|
7
8
|
require 'ingenico/connect/sdk/domain/payment/order_references_approve_payment'
|
8
9
|
|
9
10
|
module Ingenico::Connect::SDK
|
@@ -15,12 +16,16 @@ module Ingenico::Connect::SDK
|
|
15
16
|
# {Ingenico::Connect::SDK::Domain::Definitions::AdditionalOrderInputAirlineData}
|
16
17
|
attr_accessor :additional_input
|
17
18
|
|
19
|
+
# {Ingenico::Connect::SDK::Domain::Payment::CustomerApprovePayment}
|
20
|
+
attr_accessor :customer
|
21
|
+
|
18
22
|
# {Ingenico::Connect::SDK::Domain::Payment::OrderReferencesApprovePayment}
|
19
23
|
attr_accessor :references
|
20
24
|
|
21
25
|
def to_h
|
22
26
|
hash = super
|
23
27
|
add_to_hash(hash, 'additionalInput', @additional_input)
|
28
|
+
add_to_hash(hash, 'customer', @customer)
|
24
29
|
add_to_hash(hash, 'references', @references)
|
25
30
|
hash
|
26
31
|
end
|
@@ -33,6 +38,12 @@ module Ingenico::Connect::SDK
|
|
33
38
|
end
|
34
39
|
@additional_input = Ingenico::Connect::SDK::Domain::Definitions::AdditionalOrderInputAirlineData.new_from_hash(hash['additionalInput'])
|
35
40
|
end
|
41
|
+
if hash.has_key?('customer')
|
42
|
+
if !(hash['customer'].is_a? Hash)
|
43
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['customer']]
|
44
|
+
end
|
45
|
+
@customer = Ingenico::Connect::SDK::Domain::Payment::CustomerApprovePayment.new_from_hash(hash['customer'])
|
46
|
+
end
|
36
47
|
if hash.has_key?('references')
|
37
48
|
if !(hash['references'].is_a? Hash)
|
38
49
|
raise TypeError, "value '%s' is not a Hash" % [hash['references']]
|
@@ -13,12 +13,16 @@ module Ingenico::Connect::SDK
|
|
13
13
|
# String
|
14
14
|
attr_accessor :purchase_type
|
15
15
|
|
16
|
+
# String
|
17
|
+
attr_accessor :transaction_type
|
18
|
+
|
16
19
|
# String
|
17
20
|
attr_accessor :usage_type
|
18
21
|
|
19
22
|
def to_h
|
20
23
|
hash = super
|
21
24
|
add_to_hash(hash, 'purchaseType', @purchase_type)
|
25
|
+
add_to_hash(hash, 'transactionType', @transaction_type)
|
22
26
|
add_to_hash(hash, 'usageType', @usage_type)
|
23
27
|
hash
|
24
28
|
end
|
@@ -28,6 +32,9 @@ module Ingenico::Connect::SDK
|
|
28
32
|
if hash.has_key?('purchaseType')
|
29
33
|
@purchase_type = hash['purchaseType']
|
30
34
|
end
|
35
|
+
if hash.has_key?('transactionType')
|
36
|
+
@transaction_type = hash['transactionType']
|
37
|
+
end
|
31
38
|
if hash.has_key?('usageType')
|
32
39
|
@usage_type = hash['usageType']
|
33
40
|
end
|
@@ -0,0 +1,38 @@
|
|
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
|
+
class PaymentAccountOnFile < Ingenico::Connect::SDK::DataObject
|
12
|
+
|
13
|
+
# String
|
14
|
+
attr_accessor :create_date
|
15
|
+
|
16
|
+
# Integer
|
17
|
+
attr_accessor :number_of_card_on_file_creation_attempts_last24_hours
|
18
|
+
|
19
|
+
def to_h
|
20
|
+
hash = super
|
21
|
+
add_to_hash(hash, 'createDate', @create_date)
|
22
|
+
add_to_hash(hash, 'numberOfCardOnFileCreationAttemptsLast24Hours', @number_of_card_on_file_creation_attempts_last24_hours)
|
23
|
+
hash
|
24
|
+
end
|
25
|
+
|
26
|
+
def from_hash(hash)
|
27
|
+
super
|
28
|
+
if hash.has_key?('createDate')
|
29
|
+
@create_date = hash['createDate']
|
30
|
+
end
|
31
|
+
if hash.has_key?('numberOfCardOnFileCreationAttemptsLast24Hours')
|
32
|
+
@number_of_card_on_file_creation_attempts_last24_hours = hash['numberOfCardOnFileCreationAttemptsLast24Hours']
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -8,6 +8,7 @@ require 'ingenico/connect/sdk/domain/payment/redirect_payment_product816_specifi
|
|
8
8
|
require 'ingenico/connect/sdk/domain/payment/redirect_payment_product840_specific_input'
|
9
9
|
require 'ingenico/connect/sdk/domain/payment/redirect_payment_product863_specific_input'
|
10
10
|
require 'ingenico/connect/sdk/domain/payment/redirect_payment_product882_specific_input'
|
11
|
+
require 'ingenico/connect/sdk/domain/payment/redirection_data'
|
11
12
|
|
12
13
|
module Ingenico::Connect::SDK
|
13
14
|
module Domain
|
@@ -33,7 +34,12 @@ module Ingenico::Connect::SDK
|
|
33
34
|
# {Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct882SpecificInput}
|
34
35
|
attr_accessor :payment_product882_specific_input
|
35
36
|
|
37
|
+
# {Ingenico::Connect::SDK::Domain::Payment::RedirectionData}
|
38
|
+
attr_accessor :redirection_data
|
39
|
+
|
36
40
|
# String
|
41
|
+
#
|
42
|
+
# Deprecated; Use redirectionData.returnUrl instead
|
37
43
|
attr_accessor :return_url
|
38
44
|
|
39
45
|
def to_h
|
@@ -44,6 +50,7 @@ module Ingenico::Connect::SDK
|
|
44
50
|
add_to_hash(hash, 'paymentProduct840SpecificInput', @payment_product840_specific_input)
|
45
51
|
add_to_hash(hash, 'paymentProduct863SpecificInput', @payment_product863_specific_input)
|
46
52
|
add_to_hash(hash, 'paymentProduct882SpecificInput', @payment_product882_specific_input)
|
53
|
+
add_to_hash(hash, 'redirectionData', @redirection_data)
|
47
54
|
add_to_hash(hash, 'returnUrl', @return_url)
|
48
55
|
hash
|
49
56
|
end
|
@@ -83,6 +90,12 @@ module Ingenico::Connect::SDK
|
|
83
90
|
end
|
84
91
|
@payment_product882_specific_input = Ingenico::Connect::SDK::Domain::Payment::RedirectPaymentProduct882SpecificInput.new_from_hash(hash['paymentProduct882SpecificInput'])
|
85
92
|
end
|
93
|
+
if hash.has_key?('redirectionData')
|
94
|
+
if !(hash['redirectionData'].is_a? Hash)
|
95
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['redirectionData']]
|
96
|
+
end
|
97
|
+
@redirection_data = Ingenico::Connect::SDK::Domain::Payment::RedirectionData.new_from_hash(hash['redirectionData'])
|
98
|
+
end
|
86
99
|
if hash.has_key?('returnUrl')
|
87
100
|
@return_url = hash['returnUrl']
|
88
101
|
end
|
@@ -0,0 +1,38 @@
|
|
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
|
+
class RedirectionData < Ingenico::Connect::SDK::DataObject
|
12
|
+
|
13
|
+
# String
|
14
|
+
attr_accessor :return_url
|
15
|
+
|
16
|
+
# String
|
17
|
+
attr_accessor :variant
|
18
|
+
|
19
|
+
def to_h
|
20
|
+
hash = super
|
21
|
+
add_to_hash(hash, 'returnUrl', @return_url)
|
22
|
+
add_to_hash(hash, 'variant', @variant)
|
23
|
+
hash
|
24
|
+
end
|
25
|
+
|
26
|
+
def from_hash(hash)
|
27
|
+
super
|
28
|
+
if hash.has_key?('returnUrl')
|
29
|
+
@return_url = hash['returnUrl']
|
30
|
+
end
|
31
|
+
if hash.has_key?('variant')
|
32
|
+
@variant = hash['variant']
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,84 @@
|
|
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/device_render_options'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Payment
|
11
|
+
|
12
|
+
class SdkDataInput < Ingenico::Connect::SDK::DataObject
|
13
|
+
|
14
|
+
# String
|
15
|
+
attr_accessor :device_info
|
16
|
+
|
17
|
+
# {Ingenico::Connect::SDK::Domain::Payment::DeviceRenderOptions}
|
18
|
+
attr_accessor :device_render_options
|
19
|
+
|
20
|
+
# String
|
21
|
+
attr_accessor :sdk_app_id
|
22
|
+
|
23
|
+
# String
|
24
|
+
attr_accessor :sdk_encrypted_data
|
25
|
+
|
26
|
+
# String
|
27
|
+
attr_accessor :sdk_ephemeral_public_key
|
28
|
+
|
29
|
+
# String
|
30
|
+
attr_accessor :sdk_max_timeout
|
31
|
+
|
32
|
+
# String
|
33
|
+
attr_accessor :sdk_reference_number
|
34
|
+
|
35
|
+
# String
|
36
|
+
attr_accessor :sdk_transaction_id
|
37
|
+
|
38
|
+
def to_h
|
39
|
+
hash = super
|
40
|
+
add_to_hash(hash, 'deviceInfo', @device_info)
|
41
|
+
add_to_hash(hash, 'deviceRenderOptions', @device_render_options)
|
42
|
+
add_to_hash(hash, 'sdkAppId', @sdk_app_id)
|
43
|
+
add_to_hash(hash, 'sdkEncryptedData', @sdk_encrypted_data)
|
44
|
+
add_to_hash(hash, 'sdkEphemeralPublicKey', @sdk_ephemeral_public_key)
|
45
|
+
add_to_hash(hash, 'sdkMaxTimeout', @sdk_max_timeout)
|
46
|
+
add_to_hash(hash, 'sdkReferenceNumber', @sdk_reference_number)
|
47
|
+
add_to_hash(hash, 'sdkTransactionId', @sdk_transaction_id)
|
48
|
+
hash
|
49
|
+
end
|
50
|
+
|
51
|
+
def from_hash(hash)
|
52
|
+
super
|
53
|
+
if hash.has_key?('deviceInfo')
|
54
|
+
@device_info = hash['deviceInfo']
|
55
|
+
end
|
56
|
+
if hash.has_key?('deviceRenderOptions')
|
57
|
+
if !(hash['deviceRenderOptions'].is_a? Hash)
|
58
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['deviceRenderOptions']]
|
59
|
+
end
|
60
|
+
@device_render_options = Ingenico::Connect::SDK::Domain::Payment::DeviceRenderOptions.new_from_hash(hash['deviceRenderOptions'])
|
61
|
+
end
|
62
|
+
if hash.has_key?('sdkAppId')
|
63
|
+
@sdk_app_id = hash['sdkAppId']
|
64
|
+
end
|
65
|
+
if hash.has_key?('sdkEncryptedData')
|
66
|
+
@sdk_encrypted_data = hash['sdkEncryptedData']
|
67
|
+
end
|
68
|
+
if hash.has_key?('sdkEphemeralPublicKey')
|
69
|
+
@sdk_ephemeral_public_key = hash['sdkEphemeralPublicKey']
|
70
|
+
end
|
71
|
+
if hash.has_key?('sdkMaxTimeout')
|
72
|
+
@sdk_max_timeout = hash['sdkMaxTimeout']
|
73
|
+
end
|
74
|
+
if hash.has_key?('sdkReferenceNumber')
|
75
|
+
@sdk_reference_number = hash['sdkReferenceNumber']
|
76
|
+
end
|
77
|
+
if hash.has_key?('sdkTransactionId')
|
78
|
+
@sdk_transaction_id = hash['sdkTransactionId']
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|