cybersource_rest_client 0.0.41 → 0.0.44

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client/api/secure_file_share_api.rb +206 -206
  3. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +10 -1
  4. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information.rb +1 -1
  5. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_issuer_information.rb +20 -4
  6. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_insights_information.rb +183 -0
  7. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_insights_information_response_insights.rb +206 -0
  8. data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb +2 -2
  9. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +20 -4
  10. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +22 -6
  11. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information_emv.rb +2 -8
  12. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +14 -4
  13. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options_initiator.rb +2 -2
  14. data/lib/cybersource_rest_client/models/ptsv2paymentsid_processing_information_authorization_options_initiator.rb +2 -2
  15. data/lib/cybersource_rest_client/models/reporting_v3_chargeback_details_get200_response_chargeback_details.rb +14 -4
  16. data/lib/cybersource_rest_client/models/risk_v1_authentication_results_post201_response_consumer_authentication_information.rb +49 -1
  17. data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_consumer_authentication_information.rb +44 -2
  18. data/lib/cybersource_rest_client/models/riskv1authenticationresults_consumer_authentication_information.rb +35 -3
  19. data/lib/cybersource_rest_client/models/{tss_v2_transactions_post201_response__embedded_device_information.rb → riskv1authenticationresults_device_information.rb} +1 -1
  20. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +1 -1
  21. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +61 -2
  22. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_tokenized_card.rb +1 -1
  23. data/lib/cybersource_rest_client/models/riskv1decisions_consumer_authentication_information.rb +13 -3
  24. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +1 -1
  25. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response.rb +10 -1
  26. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_customer.rb +1 -7
  27. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_authorization_options.rb +1 -1
  28. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_authorization_options_initiator.rb +213 -0
  29. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information.rb +14 -5
  30. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_bank.rb +183 -0
  31. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_bank_account.rb +194 -0
  32. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_customer.rb +184 -0
  33. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_transaction_summaries.rb +1 -1
  34. data/lib/cybersource_rest_client/models/validate_request.rb +13 -4
  35. data/lib/cybersource_rest_client.rb +7 -1
  36. metadata +9 -3
@@ -16,7 +16,7 @@ module CyberSource
16
16
  class Riskv1decisionsConsumerAuthenticationInformation
17
17
  attr_accessor :strong_authentication
18
18
 
19
- # Indicates the type of authentication that will be used to challenge the card holder. Possible Values: 01 - Static 02 - Dynamic 03 - OOB (Out of Band) 04 - Decoupled **NOTE**: EMV 3-D Secure version 2.1.0 supports values 01-03. Version 2.2.0 supports values 01-04. Decoupled authentication is not supported at this time.
19
+ # Indicates the type of authentication that will be used to challenge the card holder. Possible Values: 01 - Static 02 - Dynamic 03 - OOB (Out of Band) 04 - Decoupled 20 - OTP hosted at merchant end. (Rupay S2S flow) **NOTE**: EMV 3-D Secure version 2.1.0 supports values 01-03. Version 2.2.0 supports values 01-04. Decoupled authentication is not supported at this time.
20
20
  attr_accessor :authentication_type
21
21
 
22
22
  # An override field that a merchant can pass in to set the challenge window size to display to the end cardholder. The ACS (Active Control Server) will reply with content that is formatted appropriately to this window size to allow for the best user experience. The sizes are width x height in pixels of the window displayed in the cardholder browser window. 01 - 250x400 02 - 390x400 03 - 500x600 04 - 600x400 05 - Full page
@@ -34,9 +34,12 @@ module CyberSource
34
34
  # The date/time of the authentication at the 3DS servers. RISK update authorization service in auth request payload with value returned in `consumerAuthenticationInformation.alternateAuthenticationData` if merchant calls via CYBS or field can be provided by merchant in authorization request if calling an external 3DS provider. This field is supported for Cartes Bancaires Fast'R transactions on Credit Mutuel-CIC. Format: YYYYMMDDHHMMSS
35
35
  attr_accessor :authentication_date
36
36
 
