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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/connect-sdk-ruby.gemspec +1 -1
  3. data/examples/merchant/payments/create_payment_example.rb +64 -18
  4. data/examples/merchant/riskassessments/risk_assessment_cards_example.rb +1 -1
  5. data/lib/ingenico/connect/sdk/domain/definitions/airline_data.rb +2 -0
  6. data/lib/ingenico/connect/sdk/domain/definitions/company_information.rb +7 -0
  7. data/lib/ingenico/connect/sdk/domain/definitions/customer_base.rb +2 -0
  8. data/lib/ingenico/connect/sdk/domain/definitions/fraud_fields.rb +24 -0
  9. data/lib/ingenico/connect/sdk/domain/definitions/fraud_fields_shipping_details.rb +7 -0
  10. data/lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_request.rb +11 -0
  11. data/lib/ingenico/connect/sdk/domain/hostedcheckout/created_payment_output.rb +1 -1
  12. data/lib/ingenico/connect/sdk/domain/payment/abstract_card_payment_method_specific_input.rb +24 -0
  13. data/lib/ingenico/connect/sdk/domain/payment/abstract_sepa_direct_debit_payment_product771_specific_input.rb +1 -1
  14. data/lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb +74 -0
  15. data/lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb +1 -1
  16. data/lib/ingenico/connect/sdk/domain/payment/browser_data.rb +73 -0
  17. data/lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb +15 -0
  18. data/lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb +20 -0
  19. data/lib/ingenico/connect/sdk/domain/payment/card_recurrence_details.rb +45 -0
  20. data/lib/ingenico/connect/sdk/domain/payment/cash_payment_method_specific_input.rb +2 -0
  21. data/lib/ingenico/connect/sdk/domain/payment/cash_payment_product1503_specific_input.rb +3 -0
  22. data/lib/ingenico/connect/sdk/domain/payment/complete_payment_request.rb +11 -0
  23. data/lib/ingenico/connect/sdk/domain/payment/contact_details.rb +14 -0
  24. data/lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb +11 -0
  25. data/lib/ingenico/connect/sdk/domain/payment/customer.rb +38 -0
  26. data/lib/ingenico/connect/sdk/domain/payment/customer_account.rb +120 -0
  27. data/lib/ingenico/connect/sdk/domain/payment/customer_account_authentication.rb +38 -0
  28. data/lib/ingenico/connect/sdk/domain/payment/customer_approve_payment.rb +31 -0
  29. data/lib/ingenico/connect/sdk/domain/payment/customer_device.rb +84 -0
  30. data/lib/ingenico/connect/sdk/domain/payment/customer_payment_activity.rb +45 -0
  31. data/lib/ingenico/connect/sdk/domain/payment/device_render_options.rb +38 -0
  32. data/lib/ingenico/connect/sdk/domain/payment/external_cardholder_authentication_data.rb +21 -0
  33. data/lib/ingenico/connect/sdk/domain/payment/gift_card_purchase.rb +42 -0
  34. data/lib/ingenico/connect/sdk/domain/payment/level3_summary_data.rb +4 -4
  35. data/lib/ingenico/connect/sdk/domain/payment/merchant.rb +49 -0
  36. data/lib/ingenico/connect/sdk/domain/payment/merchant_action.rb +11 -0
  37. data/lib/ingenico/connect/sdk/domain/payment/mobile_three_d_secure_challenge_parameters.rb +52 -0
  38. data/lib/ingenico/connect/sdk/domain/payment/order.rb +3 -1
  39. data/lib/ingenico/connect/sdk/domain/payment/order_approve_payment.rb +11 -0
  40. data/lib/ingenico/connect/sdk/domain/payment/order_type_information.rb +7 -0
  41. data/lib/ingenico/connect/sdk/domain/payment/payment_account_on_file.rb +38 -0
  42. data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input.rb +13 -0
  43. data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_product840_specific_input.rb +1 -1
  44. data/lib/ingenico/connect/sdk/domain/payment/redirection_data.rb +38 -0
  45. data/lib/ingenico/connect/sdk/domain/payment/sdk_data_input.rb +84 -0
  46. data/lib/ingenico/connect/sdk/domain/payment/sdk_data_output.rb +31 -0
  47. data/lib/ingenico/connect/sdk/domain/payment/shipping.rb +53 -0
  48. data/lib/ingenico/connect/sdk/domain/payment/shopping_cart.rb +32 -0
  49. data/lib/ingenico/connect/sdk/domain/payment/three_d_secure.rb +46 -0
  50. data/lib/ingenico/connect/sdk/domain/payment/three_d_secure_base.rb +15 -0
  51. data/lib/ingenico/connect/sdk/domain/payment/three_d_secure_data.rb +45 -0
  52. data/lib/ingenico/connect/sdk/domain/payment/three_d_secure_results.rb +43 -0
  53. data/lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb +6 -6
  54. data/lib/ingenico/connect/sdk/domain/product/value_mapping_element.rb +1 -1
  55. data/lib/ingenico/connect/sdk/domain/riskassessments/customer_account_risk_assessment.rb +38 -0
  56. data/lib/ingenico/connect/sdk/domain/riskassessments/customer_device_risk_assessment.rb +38 -0
  57. data/lib/ingenico/connect/sdk/domain/riskassessments/customer_risk_assessment.rb +38 -0
  58. data/lib/ingenico/connect/sdk/domain/riskassessments/merchant_risk_assessment.rb +31 -0
  59. data/lib/ingenico/connect/sdk/domain/riskassessments/order_risk_assessment.rb +11 -0
  60. data/lib/ingenico/connect/sdk/domain/riskassessments/risk_assessment.rb +11 -0
  61. data/lib/ingenico/connect/sdk/domain/riskassessments/shipping_risk_assessment.rb +49 -0
  62. data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
  63. metadata +25 -2
