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,284 @@
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 CheckPayerAuthEnrollmentRequest
17
+ attr_accessor :client_reference_information
18
+
19
+ attr_accessor :order_information
20
+
21
+ attr_accessor :payment_information
22
+
23
+ attr_accessor :buyer_information
24
+
25
+ attr_accessor :device_information
26
+
27
+ attr_accessor :merchant_information
28
+
29
+ attr_accessor :acquirer_information
30
+
31
+ attr_accessor :recurring_payment_information
32
+
33
+ attr_accessor :consumer_authentication_information
34
+
35
+ attr_accessor :risk_information
36
+
37
+ attr_accessor :travel_information
38
+
39
+ attr_accessor :merchant_defined_information
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'client_reference_information' => :'clientReferenceInformation',
45
+ :'order_information' => :'orderInformation',
46
+ :'payment_information' => :'paymentInformation',
47
+ :'buyer_information' => :'buyerInformation',
48
+ :'device_information' => :'deviceInformation',
49
+ :'merchant_information' => :'merchantInformation',
50
+ :'acquirer_information' => :'acquirerInformation',
51
+ :'recurring_payment_information' => :'recurringPaymentInformation',
52
+ :'consumer_authentication_information' => :'consumerAuthenticationInformation',
53
+ :'risk_information' => :'riskInformation',
54
+ :'travel_information' => :'travelInformation',
55
+ :'merchant_defined_information' => :'merchantDefinedInformation'
56
+ }
57
+ end
58
+
59
+ # Attribute type mapping.
60
+ def self.swagger_types
61
+ {
62
+ :'client_reference_information' => :'Riskv1authenticationsClientReferenceInformation',
63
+ :'order_information' => :'Riskv1authenticationsOrderInformation',
64
+ :'payment_information' => :'Riskv1authenticationexemptionsPaymentInformation',
65
+ :'buyer_information' => :'Riskv1authenticationsBuyerInformation',
66
+ :'device_information' => :'Riskv1authenticationsDeviceInformation',
67
+ :'merchant_information' => :'Riskv1authenticationsMerchantInformation',
68
+ :'acquirer_information' => :'Riskv1authenticationsAcquirerInformation',
69
+ :'recurring_payment_information' => :'Riskv1authenticationsRecurringPaymentInformation',
70
+ :'consumer_authentication_information' => :'Riskv1authenticationsConsumerAuthenticationInformation',
71
+ :'risk_information' => :'Riskv1authenticationsRiskInformation',
72
+ :'travel_information' => :'Riskv1authenticationsTravelInformation',
73
+ :'merchant_defined_information' => :'Array<Riskv1decisionsMerchantDefinedInformation>'
74
+ }
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ return unless attributes.is_a?(Hash)
81
+
82
+ # convert string to symbol for hash key
83
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
84
+
85
+ if attributes.has_key?(:'clientReferenceInformation')
86
+ self.client_reference_information = attributes[:'clientReferenceInformation']
87
+ end
88
+
89
+ if attributes.has_key?(:'orderInformation')
90
+ self.order_information = attributes[:'orderInformation']
91
+ end
92
+
93
+ if attributes.has_key?(:'paymentInformation')
94
+ self.payment_information = attributes[:'paymentInformation']
95
+ end
96
+
97
+ if attributes.has_key?(:'buyerInformation')
98
+ self.buyer_information = attributes[:'buyerInformation']
99
+ end
100
+
101
+ if attributes.has_key?(:'deviceInformation')
102
+ self.device_information = attributes[:'deviceInformation']
103
+ end
104
+
105
+ if attributes.has_key?(:'merchantInformation')
106
+ self.merchant_information = attributes[:'merchantInformation']
107
+ end
108
+
109
+ if attributes.has_key?(:'acquirerInformation')
110
+ self.acquirer_information = attributes[:'acquirerInformation']
111
+ end
112
+
113
+ if attributes.has_key?(:'recurringPaymentInformation')
114
+ self.recurring_payment_information = attributes[:'recurringPaymentInformation']
115
+ end
116
+
117
+ if attributes.has_key?(:'consumerAuthenticationInformation')
118
+ self.consumer_authentication_information = attributes[:'consumerAuthenticationInformation']
119
+ end
120
+
121
+ if attributes.has_key?(:'riskInformation')
122
+ self.risk_information = attributes[:'riskInformation']
123
+ end
124
+
125
+ if attributes.has_key?(:'travelInformation')
126
+ self.travel_information = attributes[:'travelInformation']
127
+ end
128
+
129
+ if attributes.has_key?(:'merchantDefinedInformation')
130
+ if (value = attributes[:'merchantDefinedInformation']).is_a?(Array)
131
+ self.merchant_defined_information = value
132
+ end
133
+ end
134
+ end
135
+
136
+ # Show invalid properties with the reasons. Usually used together with valid?
137
+ # @return Array for valid properties with the reasons
138
+ def list_invalid_properties
139
+ invalid_properties = Array.new
140
+ invalid_properties
141
+ end
142
+
143
+ # Check to see if the all the properties in the model are valid
144
+ # @return true if the model is valid
145
+ def valid?
146
+ true
147
+ end
148
+
149
+ # Checks equality by comparing each attribute.
150
+ # @param [Object] Object to be compared
151
+ def ==(o)
152
+ return true if self.equal?(o)
153
+ self.class == o.class &&
154
+ client_reference_information == o.client_reference_information &&
155
+ order_information == o.order_information &&
156
+ payment_information == o.payment_information &&
157
+ buyer_information == o.buyer_information &&
158
+ device_information == o.device_information &&
159
+ merchant_information == o.merchant_information &&
160
+ acquirer_information == o.acquirer_information &&
161
+ recurring_payment_information == o.recurring_payment_information &&
162
+ consumer_authentication_information == o.consumer_authentication_information &&
163
+ risk_information == o.risk_information &&
164
+ travel_information == o.travel_information &&
165
+ merchant_defined_information == o.merchant_defined_information
166
+ end
167
+
168
+ # @see the `==` method
169
+ # @param [Object] Object to be compared
170
+ def eql?(o)
171
+ self == o
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Fixnum] Hash code
176
+ def hash
177
+ [client_reference_information, order_information, payment_information, buyer_information, device_information, merchant_information, acquirer_information, recurring_payment_information, consumer_authentication_information, risk_information, travel_information, merchant_defined_information].hash
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def build_from_hash(attributes)
184
+ return nil unless attributes.is_a?(Hash)
185
+ self.class.swagger_types.each_pair do |key, type|
186
+ if type =~ /\AArray<(.*)>/i
187
+ # check to ensure the input is an array given that the the attribute
188
+ # is documented as an array but the input is not
189
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
190
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
191
+ end
192
+ elsif !attributes[self.class.attribute_map[key]].nil?
193
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
194
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
195
+ end
196
+
197
+ self
198
+ end
199
+
200
+ # Deserializes the data based on type
201
+ # @param string type Data type
202
+ # @param string value Value to be deserialized
203
+ # @return [Object] Deserialized data
204
+ def _deserialize(type, value)
205
+ case type.to_sym
206
+ when :DateTime
207
+ DateTime.parse(value)
208
+ when :Date
209
+ Date.parse(value)
210
+ when :String
211
+ value.to_s
212
+ when :Integer
213
+ value.to_i
214
+ when :Float
215
+ value.to_f
216
+ when :BOOLEAN
217
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
218
+ true
219
+ else
220
+ false
221
+ end
222
+ when :Object
223
+ # generic object (usually a Hash), return directly
224
+ value
225
+ when /\AArray<(?<inner_type>.+)>\z/
226
+ inner_type = Regexp.last_match[:inner_type]
227
+ value.map { |v| _deserialize(inner_type, v) }
228
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
229
+ k_type = Regexp.last_match[:k_type]
230
+ v_type = Regexp.last_match[:v_type]
231
+ {}.tap do |hash|
232
+ value.each do |k, v|
233
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
234
+ end
235
+ end
236
+ else # model
237
+ temp_model = CyberSource.const_get(type).new
238
+ temp_model.build_from_hash(value)
239
+ end
240
+ end
241
+
242
+ # Returns the string representation of the object
243
+ # @return [String] String presentation of the object
244
+ def to_s
245
+ to_hash.to_s
246
+ end
247
+
248
+ # to_body is an alias to to_hash (backward compatibility)
249
+ # @return [Hash] Returns the object in the form of hash
250
+ def to_body
251
+ to_hash
252
+ end
253
+
254
+ # Returns the object in the form of hash
255
+ # @return [Hash] Returns the object in the form of hash
256
+ def to_hash
257
+ hash = {}
258
+ self.class.attribute_map.each_pair do |attr, param|
259
+ value = self.send(attr)
260
+ next if value.nil?
261
+ hash[param] = _to_hash(value)
262
+ end
263
+ hash
264
+ end
265
+
266
+ # Outputs non-array value in the form of hash
267
+ # For object, use to_hash. Otherwise, just return the value
268
+ # @param [Object] value Any valid value
269
+ # @return [Hash] Returns the value in the form of hash
270
+ def _to_hash(value)
271
+ if value.is_a?(Array)
272
+ value.compact.map { |v| _to_hash(v) }
273
+ elsif value.is_a?(Hash)
274
+ {}.tap do |hash|
275
+ value.each { |k, v| hash[k] = _to_hash(v) }
276
+ end
277
+ elsif value.respond_to? :to_hash
278
+ value.to_hash
279
+ else
280
+ value
281
+ end
282
+ end
283
+ end
284
+ end
@@ -14,17 +14,6 @@ require 'date'
14
14
 