37
- # Payer authentication transaction identifier passed to link the check enrollment and validate authentication messages. **Note**: Required for Standard integration for enroll service. Required for Hybrid integration for validate service.
37
+ # Payer authentication transaction identifier passed to link the check enrollment and validate authentication messages.For Rupay,this is passed only in Re-Send OTP usecase. **Note**: Required for Standard integration, Rupay Seamless server to server integration for enroll service. Required for Hybrid integration for validate service.
38
38
  attr_accessor :authentication_transaction_id
39
39
 
40
+ # This field is only applicable to Rupay and is optional. Merchant will have to pass a valid value from 01 through 07 which indicates the transaction flow. Below are the possible values. 01:NW – Transaction performed at domestic merchant. 02:TW - Transaction performed at domestic merchant along with Token provisioning. 03:IT – Transaction performed at International merchant. 04:AT- Authentication Transaction Only. 05:AW- Authentication transaction for provisioning. 06:DI- Domestic InApp Transaction. 07:II- International InApp transaction.
41
+ attr_accessor :transaction_flow_indicator
42
+
40
43
  # An indicator as to why the transaction was canceled. Possible Values: - `01`: Cardholder selected Cancel. - `02`: Reserved for future EMVCo use (values invalid until defined by EMVCo). - `03`: Transaction Timed Out—Decoupled Authentication - `04`: Transaction timed out at ACS—other timeouts - `05`: Transaction Timed out at ACS - First CReq not received by ACS - `06`: Transaction Error - `07`: Unknown - `08`: Transaction Timed Out at SDK
41
44
  attr_accessor :challenge_cancel_code
42
45
 
@@ -144,6 +147,7 @@ module CyberSource
144
147
  :'alternate_authentication_method' => :'alternateAuthenticationMethod',
145
148
  :'authentication_date' => :'authenticationDate',
146
149
  :'authentication_transaction_id' => :'authenticationTransactionId',
150
+ :'transaction_flow_indicator' => :'transactionFlowIndicator',
147
151
  :'challenge_cancel_code' => :'challengeCancelCode',
148
152
  :'challenge_code' => :'challengeCode',
149
153
  :'challenge_status' => :'challengeStatus',
@@ -190,6 +194,7 @@ module CyberSource
190
194
  :'alternate_authentication_method' => :'String',
191
195
  :'authentication_date' => :'String',
192
196
  :'authentication_transaction_id' => :'String',
197
+ :'transaction_flow_indicator' => :'Integer',
193
198
  :'challenge_cancel_code' => :'String',
194
199
  :'challenge_code' => :'String',
195
200
  :'challenge_status' => :'String',
@@ -265,6 +270,10 @@ module CyberSource
265
270
  self.authentication_transaction_id = attributes[:'authenticationTransactionId']
266
271
  end
267
272
 
273
+ if attributes.has_key?(:'transactionFlowIndicator')
274
+ self.transaction_flow_indicator = attributes[:'transactionFlowIndicator']
275
+ end
276
+
268
277
  if attributes.has_key?(:'challengeCancelCode')
269
278
  self.challenge_cancel_code = attributes[:'challengeCancelCode']
270
279
  end
@@ -600,6 +609,7 @@ module CyberSource
600
609
  alternate_authentication_method == o.alternate_authentication_method &&
601
610
  authentication_date == o.authentication_date &&
602
611
  authentication_transaction_id == o.authentication_transaction_id &&
612
+ transaction_flow_indicator == o.transaction_flow_indicator &&
603
613
  challenge_cancel_code == o.challenge_cancel_code &&
604
614
  challenge_code == o.challenge_code &&
605
615
  challenge_status == o.challenge_status &&
@@ -643,7 +653,7 @@ module CyberSource
643
653
  # Calculates hash code according to all attributes.
644
654
  # @return [Fixnum] Hash code
645
655
  def hash