@@ -0,0 +1,120 @@
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/customer_account_authentication'
7
+ require 'ingenico/connect/sdk/domain/payment/customer_payment_activity'
8
+ require 'ingenico/connect/sdk/domain/payment/payment_account_on_file'
9
+
10
+ module Ingenico::Connect::SDK
11
+ module Domain
12
+ module Payment
13
+
14
+ class CustomerAccount < Ingenico::Connect::SDK::DataObject
15
+
16
+ # {Ingenico::Connect::SDK::Domain::Payment::CustomerAccountAuthentication}
17
+ attr_accessor :authentication
18
+
19
+ # String
20
+ attr_accessor :change_date
21
+
22
+ # true/false
23
+ attr_accessor :changed_during_checkout
24
+
25
+ # String
26
+ attr_accessor :create_date
27
+
28
+ # true/false
29
+ attr_accessor :had_suspicious_activity
30
+
31
+ # true/false
32
+ attr_accessor :has_forgotten_password
33
+
34
+ # true/false
35
+ attr_accessor :has_password
36
+
37
+ # String
38
+ attr_accessor :password_change_date
39
+
40
+ # true/false
41
+ attr_accessor :password_changed_during_checkout
42
+
43
+ # {Ingenico::Connect::SDK::Domain::Payment::PaymentAccountOnFile}
44
+ attr_accessor :payment_account_on_file
45
+
46
+ # String
47
+ attr_accessor :payment_account_on_file_type
48
+
49
+ # {Ingenico::Connect::SDK::Domain::Payment::CustomerPaymentActivity}
50
+ attr_accessor :payment_activity
51
+
52
+ def to_h
53
+ hash = super
54
+ add_to_hash(hash, 'authentication', @authentication)
55
+ add_to_hash(hash, 'changeDate', @change_date)
56
+ add_to_hash(hash, 'changedDuringCheckout', @changed_during_checkout)
57
+ add_to_hash(hash, 'createDate', @create_date)
58
+ add_to_hash(hash, 'hadSuspiciousActivity', @had_suspicious_activity)
59
+ add_to_hash(hash, 'hasForgottenPassword', @has_forgotten_password)
60
+ add_to_hash(hash, 'hasPassword', @has_password)
61
+ add_to_hash(hash, 'passwordChangeDate', @password_change_date)
62
+ add_to_hash(hash, 'passwordChangedDuringCheckout', @password_changed_during_checkout)
63
+ add_to_hash(hash, 'paymentAccountOnFile', @payment_account_on_file)
64
+ add_to_hash(hash, 'paymentAccountOnFileType', @payment_account_on_file_type)
65
+ add_to_hash(hash, 'paymentActivity', @payment_activity)
66
+ hash
67
+ end
68
+
69
+ def from_hash(hash)
70
+ super
71
+ if hash.has_key?('authentication')
72
+ if !(hash['authentication'].is_a? Hash)
73
+ raise TypeError, "value '%s' is not a Hash" % [hash['authentication']]
74
+ end
75
+ @authentication = Ingenico::Connect::SDK::Domain::Payment::CustomerAccountAuthentication.new_from_hash(hash['authentication'])
76
+ end
77
+ if hash.has_key?('changeDate')
78
+ @change_date = hash['changeDate']
79
+ end
80
+ if hash.has_key?('changedDuringCheckout')
81
+ @changed_during_checkout = hash['changedDuringCheckout']
82
+ end
83
+ if hash.has_key?('createDate')
84
+ @create_date = hash['createDate']
85
+ end
86
+ if hash.has_key?('hadSuspiciousActivity')
87
+ @had_suspicious_activity = hash['hadSuspiciousActivity']
88
+ end
89
+ if hash.has_key?('hasForgottenPassword')
90
+ @has_forgotten_password = hash['hasForgottenPassword']
91
+ end
92
+ if hash.has_key?('hasPassword')
93
+ @has_password = hash['hasPassword']
94
+ end
95
+ if hash.has_key?('passwordChangeDate')
96
+ @password_change_date = hash['passwordChangeDate']
97
+ end
98
+ if hash.has_key?('passwordChangedDuringCheckout')
99
+ @password_changed_during_checkout = hash['passwordChangedDuringCheckout']
100
+ end
101
+ if hash.has_key?('paymentAccountOnFile')
102
+ if !(hash['paymentAccountOnFile'].is_a? Hash)
103
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentAccountOnFile']]
104
+ end
105
+ @payment_account_on_file = Ingenico::Connect::SDK::Domain::Payment::PaymentAccountOnFile.new_from_hash(hash['paymentAccountOnFile'])
106
+ end
107
+ if hash.has_key?('paymentAccountOnFileType')
108
+ @payment_account_on_file_type = hash['paymentAccountOnFileType']
109
+ end
110
+ if hash.has_key?('paymentActivity')
111
+ if !(hash['paymentActivity'].is_a? Hash)
112
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentActivity']]
113
+ end
114
+ @payment_activity = Ingenico::Connect::SDK::Domain::Payment::CustomerPaymentActivity.new_from_hash(hash['paymentActivity'])
115
+ end
116
+ end
117
+ end
118
+ end
119
+ end
120
+ 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 CustomerAccountAuthentication < Ingenico::Connect::SDK::DataObject
12
+
13
+ # String
14
+ attr_accessor :method
15
+
16
+ # String
17
+ attr_accessor :utc_timestamp
18
+
19
+ def to_h
20
+ hash = super
21
+ add_to_hash(hash, 'method', @method)
22
+ add_to_hash(hash, 'utcTimestamp', @utc_timestamp)
23
+ hash
24
+ end
25
+
26
+ def from_hash(hash)
27
+ super
28
+ if hash.has_key?('method')
29
+ @method = hash['method']
30
+ end
31
+ if hash.has_key?('utcTimestamp')
32
+ @utc_timestamp = hash['utcTimestamp']
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,31 @@
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 CustomerApprovePayment < Ingenico::Connect::SDK::DataObject
12
+
13
+ # String
14
+ attr_accessor :account_type
15
+
16
+ def to_h
17
+ hash = super
18
+ add_to_hash(hash, 'accountType', @account_type)
19
+ hash
20
+ end
21
+
22
+ def from_hash(hash)
23
+ super
24
+ if hash.has_key?('accountType')
25
+ @account_type = hash['accountType']
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ 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/browser_data'
7
+
8
+ module Ingenico::Connect::SDK
9
+ module Domain
10
+ module Payment
11
+
12
+ class CustomerDevice < Ingenico::Connect::SDK::DataObject
13
+
14
+ # String
15
+ attr_accessor :accept_header
16
+
17
+ # {Ingenico::Connect::SDK::Domain::Payment::BrowserData}
18
+ attr_accessor :browser_data
19
+
20
+ # String
21
+ attr_accessor :default_form_fill
22
+
23
+ # String
24
+ attr_accessor :device_fingerprint_transaction_id
25
+
26
+ # String
27
+ attr_accessor :ip_address
28
+
29
+ # String
30
+ attr_accessor :locale
31
+
32
+ # String
33
+ attr_accessor :timezone_offset_utc_minutes
34
+
35
+ # String
36
+ attr_accessor :user_agent
37
+
38
+ def to_h
39
+ hash = super
40
+ add_to_hash(hash, 'acceptHeader', @accept_header)
41
+ add_to_hash(hash, 'browserData', @browser_data)
42
+ add_to_hash(hash, 'defaultFormFill', @default_form_fill)
43
+ add_to_hash(hash, 'deviceFingerprintTransactionId', @device_fingerprint_transaction_id)
44
+ add_to_hash(hash, 'ipAddress', @ip_address)
45
+ add_to_hash(hash, 'locale', @locale)
46
+ add_to_hash(hash, 'timezoneOffsetUtcMinutes', @timezone_offset_utc_minutes)
47
+ add_to_hash(hash, 'userAgent', @user_agent)
48
+ hash
49
+ end
50
+
51
+ def from_hash(hash)
52
+ super
53
+ if hash.has_key?('acceptHeader')
54
+ @accept_header = hash['acceptHeader']
55
+ end
56
+ if hash.has_key?('browserData')
57
+ if !(hash['browserData'].is_a? Hash)
58
+ raise TypeError, "value '%s' is not a Hash" % [hash['browserData']]
59
+ end
60
+ @browser_data = Ingenico::Connect::SDK::Domain::Payment::BrowserData.new_from_hash(hash['browserData'])
61
+ end
62
+ if hash.has_key?('defaultFormFill')
63
+ @default_form_fill = hash['defaultFormFill']
64
+ end
65
+ if hash.has_key?('deviceFingerprintTransactionId')
66
+ @device_fingerprint_transaction_id = hash['deviceFingerprintTransactionId']
67
+ end
68
+ if hash.has_key?('ipAddress')
69
+ @ip_address = hash['ipAddress']
70
+ end
71
+ if hash.has_key?('locale')
72
+ @locale = hash['locale']
73
+ end
74
+ if hash.has_key?('timezoneOffsetUtcMinutes')
75
+ @timezone_offset_utc_minutes = hash['timezoneOffsetUtcMinutes']
76
+ end
77
+ if hash.has_key?('userAgent')
78
+ @user_agent = hash['userAgent']
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,45 @@
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 CustomerPaymentActivity < Ingenico::Connect::SDK::DataObject
12
+
13
+ # Integer
14
+ attr_accessor :number_of_payment_attempts_last24_hours
15
+
16
+ # Integer
17
+ attr_accessor :number_of_payment_attempts_last_year
18
+
19
+ # Integer
20
+ attr_accessor :number_of_purchases_last6_months
21
+
22
+ def to_h
23
+ hash = super
24
+ add_to_hash(hash, 'numberOfPaymentAttemptsLast24Hours', @number_of_payment_attempts_last24_hours)
25
+ add_to_hash(hash, 'numberOfPaymentAttemptsLastYear', @number_of_payment_attempts_last_year)
26
+ add_to_hash(hash, 'numberOfPurchasesLast6Months', @number_of_purchases_last6_months)
27
+ hash
28
+ end
29
+
30
+ def from_hash(hash)
31
+ super
32
+ if hash.has_key?('numberOfPaymentAttemptsLast24Hours')
33
+ @number_of_payment_attempts_last24_hours = hash['numberOfPaymentAttemptsLast24Hours']
34
+ end
35
+ if hash.has_key?('numberOfPaymentAttemptsLastYear')
36
+ @number_of_payment_attempts_last_year = hash['numberOfPaymentAttemptsLastYear']
37
+ end
38
+ if hash.has_key?('numberOfPurchasesLast6Months')
39
+ @number_of_purchases_last6_months = hash['numberOfPurchasesLast6Months']
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+ 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 DeviceRenderOptions < Ingenico::Connect::SDK::DataObject
12
+
13
+ # String
14
+ attr_accessor :sdk_interface
15
+
16
+ # String
17
+ attr_accessor :sdk_ui_type
18
+
19
+ def to_h
20
+ hash = super
21
+ add_to_hash(hash, 'sdkInterface', @sdk_interface)
22
+ add_to_hash(hash, 'sdkUiType', @sdk_ui_type)
23
+ hash
24
+ end
25
+
26
+ def from_hash(hash)
27
+ super
28
+ if hash.has_key?('sdkInterface')
29
+ @sdk_interface = hash['sdkInterface']
30
+ end
31
+ if hash.has_key?('sdkUiType')
32
+ @sdk_ui_type = hash['sdkUiType']
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -16,9 +16,18 @@ module Ingenico::Connect::SDK
16
16
  # String
