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,210 +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 Request
17
- attr_accessor :client_reference_information
18
-
19
- attr_accessor :order_information
20
-
21
- attr_accessor :payment_information
22
-
23
- attr_accessor :consumer_authentication_information
24
-
25
- # Attribute mapping from ruby-style variable name to JSON key.
26
- def self.attribute_map
27
- {
28
- :'client_reference_information' => :'clientReferenceInformation',
29
- :'order_information' => :'orderInformation',
30
- :'payment_information' => :'paymentInformation',
31
- :'consumer_authentication_information' => :'consumerAuthenticationInformation'
32
- }
33
- end
34
-
35
- # Attribute type mapping.
36
- def self.swagger_types
37
- {
38
- :'client_reference_information' => :'Riskv1authenticationsClientReferenceInformation',
39
- :'order_information' => :'Riskv1authenticationresultsOrderInformation',
40
- :'payment_information' => :'Riskv1authenticationresultsPaymentInformation',
41
- :'consumer_authentication_information' => :'Riskv1authenticationresultsConsumerAuthenticationInformation'
42
- }
43
- end
44
-
45
- # Initializes the object
46
- # @param [Hash] attributes Model attributes in the form of hash
47
- def initialize(attributes = {})
48
- return unless attributes.is_a?(Hash)
49
-
50
- # convert string to symbol for hash key
51
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
-
53
- if attributes.has_key?(:'clientReferenceInformation')
54
- self.client_reference_information = attributes[:'clientReferenceInformation']
55
- end
56
-
57
- if attributes.has_key?(:'orderInformation')
58
- self.order_information = attributes[:'orderInformation']
59
- end
60
-
61
- if attributes.has_key?(:'paymentInformation')
62
- self.payment_information = attributes[:'paymentInformation']
63
- end
64
-
65
- if attributes.has_key?(:'consumerAuthenticationInformation')
66
- self.consumer_authentication_information = attributes[:'consumerAuthenticationInformation']
67
- end
68
- end
69
-
70
- # Show invalid properties with the reasons. Usually used together with valid?
71
- # @return Array for valid properties with the reasons
72
- def list_invalid_properties
73
- invalid_properties = Array.new
74
- invalid_properties
75
- end
76
-
77
- # Check to see if the all the properties in the model are valid
78
- # @return true if the model is valid
79
- def valid?
80
- true
81
- end
82
-
83
- # Checks equality by comparing each attribute.
84
- # @param [Object] Object to be compared
85
- def ==(o)
86
- return true if self.equal?(o)
87
- self.class == o.class &&
88
- client_reference_information == o.client_reference_information &&
89
- order_information == o.order_information &&
90
- payment_information == o.payment_information &&
91
- consumer_authentication_information == o.consumer_authentication_information
92
- end
93
-
94
- # @see the `==` method
95
- # @param [Object] Object to be compared
96
- def eql?(o)
97
- self == o
98
- end
99
-
100
- # Calculates hash code according to all attributes.
101
- # @return [Fixnum] Hash code
102
- def hash
103
- [client_reference_information, order_information, payment_information, consumer_authentication_information].hash
104
- end
105
-
106
- # Builds the object from hash
107
- # @param [Hash] attributes Model attributes in the form of hash
108
- # @return [Object] Returns the model itself
109
- def build_from_hash(attributes)
110
- return nil unless attributes.is_a?(Hash)
111
- self.class.swagger_types.each_pair do |key, type|
112
- if type =~ /\AArray<(.*)>/i
113
- # check to ensure the input is an array given that the the attribute
114
- # is documented as an array but the input is not
115
- if attributes[self.class.attribute_map[key]].is_a?(Array)
116
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
- end
118
- elsif !attributes[self.class.attribute_map[key]].nil?
119
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
- end # or else data not found in attributes(hash), not an issue as the data can be optional
121
- end
122
-
123
- self
124
- end
125
-
126
- # Deserializes the data based on type
127
- # @param string type Data type
128
- # @param string value Value to be deserialized
129
- # @return [Object] Deserialized data
130
- def _deserialize(type, value)
131
- case type.to_sym
132
- when :DateTime
133
- DateTime.parse(value)
134
- when :Date
135
- Date.parse(value)
136
- when :String
137
- value.to_s
138
- when :Integer
139
- value.to_i
140
- when :Float
141
- value.to_f
142
- when :BOOLEAN
143
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
- true
145
- else
146
- false
147
- end
148
- when :Object
149
- # generic object (usually a Hash), return directly
150
- value
151
- when /\AArray<(?<inner_type>.+)>\z/
152
- inner_type = Regexp.last_match[:inner_type]
153
- value.map { |v| _deserialize(inner_type, v) }
154
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
- k_type = Regexp.last_match[:k_type]
156
- v_type = Regexp.last_match[:v_type]
157
- {}.tap do |hash|
158
- value.each do |k, v|
159
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
- end
161
- end
162
- else # model
163
- temp_model = CyberSource.const_get(type).new
164
- temp_model.build_from_hash(value)
165
- end
166
- end
167
-
168
- # Returns the string representation of the object
169
- # @return [String] String presentation of the object
170
- def to_s
171
- to_hash.to_s
172
- end
173
-
174
- # to_body is an alias to to_hash (backward compatibility)
175
- # @return [Hash] Returns the object in the form of hash
176
- def to_body
177
- to_hash
178
- end
179
-
180
- # Returns the object in the form of hash
181
- # @return [Hash] Returns the object in the form of hash
182
- def to_hash
183
- hash = {}
184
- self.class.attribute_map.each_pair do |attr, param|
185
- value = self.send(attr)
186
- next if value.nil?
187
- hash[param] = _to_hash(value)
188
- end
189
- hash
190
- end
191
-
192
- # Outputs non-array value in the form of hash
193
- # For object, use to_hash. Otherwise, just return the value
194
- # @param [Object] value Any valid value
195
- # @return [Hash] Returns the value in the form of hash
196
- def _to_hash(value)
197
- if value.is_a?(Array)
198
- value.compact.map { |v| _to_hash(v) }
199
- elsif value.is_a?(Hash)
200
- {}.tap do |hash|
201
- value.each { |k, v| hash[k] = _to_hash(v) }
202
- end
203
- elsif value.respond_to? :to_hash
204
- value.to_hash
205
- else
206
- value
207
- end
208
- end
209
- end
210
- end
@@ -1,285 +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 RiskV1AuthenticationResultsPost201Response
17
- attr_accessor :_links
18
-
19
- # An unique identification number assigned by CyberSource to identify the submitted request. It is also appended to the endpoint of the resource.
20
- attr_accessor :id
21
-
22
- # Time of request in UTC. Format: `YYYY-MM-DDThh:mm:ssZ` Example `2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The `T` separates the date and the time. The `Z` indicates UTC.
23
- attr_accessor :submit_time_utc
24
-
25
- # Time that the transaction was submitted in local time.
26
- attr_accessor :submit_time_local
27
-
28
- # The status for payerAuthentication 201 enroll and validate calls. Possible values are: - AUTHENTICATION_SUCCESSFUL - PENDING_AUTHENTICATION
29
- attr_accessor :status
30
-
31
- # The reason of the status. Possible values are: - Authentication_Completed_Or_Skipped_Sucessfully - Pending_Authentication
32
- attr_accessor :reason
33
-
34
- # The message describing the reason of the status. Value is: - The cardholder is enrolled in Payer Authentication. Please authenticate the cardholder before continuing with the transaction.
35
- attr_accessor :message
36
-
37
- attr_accessor :client_reference_information
38
-
39
- attr_accessor :consumer_authentication_information
40
-
41
- attr_accessor :error_information
42
-
43
- # Attribute mapping from ruby-style variable name to JSON key.
44
- def self.attribute_map
45
- {
46
- :'_links' => :'_links',
47
- :'id' => :'id',
48
- :'submit_time_utc' => :'submitTimeUtc',
49
- :'submit_time_local' => :'submitTimeLocal',
50
- :'status' => :'status',
51
- :'reason' => :'reason',
52
- :'message' => :'message',
53
- :'client_reference_information' => :'clientReferenceInformation',
54
- :'consumer_authentication_information' => :'consumerAuthenticationInformation',
55
- :'error_information' => :'errorInformation'
56
- }
57
- end
58
-
59
- # Attribute type mapping.
60
- def self.swagger_types
61
- {
62
- :'_links' => :'PtsV2PaymentsReversalsPost201ResponseLinks',
63
- :'id' => :'String',
64
- :'submit_time_utc' => :'String',
65
- :'submit_time_local' => :'String',
66
- :'status' => :'String',
67
- :'reason' => :'String',
68
- :'message' => :'String',
69
- :'client_reference_information' => :'Ptsv2payoutsClientReferenceInformation',
70
- :'consumer_authentication_information' => :'RiskV1AuthenticationResultsPost201ResponseConsumerAuthenticationInformation',
71
- :'error_information' => :'PtsV2PaymentsPost201ResponseErrorInformation'
72
- }
73
- end
74
-
75
- # Initializes the object
76
- # @param [Hash] attributes Model attributes in the form of hash
77
- def initialize(attributes = {})
78
- return unless attributes.is_a?(Hash)
79
-
80
- # convert string to symbol for hash key
81
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
82
-
83
- if attributes.has_key?(:'_links')
84
- self._links = attributes[:'_links']
85
- end
86
-
87
- if attributes.has_key?(:'id')
88
- self.id = attributes[:'id']
89
- end
90
-
91
- if attributes.has_key?(:'submitTimeUtc')
92
- self.submit_time_utc = attributes[:'submitTimeUtc']
93
- end
94
-
95
- if attributes.has_key?(:'submitTimeLocal')
96
- self.submit_time_local = attributes[:'submitTimeLocal']
97
- end
98
-
99
- if attributes.has_key?(:'status')
100
- self.status = attributes[:'status']
101
- end
102
-
103
- if attributes.has_key?(:'reason')
104
- self.reason = attributes[:'reason']
105
- end
106
-
107
- if attributes.has_key?(:'message')
108
- self.message = attributes[:'message']
109
- end
110
-
111
- if attributes.has_key?(:'clientReferenceInformation')
112
- self.client_reference_information = attributes[:'clientReferenceInformation']
113
- end
114
-
115
- if attributes.has_key?(:'consumerAuthenticationInformation')
116
- self.consumer_authentication_information = attributes[:'consumerAuthenticationInformation']
117
- end
118
-
119
- if attributes.has_key?(:'errorInformation')
120
- self.error_information = attributes[:'errorInformation']
121
- end
122
- end
123
-
124
- # Show invalid properties with the reasons. Usually used together with valid?
125
- # @return Array for valid properties with the reasons
126
- def list_invalid_properties
127
- invalid_properties = Array.new
128
- if !@id.nil? && @id.to_s.length > 26
129
- invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.')
130
- end
131
-
132
- invalid_properties
133
- end
134
-
135
- # Check to see if the all the properties in the model are valid
136
- # @return true if the model is valid
137
- def valid?
138
- return false if !@id.nil? && @id.to_s.length > 26
139
- true
140
- end
141
-
142
- # Custom attribute writer method with validation
143
- # @param [Object] id Value to be assigned
144
- def id=(id)
145
- if !id.nil? && id.to_s.length > 26
146
- fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.'
147
- end
148
-
149
- @id = id
150
- end
151
-
152
- # Checks equality by comparing each attribute.
153
- # @param [Object] Object to be compared
154
- def ==(o)
155
- return true if self.equal?(o)
156
- self.class == o.class &&
157
- _links == o._links &&
158
- id == o.id &&
159
- submit_time_utc == o.submit_time_utc &&
160
- submit_time_local == o.submit_time_local &&
161
- status == o.status &&
162
- reason == o.reason &&
163
- message == o.message &&
164
- client_reference_information == o.client_reference_information &&
165
- consumer_authentication_information == o.consumer_authentication_information &&
166
- error_information == o.error_information
167
- end
168
-
169
- # @see the `==` method
170
- # @param [Object] Object to be compared
171
- def eql?(o)
172
- self == o
173
- end
174
-
175
- # Calculates hash code according to all attributes.
176
- # @return [Fixnum] Hash code
177
- def hash
178
- [_links, id, submit_time_utc, submit_time_local, status, reason, message, client_reference_information, consumer_authentication_information, error_information].hash
179
- end
180
-
181
- # Builds the object from hash
182
- # @param [Hash] attributes Model attributes in the form of hash
183
- # @return [Object] Returns the model itself
184
- def build_from_hash(attributes)
185
- return nil unless attributes.is_a?(Hash)
186
- self.class.swagger_types.each_pair do |key, type|
187
- if type =~ /\AArray<(.*)>/i
188
- # check to ensure the input is an array given that the the attribute
189
- # is documented as an array but the input is not
190
- if attributes[self.class.attribute_map[key]].is_a?(Array)
191
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
192
- end
193
- elsif !attributes[self.class.attribute_map[key]].nil?
194
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
195
- end # or else data not found in attributes(hash), not an issue as the data can be optional
196
- end
197
-
198
- self
199
- end
200
-
201
- # Deserializes the data based on type
202
- # @param string type Data type
203
- # @param string value Value to be deserialized
204
- # @return [Object] Deserialized data
205
- def _deserialize(type, value)
206
- case type.to_sym
207
- when :DateTime
208
- DateTime.parse(value)
209
- when :Date
210
- Date.parse(value)
211
- when :String
212
- value.to_s
213
- when :Integer
214
- value.to_i
215
- when :Float
216
- value.to_f
217
- when :BOOLEAN
218
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
219
- true
220
- else
221
- false
222
- end
223
- when :Object
224
- # generic object (usually a Hash), return directly
225
- value
226
- when /\AArray<(?<inner_type>.+)>\z/
227
- inner_type = Regexp.last_match[:inner_type]
228
- value.map { |v| _deserialize(inner_type, v) }
229
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
230
- k_type = Regexp.last_match[:k_type]
231
- v_type = Regexp.last_match[:v_type]
232
- {}.tap do |hash|
233
- value.each do |k, v|
234
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
235
- end
236
- end
237
- else # model
238
- temp_model = CyberSource.const_get(type).new
239
- temp_model.build_from_hash(value)
240
- end
241
- end
242
-
243
- # Returns the string representation of the object
244
- # @return [String] String presentation of the object
245
- def to_s
246
- to_hash.to_s
247
- end
248
-
249
- # to_body is an alias to to_hash (backward compatibility)
250
- # @return [Hash] Returns the object in the form of hash
251
- def to_body
252
- to_hash
253
- end
254
-
255
- # Returns the object in the form of hash
256
- # @return [Hash] Returns the object in the form of hash
257
- def to_hash
258
- hash = {}
259
- self.class.attribute_map.each_pair do |attr, param|
260
- value = self.send(attr)
261
- next if value.nil?
262
- hash[param] = _to_hash(value)
263
- end
264
- hash
265
- end
266
-
267
- # Outputs non-array value in the form of hash
268
- # For object, use to_hash. Otherwise, just return the value
269
- # @param [Object] value Any valid value
270
- # @return [Hash] Returns the value in the form of hash
271
- def _to_hash(value)
272
- if value.is_a?(Array)
273
- value.compact.map { |v| _to_hash(v) }
274
- elsif value.is_a?(Hash)
275
- {}.tap do |hash|
276
- value.each { |k, v| hash[k] = _to_hash(v) }
277
- end
278
- elsif value.respond_to? :to_hash
279
- value.to_hash
280
- else
281
- value
282
- end
283
- end
284
- end
285
- end