646
- [strong_authentication, authentication_type, acs_window_size, alternate_authentication_data, alternate_authentication_date, alternate_authentication_method, authentication_date, authentication_transaction_id, challenge_cancel_code, challenge_code, challenge_status, customer_card_alias, decoupled_authentication_indicator, decoupled_authentication_max_time, default_card, device_channel, installment_total_count, merchant_fraud_rate, marketing_opt_in, marketing_source, mcc, merchant_score, message_category, npa_code, override_payment_method, override_country_code, prior_authentication_data, prior_authentication_method, prior_authentication_reference_id, prior_authentication_time, product_code, return_url, requestor_id, requestor_initiated_authentication_indicator, requestor_name, reference_id, sdk_max_timeout, secure_corporate_payment_indicator, transaction_mode, white_list_status].hash
656
+ [strong_authentication, authentication_type, acs_window_size, alternate_authentication_data, alternate_authentication_date, alternate_authentication_method, authentication_date, authentication_transaction_id, transaction_flow_indicator, challenge_cancel_code, challenge_code, challenge_status, customer_card_alias, decoupled_authentication_indicator, decoupled_authentication_max_time, default_card, device_channel, installment_total_count, merchant_fraud_rate, marketing_opt_in, marketing_source, mcc, merchant_score, message_category, npa_code, override_payment_method, override_country_code, prior_authentication_data, prior_authentication_method, prior_authentication_reference_id, prior_authentication_time, product_code, return_url, requestor_id, requestor_initiated_authentication_indicator, requestor_name, reference_id, sdk_max_timeout, secure_corporate_payment_indicator, transaction_mode, white_list_status].hash
647
657
  end
648
658
 
649
659
  # Builds the object from hash
@@ -15,7 +15,7 @@ require 'date'
15
15
  module CyberSource
16
16
  # Use this object to submit a payment network token instead of card-based values.
17
17
  class Riskv1decisionsPaymentInformationTokenizedCard
18
- # Type of transaction that provided the token data. This value does not specify the token service provider; it specifies the entity that provided you with information about the token. Possible value: - `2`: Near-field communication (NFC) transaction. The customer’s mobile device provided the token data for a contactless EMV transaction. For recurring transactions, use this value if the original transaction was a contactless EMV transaction. #### Visa Platform Connect - `1`: In App tokenization. Example: InApp apple pay. - `3`: Card/Credential On File Tokenization. **NOTE** No CyberSource through VisaNet acquirers support EMV at this time. Required field for PIN debit credit or PIN debit purchase transactions that use payment network tokens; otherwise, not used.
18
+ # Type of transaction that provided the token data. This value does not specify the token service provider; it specifies the entity that provided you with information about the token. Possible value: - `2`: Near-field communication (NFC) transaction. The customer’s mobile device provided the token data for a contactless EMV transaction. For recurring transactions, use this value if the original transaction was a contactless EMV transaction. #### Visa Platform Connect - `1`: For Rupay and In App tokenization. Example: InApp apple pay. - `3`: Card/Credential On File Tokenization. **NOTE** No CyberSource through VisaNet acquirers support EMV at this time. Required field for PIN debit credit or PIN debit purchase transactions that use payment network tokens; otherwise, not used.
19
19
  attr_accessor :transaction_type
20
20
 
21
21
  # Three-digit value that indicates the card type. **IMPORTANT** It is strongly recommended that you include the card type field in request messages even if it is optional for your processor and card type. Omitting the card type can cause the transaction to be processed with the wrong card type. Possible values: - `001`: Visa. For card-present transactions on all processors except SIX, the Visa Electron card type is processed the same way that the Visa debit card is processed. Use card type value `001` for Visa Electron. - `002`: Mastercard, Eurocard[^1], which is a European regional brand of Mastercard. - `003`: American Express - `004`: Discover - `005`: Diners Club - `006`: Carte Blanche[^1] - `007`: JCB[^1] - `014`: Enroute[^1] - `021`: JAL[^1] - `024`: Maestro (UK Domestic)[^1] - `031`: Delta[^1]: Use this value only for Ingenico ePayments. For other processors, use `001` for all Visa card types. - `033`: Visa Electron[^1]. Use this value only for Ingenico ePayments and SIX. For other processors, use `001` for all Visa card types. - `034`: Dankort[^1] - `036`: Cartes Bancaires[^1,4] - `037`: Carta Si[^1] - `039`: Encoded account number[^1] - `040`: UATP[^1] - `042`: Maestro (International)[^1] - `050`: Hipercard[^2,3] - `051`: Aura - `054`: Elo[^3] - `062`: China UnionPay [^1]: For this card type, you must include the `paymentInformation.card.type` or `paymentInformation.tokenizedCard.type` field in your request for an authorization or a stand-alone credit. [^2]: For this card type on Cielo 3.0, you must include the `paymentInformation.card.type` or `paymentInformation.tokenizedCard.type` field in a request for an authorization or a stand-alone credit. This card type is not supported on Cielo 1.5. [^3]: For this card type on Getnet and Rede, you must include the `paymentInformation.card.type` or `paymentInformation.tokenizedCard.type` field in a request for an authorization or a stand-alone credit. [^4]: For this card type, you must include the `paymentInformation.card.type` in your request for any payer authentication services. #### Used by **Authorization** Required for Carte Blanche and JCB. Optional for all other card types. #### Card Present reply This field is included in the reply message when the client software that is installed on the POS terminal uses the token management service (TMS) to retrieve tokenized payment details. You must contact customer support to have your account enabled to receive these fields in the credit reply message. Returned by the Credit service. This reply field is only supported by the following processors: - American Express Direct - Credit Mutuel-CIC - FDC Nashville Global - OmniPay Direct - SIX #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response. #### GPX This field only supports transactions from the following card types: - Visa - Mastercard - AMEX - Discover - Diners - JCB - Union Pay International
