cybersource_rest_client 0.0.17 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/core/MerchantConfig.rb +2 -0
  3. data/lib/cybersource_rest_client.rb +81 -5
  4. data/lib/cybersource_rest_client/api/authentication_exemptions_api.rb +89 -0
  5. data/lib/cybersource_rest_client/api/payer_authentication_api.rb +154 -0
  6. data/lib/cybersource_rest_client/api/report_definitions_api.rb +9 -0
  7. data/lib/cybersource_rest_client/api/report_downloads_api.rb +3 -0
  8. data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +79 -0
  9. data/lib/cybersource_rest_client/api/reports_api.rb +2 -2
  10. data/lib/cybersource_rest_client/api_client.rb +12 -0
  11. data/lib/cybersource_rest_client/models/authentication_exemptions_request.rb +228 -0
  12. data/lib/cybersource_rest_client/models/buyer_information.rb +20 -20
  13. data/lib/cybersource_rest_client/models/check_payer_auth_enrollment_request.rb +284 -0
  14. data/lib/cybersource_rest_client/models/create_payment_instrument_request.rb +2 -41
  15. data/lib/cybersource_rest_client/models/create_report_subscription_request.rb +27 -2
  16. data/lib/cybersource_rest_client/models/embedded_instrument_identifier_request.rb +226 -0
  17. data/lib/cybersource_rest_client/models/{embedded_instrument_identifier.rb → embedded_instrument_identifier_response.rb} +11 -2
  18. data/lib/cybersource_rest_client/models/{tms_v1_instrument_identifiers_delete409_response__links_payment_instruments.rb → instrument_identifier_payment_instruments_link.rb} +1 -1
  19. data/lib/cybersource_rest_client/models/{instrument_identifier.rb → instrument_identifier_response.rb} +11 -2
  20. data/lib/cybersource_rest_client/models/issuer.rb +208 -0
  21. data/lib/cybersource_rest_client/models/links.rb +10 -1
  22. data/lib/cybersource_rest_client/models/model_409_links.rb +1 -1
  23. data/lib/cybersource_rest_client/models/payment_instrument.rb +9 -9
  24. data/lib/cybersource_rest_client/models/payment_instrument_card.rb +2 -2
  25. data/lib/cybersource_rest_client/models/payment_instrument_instrument_identifier_request.rb +246 -0
  26. data/lib/cybersource_rest_client/models/payment_instrument_self_link.rb +183 -0
  27. data/lib/cybersource_rest_client/models/payment_instruments_links.rb +183 -0
  28. data/lib/cybersource_rest_client/models/personal_identification.rb +1 -1
  29. data/lib/cybersource_rest_client/models/predefined_subscription_request_bean.rb +392 -0
  30. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_installment_information.rb +225 -0
  31. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +1 -1
  32. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_point_of_sale_information_emv.rb +2 -2
  33. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_merchant_information_merchant_descriptor.rb +0 -15
  34. data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +2 -2
  35. data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb +1 -1
  36. data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +60 -0
  37. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +22 -27
  38. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +2 -2
  39. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb +26 -1
  40. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +4 -4
  41. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +2 -2
  42. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +1 -1
  43. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +2 -2
  44. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb +1 -1
  45. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_installment_information.rb +270 -0
  46. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb +2 -2
  47. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb +1 -1
  48. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +2 -2
  49. data/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information_merchant_descriptor.rb +0 -30
  50. data/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb +2 -2
  51. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +2 -2
  52. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_payouts_options.rb +1 -1
  53. data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_get200_response_report_definitions.rb +23 -4
  54. data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response.rb +23 -4
  55. data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response_default_settings.rb +255 -0
  56. data/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_subscriptions.rb +27 -2
  57. data/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response__link.rb +183 -0
  58. data/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response__link_report_download.rb +192 -0
  59. data/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response_report_search_results.rb +13 -4
  60. data/lib/cybersource_rest_client/models/request.rb +210 -0
  61. data/lib/cybersource_rest_client/models/risk_v1_authentication_excemptions_post400_response.rb +225 -0
  62. data/lib/cybersource_rest_client/models/risk_v1_authentication_exemptions_consumer_authentication_information_strong_authentication.rb +269 -0
  63. data/lib/cybersource_rest_client/models/risk_v1_authentication_exemptions_post201_response.rb +255 -0
  64. data/lib/cybersource_rest_client/models/risk_v1_authentication_exemptions_post201_response_consumer_authentication_information.rb +183 -0
  65. data/lib/cybersource_rest_client/models/risk_v1_authentication_exemptions_post201_response_risk_information.rb +199 -0
  66. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response.rb +285 -0
  67. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb +324 -0
  68. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response.rb +294 -0
  69. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_consumer_authentication_information.rb +444 -0
  70. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_order_information.rb +183 -0
  71. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_order_information_amount_details.rb +199 -0
  72. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_acquirer_information.rb +199 -0
  73. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_device_information.rb +183 -0
  74. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_merchant_information.rb +258 -0
  75. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_merchant_information_merchant_descriptor.rb +229 -0
  76. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_order_information.rb +212 -0
  77. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_order_information_bill_to.rb +496 -0
  78. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_order_information_line_items.rb +283 -0
  79. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_order_information_ship_to.rb +399 -0
  80. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_payment_information.rb +192 -0
  81. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_payment_information_card.rb +325 -0
  82. data/lib/cybersource_rest_client/models/riskv1authenticationexemptions_payment_information_tokenized_card.rb +291 -0
  83. data/lib/cybersource_rest_client/models/riskv1authenticationresults_consumer_authentication_information.rb +524 -0
  84. data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information.rb +194 -0
  85. data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information_line_items.rb +267 -0
  86. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information.rb +192 -0
  87. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_card.rb +298 -0
  88. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +264 -0
  89. data/lib/cybersource_rest_client/models/riskv1authentications_acquirer_information.rb +274 -0
  90. data/lib/cybersource_rest_client/models/riskv1authentications_buyer_information.rb +196 -0
  91. data/lib/cybersource_rest_client/models/riskv1authentications_client_reference_information.rb +208 -0
  92. data/lib/cybersource_rest_client/models/riskv1authentications_consumer_authentication_information.rb +1359 -0
  93. data/lib/cybersource_rest_client/models/riskv1authentications_consumer_authentication_information_ivr.rb +319 -0
  94. data/lib/cybersource_rest_client/models/riskv1authentications_consumer_authentication_information_strong_authentication.rb +199 -0
  95. data/lib/cybersource_rest_client/models/riskv1authentications_device_information.rb +430 -0
  96. data/lib/cybersource_rest_client/models/riskv1authentications_device_information_raw_data.rb +209 -0
  97. data/lib/cybersource_rest_client/models/riskv1authentications_merchant_information.rb +208 -0
  98. data/lib/cybersource_rest_client/models/{tss_v2_transactions_get200_response_payment_information_payment_type_funding_source.rb → riskv1authentications_merchant_information_merchant_descriptor.rb} +25 -40
  99. data/lib/cybersource_rest_client/models/riskv1authentications_order_information.rb +283 -0
  100. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_line_items.rb +396 -0
  101. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_ship_to.rb +459 -0
  102. data/lib/cybersource_rest_client/models/riskv1authentications_recurring_payment_information.rb +235 -0
  103. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information.rb +183 -0
  104. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history.rb +262 -0
  105. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history_account_history.rb +209 -0
  106. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history_customer_account.rb +279 -0
  107. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information.rb +206 -0
  108. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information_legs.rb +259 -0
  109. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information_passengers.rb +224 -0
  110. data/lib/cybersource_rest_client/models/riskv1decisions_device_information.rb +26 -1
  111. data/lib/cybersource_rest_client/models/riskv1decisions_order_information.rb +13 -4
  112. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_address.rb +325 -0
  113. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_bill_to.rb +26 -1
  114. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information.rb +13 -4
  115. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_bank.rb +275 -0
  116. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_card.rb +2 -2
  117. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +1 -1
  118. data/lib/cybersource_rest_client/models/riskv1decisions_risk_information.rb +13 -4
  119. data/lib/cybersource_rest_client/models/riskv1decisions_risk_information_marking_details.rb +275 -0
  120. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_delete409_response__links.rb +1 -1
  121. data/lib/cybersource_rest_client/models/{tms_v1_instrument_identifiers_payment_instruments_get200_response_instrument_identifier.rb → tms_v1_instrument_identifiers_payment_instruments_embedded_instrument_identifier.rb} +11 -2
  122. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded__embedded.rb +183 -0
  123. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded__links.rb +183 -0
  124. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded__links_self.rb +183 -0
  125. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded_buyer_information.rb +20 -20
  126. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded_card.rb +2 -2
  127. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_payment_instruments.rb +9 -9
  128. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_personal_identification.rb +1 -1
  129. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response.rb +10 -1
  130. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response__links.rb +10 -1
  131. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response__links_payment_instruments.rb +183 -0
  132. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response_issuer.rb +208 -0
  133. data/lib/cybersource_rest_client/models/tmsv1instrumentidentifiers_card.rb +1 -1
  134. data/lib/cybersource_rest_client/models/tmsv1paymentinstruments_instrument_identifier.rb +226 -0
  135. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information_applications.rb +1 -1
  136. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information.rb +3 -3
  137. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb +1 -1
  138. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_payment_type.rb +12 -31
  139. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb +1 -1
  140. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_client_reference_information.rb +2 -2
  141. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb +1 -1
  142. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_payment_type.rb +9 -9
  143. data/lib/cybersource_rest_client/models/update_payment_instrument_request.rb +2 -41
  144. data/lib/cybersource_rest_client/utilities/flex/token_verification.rb +42 -0
  145. metadata +79 -7