17
17
  attr_accessor :cavv_algorithm
18
18
 
19
+ # String
20
+ attr_accessor :directory_server_transaction_id
21
+
19
22
  # Integer
20
23
  attr_accessor :eci
21
24
 
25
+ # String
26
+ attr_accessor :three_d_secure_version
27
+
28
+ # String
29
+ attr_accessor :three_d_server_transaction_id
30
+
22
31
  # String
23
32
  attr_accessor :validation_result
24
33
 
@@ -29,7 +38,10 @@ module Ingenico::Connect::SDK
29
38
  hash = super
30
39
  add_to_hash(hash, 'cavv', @cavv)
31
40
  add_to_hash(hash, 'cavvAlgorithm', @cavv_algorithm)
41
+ add_to_hash(hash, 'directoryServerTransactionId', @directory_server_transaction_id)
32
42
  add_to_hash(hash, 'eci', @eci)
43
+ add_to_hash(hash, 'threeDSecureVersion', @three_d_secure_version)
44
+ add_to_hash(hash, 'threeDServerTransactionId', @three_d_server_transaction_id)
33
45
  add_to_hash(hash, 'validationResult', @validation_result)
34
46
  add_to_hash(hash, 'xid', @xid)
35
47
  hash
@@ -43,9 +55,18 @@ module Ingenico::Connect::SDK
43
55
  if hash.has_key?('cavvAlgorithm')