@@ -56,6 +56,8 @@ module CyberSource
56
56
 
57
57
  attr_accessor :payment_information
58
58
 
59
+ attr_accessor :payment_insights_information
60
+
59
61
  attr_accessor :processing_information
60
62
 
61
63
  attr_accessor :processor_information
@@ -91,6 +93,7 @@ module CyberSource
91
93
  :'merchant_information' => :'merchantInformation',
92
94
  :'order_information' => :'orderInformation',
93
95
  :'payment_information' => :'paymentInformation',
96
+ :'payment_insights_information' => :'paymentInsightsInformation',
94
97
  :'processing_information' => :'processingInformation',
95
98
  :'processor_information' => :'processorInformation',
96
99
  :'point_of_sale_information' => :'pointOfSaleInformation',
@@ -122,6 +125,7 @@ module CyberSource
122
125
  :'merchant_information' => :'TssV2TransactionsGet200ResponseMerchantInformation',
123
126
  :'order_information' => :'TssV2TransactionsGet200ResponseOrderInformation',
124
127
  :'payment_information' => :'TssV2TransactionsGet200ResponsePaymentInformation',
128
+ :'payment_insights_information' => :'PtsV2PaymentsPost201ResponsePaymentInsightsInformation',
125
129
  :'processing_information' => :'TssV2TransactionsGet200ResponseProcessingInformation',
126
130
  :'processor_information' => :'TssV2TransactionsGet200ResponseProcessorInformation',
127
131
  :'point_of_sale_information' => :'TssV2TransactionsGet200ResponsePointOfSaleInformation',
@@ -214,6 +218,10 @@ module CyberSource
214
218
  self.payment_information = attributes[:'paymentInformation']
215
219
  end
216
220
 
221
+ if attributes.has_key?(:'paymentInsightsInformation')
222
+ self.payment_insights_information = attributes[:'paymentInsightsInformation']
223
+ end
224
+
217
225
  if attributes.has_key?(:'processingInformation')
218
226
  self.processing_information = attributes[:'processingInformation']
219
227
  end
@@ -297,6 +305,7 @@ module CyberSource
297
305
  merchant_information == o.merchant_information &&
298
306
  order_information == o.order_information &&
299
307
  payment_information == o.payment_information &&
308
+ payment_insights_information == o.payment_insights_information &&
300
309
  processing_information == o.processing_information &&
301
310
  processor_information == o.processor_information &&
302
311
  point_of_sale_information == o.point_of_sale_information &&
@@ -315,7 +324,7 @@ module CyberSource
315
324
  # Calculates hash code according to all attributes.
316
325
  # @return [Fixnum] Hash code
317
326
  def hash
318
- [id, root_id, reconciliation_id, merchant_id, submit_time_utc, application_information, buyer_information, client_reference_information, consumer_authentication_information, device_information, error_information, installment_information, fraud_marking_information, health_care_information, merchant_defined_information, merchant_information, order_information, payment_information, processing_information, processor_information, point_of_sale_information, risk_information, sender_information, token_information, _links].hash
327
+ [id, root_id, reconciliation_id, merchant_id, submit_time_utc, application_information, buyer_information, client_reference_information, consumer_authentication_information, device_information, error_information, installment_information, fraud_marking_information, health_care_information, merchant_defined_information, merchant_information, order_information, payment_information, payment_insights_information, processing_information, processor_information, point_of_sale_information, risk_information, sender_information, token_information, _links].hash
319
328
  end
