cybersource_rest_client 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client.rb +3 -39
  3. data/lib/cybersource_rest_client/api/conversion_details_api.rb +4 -4
  4. data/lib/cybersource_rest_client/api/decision_manager_api.rb +2 -2
  5. data/lib/cybersource_rest_client/api/net_fundings_api.rb +4 -4
  6. data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +4 -4
  7. data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +4 -10
  8. data/lib/cybersource_rest_client/api/report_downloads_api.rb +2 -2
  9. data/lib/cybersource_rest_client/api/reports_api.rb +12 -25
  10. data/lib/cybersource_rest_client/api/secure_file_share_api.rb +4 -4
  11. data/lib/cybersource_rest_client/api/transaction_batches_api.rb +6 -6
  12. data/lib/cybersource_rest_client/models/capture_payment_request.rb +1 -1
  13. data/lib/cybersource_rest_client/models/create_credit_request.rb +1 -1
  14. data/lib/cybersource_rest_client/models/create_payment_instrument_request.rb +2 -48
  15. data/lib/cybersource_rest_client/models/create_payment_request.rb +1 -1
  16. data/lib/cybersource_rest_client/models/create_search_request.rb +2 -2
  17. data/lib/cybersource_rest_client/models/embedded_instrument_identifier.rb +2 -48
  18. data/lib/cybersource_rest_client/models/file_detail.rb +1 -35
  19. data/lib/cybersource_rest_client/models/instrument_identifier.rb +2 -48
  20. data/lib/cybersource_rest_client/models/payment_instrument.rb +2 -48
  21. data/lib/cybersource_rest_client/models/payment_instrument_bank_account.rb +0 -34
  22. data/lib/cybersource_rest_client/models/payment_instrument_card.rb +2 -36
  23. data/lib/cybersource_rest_client/models/payment_instruments_for_instrument_identifier.rb +1 -35
  24. data/lib/cybersource_rest_client/models/personal_identification.rb +1 -35
  25. data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response.rb +0 -34
  26. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response.rb +0 -34
  27. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post400_response.rb +0 -46
  28. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +0 -34
  29. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information.rb +0 -34
  30. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information_details.rb +0 -34
  31. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_issuer_information.rb +1 -1
  32. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_account_features.rb +13 -37
  33. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_bank.rb +1 -1
  34. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +2 -2
  35. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +7 -7
  36. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_avs.rb +15 -0
  37. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_card_verification.rb +1 -1
  38. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_merchant_advice.rb +1 -1
  39. data/lib/cybersource_rest_client/models/pts_v2_payments_post400_response.rb +0 -46
  40. data/lib/cybersource_rest_client/models/pts_v2_payments_post502_response.rb +1 -47
  41. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response.rb +0 -34
  42. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +1 -1
  43. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post400_response.rb +0 -46
  44. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response.rb +0 -34
  45. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb +3 -3
  46. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post400_response.rb +0 -46
  47. data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response.rb +0 -34
  48. data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post400_response.rb +0 -46
  49. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response.rb +0 -34
  50. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_error_information.rb +0 -34
  51. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_order_information_amount_details.rb +1 -1
  52. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information.rb +1 -1
  53. data/lib/cybersource_rest_client/models/pts_v2_payouts_post400_response.rb +0 -34
  54. data/lib/cybersource_rest_client/models/ptsv2credits_processing_information_bank_transfer_options.rb +1 -1
  55. data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information.rb +2 -2
  56. data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb +9 -9
  57. data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information_personal_identification.rb +0 -34
  58. data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb +6 -6
  59. data/lib/cybersource_rest_client/models/ptsv2payments_device_information.rb +5 -5
  60. data/lib/cybersource_rest_client/models/ptsv2payments_issuer_information.rb +1 -1
  61. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_defined_information.rb +1 -1
  62. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb +1 -1
  63. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_initiated_transaction.rb +2 -2
  64. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +3 -3
  65. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_amex_additional_amounts.rb +1 -1
  66. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_surcharge.rb +1 -1
  67. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_tax_details.rb +7 -41
  68. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb +32 -50
  69. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +1 -1
  70. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +4 -4
  71. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank.rb +1 -1
  72. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank_account.rb +1 -1
  73. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +3 -3
  74. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +1 -1
  75. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +4 -26
  76. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_initiator.rb +1 -35
  77. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_bank_transfer_options.rb +2 -2
  78. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_capture_options.rb +1 -1
  79. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_recurring_options.rb +2 -2
  80. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information.rb +2 -2
  81. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb +8 -8
  82. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb +3 -3
  83. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_bill_to.rb +32 -16
  84. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_line_items.rb +3 -3
  85. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information_recurring_options.rb +1 -1
  86. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_reversal_information_amount_details.rb +1 -1
  87. data/lib/cybersource_rest_client/models/ptsv2payouts_order_information_amount_details.rb +1 -1
  88. data/lib/cybersource_rest_client/models/ptsv2payouts_order_information_amount_details_surcharge.rb +1 -1
  89. data/lib/cybersource_rest_client/models/ptsv2payouts_order_information_bill_to.rb +14 -48
  90. data/lib/cybersource_rest_client/models/refund_capture_request.rb +1 -1
  91. data/lib/cybersource_rest_client/models/refund_payment_request.rb +1 -1
  92. data/lib/cybersource_rest_client/models/reporting_v3_net_fundings_get200_response.rb +1 -1
  93. data/lib/cybersource_rest_client/models/reporting_v3_net_fundings_get200_response_net_funding_summaries.rb +1 -34
  94. data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_get200_response_report_definitions.rb +0 -22
  95. data/lib/cybersource_rest_client/models/reporting_v3_report_definitions_name_get200_response.rb +0 -22
  96. data/lib/cybersource_rest_client/models/reporting_v3_report_subscriptions_get200_response_subscriptions.rb +2 -48
  97. data/lib/cybersource_rest_client/models/reporting_v3_reports_get200_response.rb +8 -8
  98. data/lib/cybersource_rest_client/models/{reporting_v3_reports_get200_response_reports.rb → reporting_v3_reports_get200_response_report_search_results.rb} +4 -62
  99. data/lib/cybersource_rest_client/models/reporting_v3_reports_id_get200_response.rb +3 -61
  100. data/lib/cybersource_rest_client/models/reportingv3reports_report_preferences.rb +1 -35
  101. data/lib/cybersource_rest_client/models/request_body.rb +1 -35
  102. data/lib/cybersource_rest_client/models/request_body_1.rb +2 -47
  103. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_risk_information_ip_address.rb +1 -1
  104. data/lib/cybersource_rest_client/models/risk_v1_decisions_post400_response.rb +0 -34
  105. data/lib/cybersource_rest_client/models/riskv1decisions_card_verification.rb +1 -1
  106. data/lib/cybersource_rest_client/models/riskv1decisions_device_information.rb +5 -5
  107. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_amount_details.rb +1 -1
  108. data/lib/cybersource_rest_client/models/riskv1decisions_order_information_bill_to.rb +15 -15
  109. data/lib/cybersource_rest_client/models/riskv1decisions_travel_information_legs.rb +1 -1
  110. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response.rb +1 -35
  111. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded_bank_account.rb +0 -34
  112. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response__embedded_card.rb +2 -36
  113. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_bank_transfer_options.rb +0 -34
  114. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_instrument_identifier.rb +2 -48
  115. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_payment_instruments.rb +2 -48
  116. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_payment_instruments_get200_response_personal_identification.rb +1 -35
  117. data/lib/cybersource_rest_client/models/tms_v1_instrument_identifiers_post200_response.rb +2 -48
  118. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response.rb +2 -2
  119. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_application_information.rb +3 -3
  120. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_consumer_authentication_information.rb +2 -2
  121. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_device_information.rb +5 -5
  122. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_error_information.rb +2 -2
  123. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_fraud_marking_information.rb +1 -1
  124. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details.rb +1 -1
  125. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_bill_to.rb +47 -31
  126. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_line_items.rb +1 -1
  127. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_ship_to.rb +6 -6
  128. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank.rb +5 -5
  129. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank_account.rb +5 -5
  130. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_bank_mandate.rb +3 -3
  131. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_payment_type.rb +23 -34
  132. data/lib/cybersource_rest_client/models/{risk_v1_authentications_post400_response.rb → tss_v2_transactions_get200_response_payment_information_payment_type_funding_source.rb} +37 -38
  133. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb +1 -1
  134. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_bank_transfer_options.rb +1 -1
  135. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb +3 -3
  136. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response.rb +14 -4
  137. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_consumer_authentication_information.rb +1 -1
  138. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_device_information.rb +5 -5
  139. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_order_information_bill_to.rb +5 -5
  140. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_payment_type.rb +9 -9
  141. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_point_of_sale_information.rb +2 -2
  142. data/lib/cybersource_rest_client/models/{riskv1authentications_device_information_raw_data.rb → tss_v2_transactions_post201_response__embedded_point_of_sale_information_partner.rb} +17 -27
  143. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processing_information.rb +1 -1
  144. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_risk_information_providers_fingerprint.rb +3 -3
  145. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_transaction_summaries.rb +2 -2
  146. data/lib/cybersource_rest_client/models/tss_v2_transactions_post400_response.rb +0 -34
  147. data/lib/cybersource_rest_client/models/ums_v1_users_get200_response_account_information.rb +1 -34
  148. data/lib/cybersource_rest_client/models/update_payment_instrument_request.rb +2 -48
  149. data/lib/cybersource_rest_client/models/v1_file_details_get200_response_file_details.rb +1 -35
  150. metadata +5 -43
  151. data/lib/cybersource_rest_client/api/download_dtd_api.rb +0 -88
  152. data/lib/cybersource_rest_client/api/download_xsd_api.rb +0 -88
  153. data/lib/cybersource_rest_client/api/payer_authentication_api.rb +0 -154
  154. data/lib/cybersource_rest_client/models/check_payer_auth_enrollment_request.rb +0 -275
  155. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to_company.rb +0 -349
  156. data/lib/cybersource_rest_client/models/request.rb +0 -210
  157. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response.rb +0 -285
  158. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb +0 -324
  159. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response.rb +0 -294
  160. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_consumer_authentication_information.rb +0 -429
  161. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_order_information.rb +0 -183
  162. data/lib/cybersource_rest_client/models/risk_v1_authentications_post201_response_order_information_amount_details.rb +0 -199
  163. data/lib/cybersource_rest_client/models/riskv1authenticationresults_consumer_authentication_information.rb +0 -214
  164. data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information.rb +0 -194
  165. data/lib/cybersource_rest_client/models/riskv1authenticationresults_order_information_line_items.rb +0 -267
  166. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information.rb +0 -192
  167. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_card.rb +0 -264
  168. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +0 -264
  169. data/lib/cybersource_rest_client/models/riskv1authentications_buyer_information.rb +0 -196
  170. data/lib/cybersource_rest_client/models/riskv1authentications_client_reference_information.rb +0 -208
  171. data/lib/cybersource_rest_client/models/riskv1authentications_consumer_authentication_information.rb +0 -552
  172. data/lib/cybersource_rest_client/models/riskv1authentications_device_information.rb +0 -285
  173. data/lib/cybersource_rest_client/models/riskv1authentications_merchant_information.rb +0 -199
  174. data/lib/cybersource_rest_client/models/riskv1authentications_order_information.rb +0 -258
  175. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_bill_to.rb +0 -496
  176. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_line_items.rb +0 -371
  177. data/lib/cybersource_rest_client/models/riskv1authentications_order_information_ship_to.rb +0 -434
  178. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information.rb +0 -192
  179. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_card.rb +0 -291
  180. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +0 -291
  181. data/lib/cybersource_rest_client/models/riskv1authentications_recurring_payment_information.rb +0 -235
  182. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information.rb +0 -183
  183. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history.rb +0 -262
  184. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history_account_history.rb +0 -209
  185. data/lib/cybersource_rest_client/models/riskv1authentications_risk_information_buyer_history_customer_account.rb +0 -279
  186. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information.rb +0 -206
  187. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information_legs.rb +0 -259
  188. data/lib/cybersource_rest_client/models/riskv1authentications_travel_information_passengers.rb +0 -224