44
56
  @cavv_algorithm = hash['cavvAlgorithm']
45
57
  end
58
+ if hash.has_key?('directoryServerTransactionId')
59
+ @directory_server_transaction_id = hash['directoryServerTransactionId']
60
+ end
46
61
  if hash.has_key?('eci')
47
62
  @eci = hash['eci']
48
63
  end
64
+ if hash.has_key?('threeDSecureVersion')
65
+ @three_d_secure_version = hash['threeDSecureVersion']
66
+ end
67
+ if hash.has_key?('threeDServerTransactionId')
68
+ @three_d_server_transaction_id = hash['threeDServerTransactionId']
69
+ end
49
70
  if hash.has_key?('validationResult')
50
71
  @validation_result = hash['validationResult']
51
72
  end
@@ -0,0 +1,42 @@
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/amount_of_money'
7
+
8
+ module Ingenico::Connect::SDK
9
+ module Domain
10
+ module Payment
11
+
12
+ class GiftCardPurchase < Ingenico::Connect::SDK::DataObject
13
+
14
+ # {Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney}
15
+ attr_accessor :amount_of_money
16
+
17
+ # Integer
18
+ attr_accessor :number_of_gift_cards
19
+
20
+ def to_h
21
+ hash = super
22
+ add_to_hash(hash, 'amountOfMoney', @amount_of_money)
23
+ add_to_hash(hash, 'numberOfGiftCards', @number_of_gift_cards)
24
+ hash
25
+ end
26
+
27
+ def from_hash(hash)
28
+ super
29
+ if hash.has_key?('amountOfMoney')
30
+ if !(hash['amountOfMoney'].is_a? Hash)
31
+ raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']]
32
+ end
33
+ @amount_of_money = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
34
+ end
35
+ if hash.has_key?('numberOfGiftCards')
36
+ @number_of_gift_cards = hash['numberOfGiftCards']
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end