320
329
 
321
330
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
 
15
15
  module CyberSource
16
16
  class TssV2TransactionsGet200ResponsePaymentInformationCustomer
17
- # Unique identifier for the legacy Secure Storage token used in the transaction. When you include this value in your request, many of the fields that are normally required for an authorization or credit become optional.
17
+ # Unique identifier for the customer's card and billing information. When you use Payment Tokenization or Recurring Billing and you include this value in your request, many of the fields that are normally required for an authorization or credit become optional. **NOTE** When you use Payment Tokenization or Recurring Billing, the value for the Customer ID is actually the Cybersource payment token for a customer. This token stores information such as the consumer’s card number so it can be applied towards bill payments, recurring payments, or one-time payments. By using this token in a payment API request, the merchant doesn't need to pass in data such as the card number or expiration date in the request itself. For details, see the `subscription_id` field description in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/)
18
18
  attr_accessor :customer_id
19
19
 
20
20
  # Unique identifier for the Customer token that was created as part of a bundled TOKEN_CREATE action.
@@ -66,12 +66,6 @@ module CyberSource
66
66
  true
67
67
  end
68
68
 
69
- # Custom attribute writer method with validation
70
- # @param [Object] customer_id Value to be assigned
71
- def customer_id=(customer_id)
72
- @customer_id = customer_id
73
- end
74
-
75
69
  # Custom attribute writer method with validation
76
70
  # @param [Object] id Value to be assigned
77
71
  def id=(id)
@@ -31,7 +31,7 @@ module CyberSource
31
31
  def self.swagger_types
32
32
  {
33
33
  :'auth_type' => :'String',
34
- :'initiator' => :'Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiator'
34
+ :'initiator' => :'TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptionsInitiator'
35
35
  }
36
36
  end
37
37
 