@@ -0,0 +1,430 @@
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CyberSource
16
+ class Riskv1authenticationsDeviceInformation
17
+ # IP address of the customer.
18
+ attr_accessor :ip_address
19
+
20
+ attr_accessor :raw_data
21
+
22
+ # Value of the Accept header sent by the customer’s web browser. **Note** If the customer’s browser provides a value, you must include it in your request.
23
+ attr_accessor :http_accept_browser_value
24
+
25
+ # The exact content of the HTTP accept header.
26
+ attr_accessor :http_accept_content
27
+
28
+ # Value represents the browser language as defined in IETF BCP47. Example:en-US, refer https://en.wikipedia.org/wiki/IETF_language_tag for more details.
29
+ attr_accessor :http_browser_language
30
+
31
+ # A Boolean value that represents the ability of the cardholder browser to execute Java. Value is returned from the navigator.javaEnabled property. Possible Values:True/False
32
+ attr_accessor :http_browser_java_enabled
33
+
34
+ # A Boolean value that represents the ability of the cardholder browser to execute JavaScript. Possible Values:True/False. **Note**: Merchants should be able to know the values from fingerprint details of cardholder's browser.
35
+ attr_accessor :http_browser_java_script_enabled
36
+
37
+ # Value represents the bit depth of the color palette for displaying images, in bits per pixel. Example : 24, refer https://en.wikipedia.org/wiki/Color_depth for more details
38
+ attr_accessor :http_browser_color_depth
39
+
40
+ # Total height of the Cardholder's scree in pixels, example: 864.
41
+ attr_accessor :http_browser_screen_height
42
+
43
+ # Total width of the cardholder's screen in pixels. Example: 1536.
44
+ attr_accessor :http_browser_screen_width
45
+
46
+ # Time difference between UTC time and the cardholder browser local time, in minutes, Example:300
47
+ attr_accessor :http_browser_time_difference
48
+
49
+ # Value of the User-Agent header sent by the customer’s web browser. Note If the customer’s browser provides a value, you must include it in your request.
50
+ attr_accessor :user_agent_browser_value
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'ip_address' => :'ipAddress',
56
+ :'raw_data' => :'rawData',
57
+ :'http_accept_browser_value' => :'httpAcceptBrowserValue',
58
+ :'http_accept_content' => :'httpAcceptContent',
59
+ :'http_browser_language' => :'httpBrowserLanguage',
60
+ :'http_browser_java_enabled' => :'httpBrowserJavaEnabled',
61
+ :'http_browser_java_script_enabled' => :'httpBrowserJavaScriptEnabled',
62
+ :'http_browser_color_depth' => :'httpBrowserColorDepth',
63
+ :'http_browser_screen_height' => :'httpBrowserScreenHeight',
64
+ :'http_browser_screen_width' => :'httpBrowserScreenWidth',
65
+ :'http_browser_time_difference' => :'httpBrowserTimeDifference',
66
+ :'user_agent_browser_value' => :'userAgentBrowserValue'
67
+ }
68
+ end
69
+
70
+ # Attribute type mapping.
71
+ def self.swagger_types
72
+ {
73
+ :'ip_address' => :'String',
74
+ :'raw_data' => :'Array<Riskv1authenticationsDeviceInformationRawData>',
75
+ :'http_accept_browser_value' => :'String',
76
+ :'http_accept_content' => :'String',
77
+ :'http_browser_language' => :'String',
78
+ :'http_browser_java_enabled' => :'BOOLEAN',
79
+ :'http_browser_java_script_enabled' => :'BOOLEAN',
80
+ :'http_browser_color_depth' => :'String',
81
+ :'http_browser_screen_height' => :'String',
82
+ :'http_browser_screen_width' => :'String',
83
+ :'http_browser_time_difference' => :'String',
84
+ :'user_agent_browser_value' => :'String'
85
+ }
86
+ end
87
+
88
+ # Initializes the object
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ def initialize(attributes = {})
91
+ return unless attributes.is_a?(Hash)
92
+
93
+ # convert string to symbol for hash key
94
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
95
+
96
+ if attributes.has_key?(:'ipAddress')
97
+ self.ip_address = attributes[:'ipAddress']
98
+ end
99
+
100
+ if attributes.has_key?(:'rawData')
101
+ if (value = attributes[:'rawData']).is_a?(Array)
102
+ self.raw_data = value
103
+ end
104
+ end
105
+
106
+ if attributes.has_key?(:'httpAcceptBrowserValue')
107
+ self.http_accept_browser_value = attributes[:'httpAcceptBrowserValue']
108
+ end
109
+
110
+ if attributes.has_key?(:'httpAcceptContent')
111
+ self.http_accept_content = attributes[:'httpAcceptContent']
112
+ end
113
+
114
+ if attributes.has_key?(:'httpBrowserLanguage')
115
+ self.http_browser_language = attributes[:'httpBrowserLanguage']
116
+ end
117
+
118
+ if attributes.has_key?(:'httpBrowserJavaEnabled')
119
+ self.http_browser_java_enabled = attributes[:'httpBrowserJavaEnabled']
120
+ end
121
+
122
+ if attributes.has_key?(:'httpBrowserJavaScriptEnabled')
123
+ self.http_browser_java_script_enabled = attributes[:'httpBrowserJavaScriptEnabled']
124
+ end
125
+
126
+ if attributes.has_key?(:'httpBrowserColorDepth')
127
+ self.http_browser_color_depth = attributes[:'httpBrowserColorDepth']
128
+ end
129
+
130
+ if attributes.has_key?(:'httpBrowserScreenHeight')
131
+ self.http_browser_screen_height = attributes[:'httpBrowserScreenHeight']
132
+ end
133
+
134
+ if attributes.has_key?(:'httpBrowserScreenWidth')
135
+ self.http_browser_screen_width = attributes[:'httpBrowserScreenWidth']
136
+ end
137
+
138
+ if attributes.has_key?(:'httpBrowserTimeDifference')
139
+ self.http_browser_time_difference = attributes[:'httpBrowserTimeDifference']
140
+ end
141
+
142
+ if attributes.has_key?(:'userAgentBrowserValue')
143
+ self.user_agent_browser_value = attributes[:'userAgentBrowserValue']
144
+ end
145
+ end
146
+
147
+ # Show invalid properties with the reasons. Usually used together with valid?
148
+ # @return Array for valid properties with the reasons
149
+ def list_invalid_properties
150
+ invalid_properties = Array.new
151
+ if !@ip_address.nil? && @ip_address.to_s.length > 48
152
+ invalid_properties.push('invalid value for "ip_address", the character length must be smaller than or equal to 48.')
153
+ end
154
+
155
+ if !@http_accept_browser_value.nil? && @http_accept_browser_value.to_s.length > 255
156
+ invalid_properties.push('invalid value for "http_accept_browser_value", the character length must be smaller than or equal to 255.')
157
+ end
158
+
159
+ if !@http_accept_content.nil? && @http_accept_content.to_s.length > 256
160
+ invalid_properties.push('invalid value for "http_accept_content", the character length must be smaller than or equal to 256.')
161
+ end
162
+
163
+ if !@http_browser_language.nil? && @http_browser_language.to_s.length > 8
164
+ invalid_properties.push('invalid value for "http_browser_language", the character length must be smaller than or equal to 8.')
165
+ end
166
+
167
+ if !@http_browser_color_depth.nil? && @http_browser_color_depth.to_s.length > 2
168
+ invalid_properties.push('invalid value for "http_browser_color_depth", the character length must be smaller than or equal to 2.')
169
+ end
170
+
171
+ if !@http_browser_screen_height.nil? && @http_browser_screen_height.to_s.length > 6
172
+ invalid_properties.push('invalid value for "http_browser_screen_height", the character length must be smaller than or equal to 6.')
173
+ end
174
+
175
+ if !@http_browser_screen_width.nil? && @http_browser_screen_width.to_s.length > 6
176
+ invalid_properties.push('invalid value for "http_browser_screen_width", the character length must be smaller than or equal to 6.')
177
+ end
178
+
179
+ if !@http_browser_time_difference.nil? && @http_browser_time_difference.to_s.length > 5
180
+ invalid_properties.push('invalid value for "http_browser_time_difference", the character length must be smaller than or equal to 5.')
181
+ end
182
+
183
+ if !@user_agent_browser_value.nil? && @user_agent_browser_value.to_s.length > 255
184
+ invalid_properties.push('invalid value for "user_agent_browser_value", the character length must be smaller than or equal to 255.')
185
+ end
186
+
187
+ invalid_properties
188
+ end
189
+
190
+ # Check to see if the all the properties in the model are valid
191
+ # @return true if the model is valid
192
+ def valid?
193
+ return false if !@ip_address.nil? && @ip_address.to_s.length > 48
194
+ return false if !@http_accept_browser_value.nil? && @http_accept_browser_value.to_s.length > 255
195
+ return false if !@http_accept_content.nil? && @http_accept_content.to_s.length > 256
196
+ return false if !@http_browser_language.nil? && @http_browser_language.to_s.length > 8
197
+ return false if !@http_browser_color_depth.nil? && @http_browser_color_depth.to_s.length > 2
198
+ return false if !@http_browser_screen_height.nil? && @http_browser_screen_height.to_s.length > 6
199
+ return false if !@http_browser_screen_width.nil? && @http_browser_screen_width.to_s.length > 6
200
+ return false if !@http_browser_time_difference.nil? && @http_browser_time_difference.to_s.length > 5
201
+ return false if !@user_agent_browser_value.nil? && @user_agent_browser_value.to_s.length > 255
202
+ true
203
+ end
204
+
205
+ # Custom attribute writer method with validation
206
+ # @param [Object] ip_address Value to be assigned
207
+ def ip_address=(ip_address)
208
+ if !ip_address.nil? && ip_address.to_s.length > 48
209
+ fail ArgumentError, 'invalid value for "ip_address", the character length must be smaller than or equal to 48.'
210
+ end
211
+
212
+ @ip_address = ip_address
213
+ end
214
+
215
+ # Custom attribute writer method with validation
216
+ # @param [Object] http_accept_browser_value Value to be assigned
217
+ def http_accept_browser_value=(http_accept_browser_value)
218
+ if !http_accept_browser_value.nil? && http_accept_browser_value.to_s.length > 255
219
+ fail ArgumentError, 'invalid value for "http_accept_browser_value", the character length must be smaller than or equal to 255.'
220
+ end
221
+
222
+ @http_accept_browser_value = http_accept_browser_value
223
+ end
224
+
225
+ # Custom attribute writer method with validation
226
+ # @param [Object] http_accept_content Value to be assigned
227
+ def http_accept_content=(http_accept_content)
228
+ if !http_accept_content.nil? && http_accept_content.to_s.length > 256
229
+ fail ArgumentError, 'invalid value for "http_accept_content", the character length must be smaller than or equal to 256.'
230
+ end
231
+
232
+ @http_accept_content = http_accept_content
233
+ end
234
+
235
+ # Custom attribute writer method with validation
236
+ # @param [Object] http_browser_language Value to be assigned
237
+ def http_browser_language=(http_browser_language)
238
+ if !http_browser_language.nil? && http_browser_language.to_s.length > 8
239
+ fail ArgumentError, 'invalid value for "http_browser_language", the character length must be smaller than or equal to 8.'
240
+ end
241
+
242
+ @http_browser_language = http_browser_language
243
+ end
244
+
245
+ # Custom attribute writer method with validation
246
+ # @param [Object] http_browser_color_depth Value to be assigned
247
+ def http_browser_color_depth=(http_browser_color_depth)
248
+ if !http_browser_color_depth.nil? && http_browser_color_depth.to_s.length > 2
249
+ fail ArgumentError, 'invalid value for "http_browser_color_depth", the character length must be smaller than or equal to 2.'
250
+ end
251
+
252
+ @http_browser_color_depth = http_browser_color_depth
253
+ end
254
+
255
+ # Custom attribute writer method with validation
256
+ # @param [Object] http_browser_screen_height Value to be assigned
257
+ def http_browser_screen_height=(http_browser_screen_height)
258
+ if !http_browser_screen_height.nil? && http_browser_screen_height.to_s.length > 6
259
+ fail ArgumentError, 'invalid value for "http_browser_screen_height", the character length must be smaller than or equal to 6.'
260
+ end
261
+
262
+ @http_browser_screen_height = http_browser_screen_height
263
+ end
264
+
265
+ # Custom attribute writer method with validation
266
+ # @param [Object] http_browser_screen_width Value to be assigned
267
+ def http_browser_screen_width=(http_browser_screen_width)
268
+ if !http_browser_screen_width.nil? && http_browser_screen_width.to_s.length > 6
269
+ fail ArgumentError, 'invalid value for "http_browser_screen_width", the character length must be smaller than or equal to 6.'
270
+ end
271
+
272
+ @http_browser_screen_width = http_browser_screen_width
273
+ end
274
+
275
+ # Custom attribute writer method with validation
276
+ # @param [Object] http_browser_time_difference Value to be assigned
277
+ def http_browser_time_difference=(http_browser_time_difference)
278
+ if !http_browser_time_difference.nil? && http_browser_time_difference.to_s.length > 5
279
+ fail ArgumentError, 'invalid value for "http_browser_time_difference", the character length must be smaller than or equal to 5.'
280
+ end
281
+
282
+ @http_browser_time_difference = http_browser_time_difference
283
+ end
284
+
285
+ # Custom attribute writer method with validation
286
+ # @param [Object] user_agent_browser_value Value to be assigned
287
+ def user_agent_browser_value=(user_agent_browser_value)
288
+ if !user_agent_browser_value.nil? && user_agent_browser_value.to_s.length > 255
289
+ fail ArgumentError, 'invalid value for "user_agent_browser_value", the character length must be smaller than or equal to 255.'
290
+ end
291
+
292
+ @user_agent_browser_value = user_agent_browser_value
293
+ end
294
+
295
+ # Checks equality by comparing each attribute.
296
+ # @param [Object] Object to be compared
297
+ def ==(o)
298
+ return true if self.equal?(o)
299
+ self.class == o.class &&
300
+ ip_address == o.ip_address &&
301
+ raw_data == o.raw_data &&
302
+ http_accept_browser_value == o.http_accept_browser_value &&
303
+ http_accept_content == o.http_accept_content &&
304
+ http_browser_language == o.http_browser_language &&
305
+ http_browser_java_enabled == o.http_browser_java_enabled &&
306
+ http_browser_java_script_enabled == o.http_browser_java_script_enabled &&
307
+ http_browser_color_depth == o.http_browser_color_depth &&
308
+ http_browser_screen_height == o.http_browser_screen_height &&
309
+ http_browser_screen_width == o.http_browser_screen_width &&
310
+ http_browser_time_difference == o.http_browser_time_difference &&
311
+ user_agent_browser_value == o.user_agent_browser_value
312
+ end
313
+
314
+ # @see the `==` method
315
+ # @param [Object] Object to be compared
316
+ def eql?(o)
317
+ self == o
318
+ end
319
+
320
+ # Calculates hash code according to all attributes.
321
+ # @return [Fixnum] Hash code
322
+ def hash
323
+ [ip_address, raw_data, http_accept_browser_value, http_accept_content, http_browser_language, http_browser_java_enabled, http_browser_java_script_enabled, http_browser_color_depth, http_browser_screen_height, http_browser_screen_width, http_browser_time_difference, user_agent_browser_value].hash
324
+ end
325
+
326
+ # Builds the object from hash
327
+ # @param [Hash] attributes Model attributes in the form of hash
328
+ # @return [Object] Returns the model itself
329
+ def build_from_hash(attributes)
330
+ return nil unless attributes.is_a?(Hash)
331
+ self.class.swagger_types.each_pair do |key, type|
332
+ if type =~ /\AArray<(.*)>/i
333
+ # check to ensure the input is an array given that the the attribute
334
+ # is documented as an array but the input is not
335
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
336
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
337
+ end
338
+ elsif !attributes[self.class.attribute_map[key]].nil?
339
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
340
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
341
+ end
342
+
343
+ self
344
+ end
345
+
346
+ # Deserializes the data based on type
347
+ # @param string type Data type
348
+ # @param string value Value to be deserialized
349
+ # @return [Object] Deserialized data
350
+ def _deserialize(type, value)
351
+ case type.to_sym
352
+ when :DateTime
353
+ DateTime.parse(value)
354
+ when :Date
355
+ Date.parse(value)
356
+ when :String
357
+ value.to_s
358
+ when :Integer
359
+ value.to_i
360
+ when :Float
361
+ value.to_f
362
+ when :BOOLEAN
363
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
364
+ true
365
+ else
366
+ false
367
+ end
368
+ when :Object
369
+ # generic object (usually a Hash), return directly
370
+ value
371
+ when /\AArray<(?<inner_type>.+)>\z/
372
+ inner_type = Regexp.last_match[:inner_type]
373
+ value.map { |v| _deserialize(inner_type, v) }
374
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
375
+ k_type = Regexp.last_match[:k_type]
376
+ v_type = Regexp.last_match[:v_type]
377
+ {}.tap do |hash|
378
+ value.each do |k, v|
379
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
380
+ end
381
+ end
382
+ else # model
383
+ temp_model = CyberSource.const_get(type).new
384
+ temp_model.build_from_hash(value)
385
+ end
386
+ end
387
+
388
+ # Returns the string representation of the object
389
+ # @return [String] String presentation of the object
390
+ def to_s
391
+ to_hash.to_s
392
+ end
393
+
394
+ # to_body is an alias to to_hash (backward compatibility)
395
+ # @return [Hash] Returns the object in the form of hash
396
+ def to_body
397
+ to_hash
398
+ end
399
+
400
+ # Returns the object in the form of hash
401
+ # @return [Hash] Returns the object in the form of hash
402
+ def to_hash
403
+ hash = {}
404
+ self.class.attribute_map.each_pair do |attr, param|
405
+ value = self.send(attr)
406
+ next if value.nil?
407
+ hash[param] = _to_hash(value)
408
+ end
409
+ hash
410
+ end
411
+
412
+ # Outputs non-array value in the form of hash
413
+ # For object, use to_hash. Otherwise, just return the value
414
+ # @param [Object] value Any valid value
415
+ # @return [Hash] Returns the value in the form of hash
416
+ def _to_hash(value)
417
+ if value.is_a?(Array)
418
+ value.compact.map { |v| _to_hash(v) }
419
+ elsif value.is_a?(Hash)
420
+ {}.tap do |hash|
421
+ value.each { |k, v| hash[k] = _to_hash(v) }
422
+ end
423
+ elsif value.respond_to? :to_hash
424
+ value.to_hash
425
+ else
426
+ value
427
+ end
428
+ end
429
+ end
430
+ end
@@ -0,0 +1,209 @@
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CyberSource
16
+ class Riskv1authenticationsDeviceInformationRawData
17
+ # Field that contains the device fingerprint data from the specified provider. The value should be Base64 encoded.
18
+ attr_accessor :data
19
+
20
+ # Possible values: - cardinal - inauth - threatmetrix
21
+ attr_accessor :provider
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'data' => :'data',
27
+ :'provider' => :'provider'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ :'data' => :'String',
35
+ :'provider' => :'String'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+
47
+ if attributes.has_key?(:'data')
48
+ self.data = attributes[:'data']
49
+ end
50
+
51
+ if attributes.has_key?(:'provider')
52
+ self.provider = attributes[:'provider']
53
+ end
54
+ end
55
+
56
+ # Show invalid properties with the reasons. Usually used together with valid?
57
+ # @return Array for valid properties with the reasons
58
+ def list_invalid_properties
59
+ invalid_properties = Array.new
60
+ if !@provider.nil? && @provider.to_s.length > 32
61
+ invalid_properties.push('invalid value for "provider", the character length must be smaller than or equal to 32.')
62
+ end
63
+
64
+ invalid_properties
65
+ end
66
+
67
+ # Check to see if the all the properties in the model are valid
68
+ # @return true if the model is valid
69
+ def valid?
70
+ return false if !@provider.nil? && @provider.to_s.length > 32
71
+ true
72
+ end
73
+
74
+ # Custom attribute writer method with validation
75
+ # @param [Object] provider Value to be assigned
76
+ def provider=(provider)
77
+ if !provider.nil? && provider.to_s.length > 32
78
+ fail ArgumentError, 'invalid value for "provider", the character length must be smaller than or equal to 32.'
79
+ end
80
+
81
+ @provider = provider
82
+ end
83
+
84
+ # Checks equality by comparing each attribute.
85
+ # @param [Object] Object to be compared
86
+ def ==(o)
87
+ return true if self.equal?(o)
88
+ self.class == o.class &&
89
+ data == o.data &&
90
+ provider == o.provider
91
+ end
92
+
93
+ # @see the `==` method
94
+ # @param [Object] Object to be compared
95
+ def eql?(o)
96
+ self == o
97
+ end
98
+
99
+ # Calculates hash code according to all attributes.
100
+ # @return [Fixnum] Hash code
101
+ def hash
102
+ [data, provider].hash
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ self.class.swagger_types.each_pair do |key, type|
111
+ if type =~ /\AArray<(.*)>/i
112
+ # check to ensure the input is an array given that the the attribute
113
+ # is documented as an array but the input is not
114
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
115
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
116
+ end
117
+ elsif !attributes[self.class.attribute_map[key]].nil?
118
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
119
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
120
+ end
121
+
122
+ self
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def _deserialize(type, value)
130
+ case type.to_sym
131
+ when :DateTime
132
+ DateTime.parse(value)
133
+ when :Date
134
+ Date.parse(value)
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :BOOLEAN
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else # model
162
+ temp_model = CyberSource.const_get(type).new
163
+ temp_model.build_from_hash(value)
164
+ end
165
+ end
166
+
167
+ # Returns the string representation of the object
168
+ # @return [String] String presentation of the object
169
+ def to_s
170
+ to_hash.to_s
171
+ end
172
+
173
+ # to_body is an alias to to_hash (backward compatibility)
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_body
176
+ to_hash
177
+ end
178
+
179
+ # Returns the object in the form of hash
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_hash
182
+ hash = {}
183
+ self.class.attribute_map.each_pair do |attr, param|
184
+ value = self.send(attr)
185
+ next if value.nil?
186
+ hash[param] = _to_hash(value)
187
+ end
188
+ hash
189
+ end
190
+
191
+ # Outputs non-array value in the form of hash
192
+ # For object, use to_hash. Otherwise, just return the value
193
+ # @param [Object] value Any valid value
194
+ # @return [Hash] Returns the value in the form of hash
195
+ def _to_hash(value)
196
+ if value.is_a?(Array)
197
+ value.compact.map { |v| _to_hash(v) }
198
+ elsif value.is_a?(Hash)
199
+ {}.tap do |hash|
200
+ value.each { |k, v| hash[k] = _to_hash(v) }
201
+ end
202
+ elsif value.respond_to? :to_hash
203
+ value.to_hash
204
+ else
205
+ value
206
+ end
207
+ end
208
+ end
209
+ end