15
15
  module CyberSource
16
16
  class CreatePaymentInstrumentRequest
17
- attr_accessor :_links
18
-
19
- # Unique identification number assigned by CyberSource to the submitted request.
20
- attr_accessor :id
21
-
22
- # 'Describes type of token.' Valid values: - paymentInstrument
23
- attr_accessor :object
24
-
25
- # 'Current state of the token.' Valid values: - ACTIVE - CLOSED
26
- attr_accessor :state
27
-
28
17
  attr_accessor :bank_account
29
18
 
30
19
  attr_accessor :card
@@ -44,10 +33,6 @@ module CyberSource
44
33
  # Attribute mapping from ruby-style variable name to JSON key.
45
34
  def self.attribute_map
46
35
  {
47
- :'_links' => :'_links',
48
- :'id' => :'id',
49
- :'object' => :'object',
50
- :'state' => :'state',
51
36
  :'bank_account' => :'bankAccount',
52
37
  :'card' => :'card',
53
38
  :'buyer_information' => :'buyerInformation',
@@ -62,10 +47,6 @@ module CyberSource
62
47
  # Attribute type mapping.
63
48
  def self.swagger_types
64
49
  {
65
- :'_links' => :'TmsV1InstrumentIdentifiersPost200ResponseLinks',
66
- :'id' => :'String',
67
- :'object' => :'String',
68
- :'state' => :'String',
69
50
  :'bank_account' => :'TmsV1InstrumentIdentifiersPaymentInstrumentsGet200ResponseEmbeddedBankAccount',
70
51
  :'card' => :'TmsV1InstrumentIdentifiersPaymentInstrumentsGet200ResponseEmbeddedCard',
71
52
  :'buyer_information' => :'TmsV1InstrumentIdentifiersPaymentInstrumentsGet200ResponseEmbeddedBuyerInformation',
@@ -73,7 +54,7 @@ module CyberSource
73
54
  :'processing_information' => :'TmsV1InstrumentIdentifiersPaymentInstrumentsGet200ResponseEmbeddedProcessingInformation',
74
55
  :'merchant_information' => :'TmsV1InstrumentIdentifiersPaymentInstrumentsGet200ResponseEmbeddedMerchantInformation',
75
56
  :'meta_data' => :'TmsV1InstrumentIdentifiersPost200ResponseMetadata',
76
- :'instrument_identifier' => :'TmsV1InstrumentIdentifiersPaymentInstrumentsGet200ResponseEmbeddedInstrumentIdentifier'
57
+ :'instrument_identifier' => :'Tmsv1paymentinstrumentsInstrumentIdentifier'
77
58
  }
78
59
  end
79
60
 
@@ -85,22 +66,6 @@ module CyberSource
85
66
  # convert string to symbol for hash key
86
67
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
87
68
 
88
- if attributes.has_key?(:'_links')
89
- self._links = attributes[:'_links']
90
- end
91
-
92
- if attributes.has_key?(:'id')
93
- self.id = attributes[:'id']
94
- end
95
-
96
- if attributes.has_key?(:'object')
97
- self.object = attributes[:'object']
98
- end
99
-
100
- if attributes.has_key?(:'state')
101
- self.state = attributes[:'state']
102
- end
103
-
104
69
  if attributes.has_key?(:'bankAccount')
105
70
  self.bank_account = attributes[:'bankAccount']
106
71
  end
@@ -152,10 +117,6 @@ module CyberSource
152
117
  def ==(o)
153
118
  return true if self.equal?(o)
154
119
  self.class == o.class &&
155
- _links == o._links &&
156
- id == o.id &&
157
- object == o.object &&
158
- state == o.state &&
159
120
  bank_account == o.bank_account &&
160
121
  card == o.card &&
161
122
  buyer_information == o.buyer_information &&
@@ -175,7 +136,7 @@ module CyberSource
175
136
  # Calculates hash code according to all attributes.
176
137
  # @return [Fixnum] Hash code
177
138
  def hash
178
- [_links, id, object, state, bank_account, card, buyer_information, bill_to, processing_information, merchant_information, meta_data, instrument_identifier].hash
139
+ [bank_account, card, buyer_information, bill_to, processing_information, merchant_information, meta_data, instrument_identifier].hash
179
140
  end
180
141
 
181
142
  # Builds the object from hash
@@ -25,9 +25,12 @@ module CyberSource
25
25
  # Valid values: - application/xml - text/csv
26
26
  attr_accessor :report_mime_type
27
27
 
28
- # 'The frequency for which subscription is created.' Valid values: - 'DAILY' - 'WEEKLY' - 'MONTHLY' - 'ADHOC'
28
+ # 'The frequency for which subscription is created.' Valid Values: - 'DAILY' - 'WEEKLY' - 'MONTHLY' - 'USER_DEFINED'
29
29
  attr_accessor :report_frequency
30
30
 
31
+ # If the reportFrequency is User-defined, reportInterval should be in **ISO 8601 time format** Please refer the following link to know more about ISO 8601 format.[Rfc Time Format](https://en.wikipedia.org/wiki/ISO_8601#Durations) **Example time format for 2 hours and 30 Mins:** - PT2H30M **NOTE: Do not document reportInterval field in developer center**
32
+ attr_accessor :report_interval
33
+
31
34
  attr_accessor :report_name
32
35
 
33
36
  attr_accessor :timezone
@@ -54,6 +57,7 @@ module CyberSource
54
57
  :'report_fields' => :'reportFields',
55
58
  :'report_mime_type' => :'reportMimeType',
56
59
  :'report_frequency' => :'reportFrequency',
60
+ :'report_interval' => :'reportInterval',
57
61
  :'report_name' => :'reportName',
58
62
  :'timezone' => :'timezone',
59
63
  :'start_time' => :'startTime',
@@ -72,6 +76,7 @@ module CyberSource
72
76
  :'report_fields' => :'Array<String>',
73
77
  :'report_mime_type' => :'String',
74
78
  :'report_frequency' => :'String',
79
+ :'report_interval' => :'String',
75
80
  :'report_name' => :'String',
76
81
  :'timezone' => :'String',
77
82
  :'start_time' => :'String',
@@ -112,6 +117,10 @@ module CyberSource
112
117
  self.report_frequency = attributes[:'reportFrequency']
113
118
  end
114
119
 
120
+ if attributes.has_key?(:'reportInterval')
121
+ self.report_interval = attributes[:'reportInterval']
122
+ end
123
+
115
124
  if attributes.has_key?(:'reportName')
116
125
  self.report_name = attributes[:'reportName']
117
126
  end
@@ -179,6 +188,10 @@ module CyberSource
179
188
  invalid_properties.push('invalid value for "report_frequency", report_frequency cannot be nil.')
180
189
  end
181
190
 
191
+ #if !@report_interval.nil? && @report_interval !~ Regexp.new(/^PT((([1-9]|1[0-9]|2[0-3])H(([1-9]|[1-4][0-9]|5[0-9])M)?)|((([1-9]|1[0-9]|2[0-3])H)?([1-9]|[1-4][0-9]|5[0-9])M))$/)
192
+ #invalid_properties.push('invalid value for "report_interval", must conform to the pattern /^PT((([1-9]|1[0-9]|2[0-3])H(([1-9]|[1-4][0-9]|5[0-9])M)?)|((([1-9]|1[0-9]|2[0-3])H)?([1-9]|[1-4][0-9]|5[0-9])M))$/.')
193
+ #end
194
+
182
195
  if @report_name.nil?
183
196
  invalid_properties.push('invalid value for "report_name", report_name cannot be nil.')
184
197
  end
@@ -229,6 +242,7 @@ module CyberSource
229
242
  return false if @report_fields.nil?
230
243
  return false if @report_mime_type.nil?
231
244
  return false if @report_frequency.nil?
245
+ #return false if !@report_interval.nil? && @report_interval !~ Regexp.new(/^PT((([1-9]|1[0-9]|2[0-3])H(([1-9]|[1-4][0-9]|5[0-9])M)?)|((([1-9]|1[0-9]|2[0-3])H)?([1-9]|[1-4][0-9]|5[0-9])M))$/)
232
246
  return false if @report_name.nil?
233
247
  return false if @report_name.to_s.length > 128
234
248
  return false if @report_name.to_s.length < 1
@@ -273,6 +287,16 @@ module CyberSource
273
287
  @report_definition_name = report_definition_name
274
288
  end
275
289
 
290
+ # Custom attribute writer method with validation
291
+ # @param [Object] report_interval Value to be assigned
292
+ def report_interval=(report_interval)
293
+ #if !report_interval.nil? && report_interval !~ Regexp.new(/^PT((([1-9]|1[0-9]|2[0-3])H(([1-9]|[1-4][0-9]|5[0-9])M)?)|((([1-9]|1[0-9]|2[0-3])H)?([1-9]|[1-4][0-9]|5[0-9])M))$/)
294
+ #fail ArgumentError, 'invalid value for "report_interval", must conform to the pattern /^PT((([1-9]|1[0-9]|2[0-3])H(([1-9]|[1-4][0-9]|5[0-9])M)?)|((([1-9]|1[0-9]|2[0-3])H)?([1-9]|[1-4][0-9]|5[0-9])M))$/.'
295
+ #end
296
+
297
+ @report_interval = report_interval
298
+ end
299
+
276
300
  # Custom attribute writer method with validation
277
301
  # @param [Object] report_name Value to be assigned
278
302
  def report_name=(report_name)
@@ -329,6 +353,7 @@ module CyberSource
329
353
  report_fields == o.report_fields &&
330
354
  report_mime_type == o.report_mime_type &&
331
355
  report_frequency == o.report_frequency &&
356
+ report_interval == o.report_interval &&
332
357
  report_name == o.report_name &&
333
358
  timezone == o.timezone &&
334
359
  start_time == o.start_time &&
@@ -347,7 +372,7 @@ module CyberSource
347
372
  # Calculates hash code according to all attributes.
348
373
  # @return [Fixnum] Hash code
349
374
  def hash
350
- [organization_id, report_definition_name, report_fields, report_mime_type, report_frequency, report_name, timezone, start_time, start_day, report_filters, report_preferences, group_name].hash
375
+ [organization_id, report_definition_name, report_fields, report_mime_type, report_frequency, report_interval, report_name, timezone, start_time, start_day, report_filters, report_preferences, group_name].hash
351
376
  end
352
377
 
353
378
  # Builds the object from hash