@@ -0,0 +1,213 @@
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 TssV2TransactionsGet200ResponseProcessingInformationAuthorizationOptionsInitiator
17
+ # This field indicates whether the transaction is a merchant-initiated transaction or customer-initiated transaction. Valid values: - **customer** - **merchant**
18
+ attr_accessor :type
19
+
20
+ # Indicates to the issuing bank two things: - The merchant has received consent from the cardholder to store their card details on file - The merchant wants the issuing bank to check out the card details before the merchant initiates their first transaction for this cardholder. The purpose of the merchant-initiated transaction is to ensure that the cardholder’s credentials are valid (that the card is not stolen or has restrictions) and that the card details are good to be stored on the merchant’s file for future transactions. Valid values: - `Y` means merchant will use this transaction to store payment credentials for follow-up merchant-initiated transactions. - `N` means merchant will not use this transaction to store payment credentials for follow-up merchant-initiated transactions. For details, see `subsequent_auth_first` field description in the [Credit Card Services Using the SCMP API Guide.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/) **NOTE:** The value for this field does not correspond to any data in the TC 33 capture file5. This field is supported only for Visa transactions on CyberSource through VisaNet.
21
+ attr_accessor :credential_stored_on_file
22
+
23
+ # Indicates to an issuing bank whether a merchant-initiated transaction came from a card that was already stored on file. Possible values: - **Y** means the merchant-initiated transaction came from a card that was already stored on file. - **N** means the merchant-initiated transaction came from a card that was not stored on file.
24
+ attr_accessor :stored_credential_used
25
+
26
+ attr_accessor :merchant_initiated_transaction
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'type' => :'type',
32
+ :'credential_stored_on_file' => :'credentialStoredOnFile',
33
+ :'stored_credential_used' => :'storedCredentialUsed',
34
+ :'merchant_initiated_transaction' => :'merchantInitiatedTransaction'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'type' => :'String',
42
+ :'credential_stored_on_file' => :'String',
43
+ :'stored_credential_used' => :'String',
44
+ :'merchant_initiated_transaction' => :'Ptsv2paymentsProcessingInformationAuthorizationOptionsInitiatorMerchantInitiatedTransaction'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param [Hash] attributes Model attributes in the form of hash
50
+ def initialize(attributes = {})
51
+ return unless attributes.is_a?(Hash)
52
+
53
+ # convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
55
+
56
+ if attributes.has_key?(:'type')
57
+ self.type = attributes[:'type']
58
+ end
59
+
60
+ if attributes.has_key?(:'credentialStoredOnFile')
61
+ self.credential_stored_on_file = attributes[:'credentialStoredOnFile']
62
+ end
63
+
64
+ if attributes.has_key?(:'storedCredentialUsed')
65
+ self.stored_credential_used = attributes[:'storedCredentialUsed']
66
+ end
67
+
68
+ if attributes.has_key?(:'merchantInitiatedTransaction')
69
+ self.merchant_initiated_transaction = attributes[:'merchantInitiatedTransaction']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ type == o.type &&
92
+ credential_stored_on_file == o.credential_stored_on_file &&
93
+ stored_credential_used == o.stored_credential_used &&
94
+ merchant_initiated_transaction == o.merchant_initiated_transaction
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Fixnum] Hash code
105
+ def hash
106
+ [type, credential_stored_on_file, stored_credential_used, merchant_initiated_transaction].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ self.class.swagger_types.each_pair do |key, type|
115
+ if type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :DateTime
136
+ DateTime.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :BOOLEAN
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ temp_model = CyberSource.const_get(type).new
167
+ temp_model.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ next if value.nil?
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map { |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+ end
213
+ end
@@ -20,12 +20,15 @@ module CyberSource
20
20
 
21
21
  attr_accessor :card
22
22
 
23
+ attr_accessor :bank
24
+
23
25
  # Attribute mapping from ruby-style variable name to JSON key.
24
26
  def self.attribute_map
25
27
  {
26
28
  :'payment_type' => :'paymentType',
27
29
  :'customer' => :'customer',
28
- :'card' => :'card'
30
+ :'card' => :'card',
31
+ :'bank' => :'bank'
29
32
  }
30
33
  end
31
34
 
@@ -33,8 +36,9 @@ module CyberSource
33
36
  def self.swagger_types
34
37
  {
35
38
  :'payment_type' => :'TssV2TransactionsPost201ResponseEmbeddedPaymentInformationPaymentType',
36
- :'customer' => :'Riskv1authenticationsetupsPaymentInformationCustomer',
37
- :'card' => :'TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard'
39
+ :'customer' => :'TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCustomer',
40
+ :'card' => :'TssV2TransactionsPost201ResponseEmbeddedPaymentInformationCard',
41
+ :'bank' => :'TssV2TransactionsPost201ResponseEmbeddedPaymentInformationBank'
38
42
  }
39
43
  end
40
44
 
@@ -57,6 +61,10 @@ module CyberSource
57
61
  if attributes.has_key?(:'card')
58
62
  self.card = attributes[:'card']
59
63
  end
64
+
65
+ if attributes.has_key?(:'bank')
66
+ self.bank = attributes[:'bank']
67
+ end
60
68
  end
61
69
 
62
70
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -79,7 +87,8 @@ module CyberSource
79
87
  self.class == o.class &&
80
88
  payment_type == o.payment_type &&
81
89
  customer == o.customer &&
82
- card == o.card
90
+ card == o.card &&
91
+ bank == o.bank
83
92
  end
84
93
 
85
94
  # @see the `==` method
@@ -91,7 +100,7 @@ module CyberSource
91
100
  # Calculates hash code according to all attributes.
92
101
  # @return [Fixnum] Hash code
93
102
  def hash
94
- [payment_type, customer, card].hash
103
+ [payment_type, customer, card, bank].hash
95
104
  end
96
105
 
97
106
  # Builds the object from hash
@@ -0,0 +1,183 @@
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 TssV2TransactionsPost201ResponseEmbeddedPaymentInformationBank
17
+ attr_accessor :account
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'account' => :'account'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'account' => :'TssV2TransactionsPost201ResponseEmbeddedPaymentInformationBankAccount'
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?(:'account')
42
+ self.account = attributes[:'account']
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
+ account == o.account
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
+ [account].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