@@ -1,183 +0,0 @@
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 Riskv1authenticationsRiskInformation
17
- attr_accessor :buyer_history
18
-
19
- # Attribute mapping from ruby-style variable name to JSON key.
20
- def self.attribute_map
21
- {
22
- :'buyer_history' => :'buyerHistory'
23
- }
24
- end
25
-
26
- # Attribute type mapping.
27
- def self.swagger_types
28
- {
29
- :'buyer_history' => :'Riskv1authenticationsRiskInformationBuyerHistory'
30
- }
31
- end
32
-
33
- # Initializes the object
34
- # @param [Hash] attributes Model attributes in the form of hash
35
- def initialize(attributes = {})
36
- return unless attributes.is_a?(Hash)
37
-
38
- # convert string to symbol for hash key
39
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
-
41
- if attributes.has_key?(:'buyerHistory')
42
- self.buyer_history = attributes[:'buyerHistory']
43
- end
44
- end
45
-
46
- # Show invalid properties with the reasons. Usually used together with valid?
47
- # @return Array for valid properties with the reasons
48
- def list_invalid_properties
49
- invalid_properties = Array.new
50
- invalid_properties
51
- end
52
-
53
- # Check to see if the all the properties in the model are valid
54
- # @return true if the model is valid
55
- def valid?
56
- true
57
- end
58
-
59
- # Checks equality by comparing each attribute.
60
- # @param [Object] Object to be compared
61
- def ==(o)
62
- return true if self.equal?(o)
63
- self.class == o.class &&
64
- buyer_history == o.buyer_history
65
- end
66
-
67
- # @see the `==` method
68
- # @param [Object] Object to be compared
69
- def eql?(o)
70
- self == o
71
- end
72
-
73
- # Calculates hash code according to all attributes.
74
- # @return [Fixnum] Hash code
75
- def hash
76
- [buyer_history].hash
77
- end
78
-
79
- # Builds the object from hash
80
- # @param [Hash] attributes Model attributes in the form of hash
81
- # @return [Object] Returns the model itself
82
- def build_from_hash(attributes)
83
- return nil unless attributes.is_a?(Hash)
84
- self.class.swagger_types.each_pair do |key, type|
85
- if type =~ /\AArray<(.*)>/i
86
- # check to ensure the input is an array given that the the attribute
87
- # is documented as an array but the input is not
88
- if attributes[self.class.attribute_map[key]].is_a?(Array)
89
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
90
- end
91
- elsif !attributes[self.class.attribute_map[key]].nil?
92
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
93
- end # or else data not found in attributes(hash), not an issue as the data can be optional
94
- end
95
-
96
- self
97
- end
98
-
99
- # Deserializes the data based on type
100
- # @param string type Data type
101
- # @param string value Value to be deserialized
102
- # @return [Object] Deserialized data
103
- def _deserialize(type, value)
104
- case type.to_sym
105
- when :DateTime
106
- DateTime.parse(value)
107
- when :Date
108
- Date.parse(value)
109
- when :String
110
- value.to_s
111
- when :Integer
112
- value.to_i
113
- when :Float
114
- value.to_f
115
- when :BOOLEAN
116
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
117
- true
118
- else
119
- false
120
- end
121
- when :Object
122
- # generic object (usually a Hash), return directly
123
- value
124
- when /\AArray<(?<inner_type>.+)>\z/
125
- inner_type = Regexp.last_match[:inner_type]
126
- value.map { |v| _deserialize(inner_type, v) }
127
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
128
- k_type = Regexp.last_match[:k_type]
129
- v_type = Regexp.last_match[:v_type]
130
- {}.tap do |hash|
131
- value.each do |k, v|
132
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
133
- end
134
- end
135
- else # model
136
- temp_model = CyberSource.const_get(type).new
137
- temp_model.build_from_hash(value)
138
- end
139
- end
140
-
141
- # Returns the string representation of the object
142
- # @return [String] String presentation of the object
143
- def to_s
144
- to_hash.to_s
145
- end
146
-
147
- # to_body is an alias to to_hash (backward compatibility)
148
- # @return [Hash] Returns the object in the form of hash
149
- def to_body
150
- to_hash
151
- end
152
-
153
- # Returns the object in the form of hash
154
- # @return [Hash] Returns the object in the form of hash
155
- def to_hash
156
- hash = {}
157
- self.class.attribute_map.each_pair do |attr, param|
158
- value = self.send(attr)
159
- next if value.nil?
160
- hash[param] = _to_hash(value)
161
- end
162
- hash
163
- end
164
-
165
- # Outputs non-array value in the form of hash
166
- # For object, use to_hash. Otherwise, just return the value
167
- # @param [Object] value Any valid value
168
- # @return [Hash] Returns the value in the form of hash
169
- def _to_hash(value)
170
- if value.is_a?(Array)
171
- value.compact.map { |v| _to_hash(v) }
172
- elsif value.is_a?(Hash)
173
- {}.tap do |hash|
174
- value.each { |k, v| hash[k] = _to_hash(v) }
175
- end
176
- elsif value.respond_to? :to_hash
177
- value.to_hash
178
- else
179
- value
180
- end
181
- end
182
- end
183
- end
@@ -1,262 +0,0 @@
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 Riskv1authenticationsRiskInformationBuyerHistory
17
- attr_accessor :customer_account
18
-
19
- attr_accessor :account_history
20
-
21
- # Number of purchases with this cardholder account during the previous six months. Recommended for Discover ProtectBuy.
22
- attr_accessor :account_purchases
23
-
24
- # Number of add card attempts in the last 24 hours. Recommended for Discover ProtectBuy.
25
- attr_accessor :add_card_attempts
26
-
27
- # Indicates whether the merchant experienced suspicious activity (including previous fraud) on the account. Recommended for Discover ProtectBuy.
28
- attr_accessor :prior_suspicious_activity
29
-
30
- # This only applies for NEW_ACCOUNT and EXISTING_ACCOUNT in creationHistory. Possible values are: - PAYMENT_ACCOUNT_EXISTS - PAYMENT_ACCOUNT_ADDED_NOW
31
- attr_accessor :payment_account_history
32
-
33
- # Date applicable only for PAYMENT_ACCOUNT_EXISTS in paymentAccountHistory
34
- attr_accessor :payment_account_date
35
-
36
- # Number of transaction (successful or abandoned) for this cardholder account within the last 24 hours. Recommended for Discover ProtectBuy.
37
- attr_accessor :transaction_count_day
38
-
39
- # Number of transaction (successful or abandoned) for this cardholder account within the last year. Recommended for Discover ProtectBuy.
40
- attr_accessor :transaction_count_year
41
-
42
- # Attribute mapping from ruby-style variable name to JSON key.
43
- def self.attribute_map
44
- {
45
- :'customer_account' => :'customerAccount',
46
- :'account_history' => :'accountHistory',
47
- :'account_purchases' => :'accountPurchases',
48
- :'add_card_attempts' => :'addCardAttempts',
49
- :'prior_suspicious_activity' => :'priorSuspiciousActivity',
50
- :'payment_account_history' => :'paymentAccountHistory',
51
- :'payment_account_date' => :'paymentAccountDate',
52
- :'transaction_count_day' => :'transactionCountDay',
53
- :'transaction_count_year' => :'transactionCountYear'
54
- }
55
- end
56
-
57
- # Attribute type mapping.
58
- def self.swagger_types
59
- {
60
- :'customer_account' => :'Riskv1authenticationsRiskInformationBuyerHistoryCustomerAccount',
61
- :'account_history' => :'Riskv1authenticationsRiskInformationBuyerHistoryAccountHistory',
62
- :'account_purchases' => :'Integer',
63
- :'add_card_attempts' => :'Integer',
64
- :'prior_suspicious_activity' => :'BOOLEAN',
65
- :'payment_account_history' => :'String',
66
- :'payment_account_date' => :'Integer',
67
- :'transaction_count_day' => :'Integer',
68
- :'transaction_count_year' => :'Integer'
69
- }
70
- end
71
-
72
- # Initializes the object
73
- # @param [Hash] attributes Model attributes in the form of hash
74
- def initialize(attributes = {})
75
- return unless attributes.is_a?(Hash)
76
-
77
- # convert string to symbol for hash key
78
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
79
-
80
- if attributes.has_key?(:'customerAccount')
81
- self.customer_account = attributes[:'customerAccount']
82
- end
83
-
84
- if attributes.has_key?(:'accountHistory')
85
- self.account_history = attributes[:'accountHistory']
86
- end
87
-
88
- if attributes.has_key?(:'accountPurchases')
89
- self.account_purchases = attributes[:'accountPurchases']
90
- end
91
-
92
- if attributes.has_key?(:'addCardAttempts')
93
- self.add_card_attempts = attributes[:'addCardAttempts']
94
- end
95
-
96
- if attributes.has_key?(:'priorSuspiciousActivity')
97
- self.prior_suspicious_activity = attributes[:'priorSuspiciousActivity']
98
- end
99
-
100
- if attributes.has_key?(:'paymentAccountHistory')
101
- self.payment_account_history = attributes[:'paymentAccountHistory']
102
- end
103
-
104
- if attributes.has_key?(:'paymentAccountDate')
105
- self.payment_account_date = attributes[:'paymentAccountDate']
106
- end
107
-
108
- if attributes.has_key?(:'transactionCountDay')
109
- self.transaction_count_day = attributes[:'transactionCountDay']
110
- end
111
-
112
- if attributes.has_key?(:'transactionCountYear')
113
- self.transaction_count_year = attributes[:'transactionCountYear']
114
- end
115
- end
116
-
117
- # Show invalid properties with the reasons. Usually used together with valid?
118
- # @return Array for valid properties with the reasons
119
- def list_invalid_properties
120
- invalid_properties = Array.new
121
- invalid_properties
122
- end
123
-
124
- # Check to see if the all the properties in the model are valid
125
- # @return true if the model is valid
126
- def valid?
127
- true
128
- end
129
-
130
- # Checks equality by comparing each attribute.
131
- # @param [Object] Object to be compared
132
- def ==(o)
133
- return true if self.equal?(o)
134
- self.class == o.class &&
135
- customer_account == o.customer_account &&
136
- account_history == o.account_history &&
137
- account_purchases == o.account_purchases &&
138
- add_card_attempts == o.add_card_attempts &&
139
- prior_suspicious_activity == o.prior_suspicious_activity &&
140
- payment_account_history == o.payment_account_history &&
141
- payment_account_date == o.payment_account_date &&
142
- transaction_count_day == o.transaction_count_day &&
143
- transaction_count_year == o.transaction_count_year
144
- end
145
-
146
- # @see the `==` method
147
- # @param [Object] Object to be compared
148
- def eql?(o)
149
- self == o
150
- end
151
-
152
- # Calculates hash code according to all attributes.
153
- # @return [Fixnum] Hash code
154
- def hash
155
- [customer_account, account_history, account_purchases, add_card_attempts, prior_suspicious_activity, payment_account_history, payment_account_date, transaction_count_day, transaction_count_year].hash
156
- end
157
-
158
- # Builds the object from hash
159
- # @param [Hash] attributes Model attributes in the form of hash
160
- # @return [Object] Returns the model itself
161
- def build_from_hash(attributes)
162
- return nil unless attributes.is_a?(Hash)
163
- self.class.swagger_types.each_pair do |key, type|
164
- if type =~ /\AArray<(.*)>/i
165
- # check to ensure the input is an array given that the the attribute
166
- # is documented as an array but the input is not
167
- if attributes[self.class.attribute_map[key]].is_a?(Array)
168
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
169
- end
170
- elsif !attributes[self.class.attribute_map[key]].nil?
171
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
172
- end # or else data not found in attributes(hash), not an issue as the data can be optional
173
- end
174
-
175
- self
176
- end
177
-
178
- # Deserializes the data based on type
179
- # @param string type Data type
180
- # @param string value Value to be deserialized
181
- # @return [Object] Deserialized data
182
- def _deserialize(type, value)
183
- case type.to_sym
184
- when :DateTime
185
- DateTime.parse(value)
186
- when :Date
187
- Date.parse(value)
188
- when :String
189
- value.to_s
190
- when :Integer
191
- value.to_i
192
- when :Float
193
- value.to_f
194
- when :BOOLEAN
195
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
196
- true
197
- else
198
- false
199
- end
200
- when :Object
201
- # generic object (usually a Hash), return directly
202
- value
203
- when /\AArray<(?<inner_type>.+)>\z/
204
- inner_type = Regexp.last_match[:inner_type]
205
- value.map { |v| _deserialize(inner_type, v) }
206
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
207
- k_type = Regexp.last_match[:k_type]
208
- v_type = Regexp.last_match[:v_type]
209
- {}.tap do |hash|
210
- value.each do |k, v|
211
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
212
- end
213
- end
214
- else # model
215
- temp_model = CyberSource.const_get(type).new
216
- temp_model.build_from_hash(value)
217
- end
218
- end
219
-
220
- # Returns the string representation of the object
221
- # @return [String] String presentation of the object
222
- def to_s
223
- to_hash.to_s
224
- end
225
-
226
- # to_body is an alias to to_hash (backward compatibility)
227
- # @return [Hash] Returns the object in the form of hash
228
- def to_body
229
- to_hash
230
- end
231
-
232
- # Returns the object in the form of hash
233
- # @return [Hash] Returns the object in the form of hash
234
- def to_hash
235
- hash = {}
236
- self.class.attribute_map.each_pair do |attr, param|
237
- value = self.send(attr)
238
- next if value.nil?
239
- hash[param] = _to_hash(value)
240
- end
241
- hash
242
- end
243
-
244
- # Outputs non-array value in the form of hash
245
- # For object, use to_hash. Otherwise, just return the value
246
- # @param [Object] value Any valid value
247
- # @return [Hash] Returns the value in the form of hash
248
- def _to_hash(value)
249
- if value.is_a?(Array)
250
- value.compact.map { |v| _to_hash(v) }
251
- elsif value.is_a?(Hash)
252
- {}.tap do |hash|
253
- value.each { |k, v| hash[k] = _to_hash(v) }
254
- end
255
- elsif value.respond_to? :to_hash
256
- value.to_hash
257
- else
258
- value
259
- end
260
- end
261
- end
262
- end
@@ -1,209 +0,0 @@
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 Riskv1authenticationsRiskInformationBuyerHistoryAccountHistory
17
- # Applicable when this is not a guest account.
18
- attr_accessor :first_use_of_shipping_address
19
-
20
- # Date when the shipping address for this transaction was first used. Recommended for Discover ProtectBuy. If `firstUseOfShippingAddress` is false and not a guest account, then this date is entered.
21
- attr_accessor :shipping_address_usage_date
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'first_use_of_shipping_address' => :'firstUseOfShippingAddress',
27
- :'shipping_address_usage_date' => :'shippingAddressUsageDate'
28
- }
29
- end
30
-
31
- # Attribute type mapping.
32
- def self.swagger_types
33
- {
34
- :'first_use_of_shipping_address' => :'BOOLEAN',
35
- :'shipping_address_usage_date' => :'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?(:'firstUseOfShippingAddress')
48
- self.first_use_of_shipping_address = attributes[:'firstUseOfShippingAddress']
49
- end
50
-
51
- if attributes.has_key?(:'shippingAddressUsageDate')
52
- self.shipping_address_usage_date = attributes[:'shippingAddressUsageDate']
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 !@shipping_address_usage_date.nil? && @shipping_address_usage_date.to_s.length > 10
61
- invalid_properties.push('invalid value for "shipping_address_usage_date", the character length must be smaller than or equal to 10.')
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 !@shipping_address_usage_date.nil? && @shipping_address_usage_date.to_s.length > 10
71
- true
72
- end
73
-
74
- # Custom attribute writer method with validation
75
- # @param [Object] shipping_address_usage_date Value to be assigned
76
- def shipping_address_usage_date=(shipping_address_usage_date)
77
- if !shipping_address_usage_date.nil? && shipping_address_usage_date.to_s.length > 10
78
- fail ArgumentError, 'invalid value for "shipping_address_usage_date", the character length must be smaller than or equal to 10.'
79
- end
80
-
81
- @shipping_address_usage_date = shipping_address_usage_date
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
- first_use_of_shipping_address == o.first_use_of_shipping_address &&
90
- shipping_address_usage_date == o.shipping_address_usage_date
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
- [first_use_of_shipping_address, shipping_address_usage_date].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