cybersource_rest_client 0.0.29 → 0.0.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/authentication/oauth/OAuthToken.rb +15 -0
  3. data/lib/AuthenticationSDK/core/Authorization.rb +4 -1
  4. data/lib/AuthenticationSDK/core/MerchantConfig.rb +93 -19
  5. data/lib/AuthenticationSDK/util/Constants.rb +78 -76
  6. data/lib/cybersource_rest_client.rb +19 -9
  7. data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +3 -3
  8. data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +3 -3
  9. data/lib/cybersource_rest_client/api/o_auth_api.rb +104 -0
  10. data/lib/cybersource_rest_client/api/payments_api.rb +2 -2
  11. data/lib/cybersource_rest_client/api/refund_api.rb +4 -4
  12. data/lib/cybersource_rest_client/api/void_api.rb +4 -4
  13. data/lib/cybersource_rest_client/api_client.rb +31 -8
  14. data/lib/cybersource_rest_client/configuration.rb +2 -2
  15. data/lib/cybersource_rest_client/models/access_token_response.rb +244 -0
  16. data/lib/cybersource_rest_client/models/add_negative_list_request.rb +1 -1
  17. data/lib/cybersource_rest_client/models/bad_request_error.rb +192 -0
  18. data/lib/cybersource_rest_client/models/create_access_token_request.rb +254 -0
  19. data/lib/cybersource_rest_client/models/fraud_marking_action_request.rb +1 -1
  20. data/lib/cybersource_rest_client/models/invoicing_v2_invoices_all_get200_response_customer_information.rb +20 -4
  21. data/lib/cybersource_rest_client/models/invoicingv2invoices_customer_information.rb +20 -4
  22. data/lib/cybersource_rest_client/models/{payment_instrument_list_for_customer.rb → payment_instrument_list.rb} +3 -3
  23. data/lib/cybersource_rest_client/models/{payment_instrument_list_for_customer__embedded.rb → payment_instrument_list__embedded.rb} +1 -1
  24. data/lib/cybersource_rest_client/models/{payment_instrument_list_for_customer__links.rb → payment_instrument_list__links.rb} +6 -6
  25. data/lib/cybersource_rest_client/models/{payment_instrument_list_for_customer__links_first.rb → payment_instrument_list__links_first.rb} +1 -1
  26. data/lib/cybersource_rest_client/models/{payment_instrument_list_for_customer__links_last.rb → payment_instrument_list__links_last.rb} +1 -1
  27. data/lib/cybersource_rest_client/models/{payment_instrument_list_for_customer__links_next.rb → payment_instrument_list__links_next.rb} +1 -1
  28. data/lib/cybersource_rest_client/models/{payment_instrument_list_for_customer__links_prev.rb → payment_instrument_list__links_prev.rb} +1 -1
  29. data/lib/cybersource_rest_client/models/{payment_instrument_list_for_customer__links_self.rb → payment_instrument_list__links_self.rb} +1 -1
  30. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +10 -1
  31. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information.rb +11 -1
  32. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information.rb +13 -4
  33. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_reward_points_details.rb +270 -0
  34. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information.rb +183 -0
  35. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information_card.rb +242 -0
  36. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb +1 -1
  37. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +1 -1
  38. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processing_information.rb +1 -1
  39. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +17 -1
  40. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_routing.rb +3 -3
  41. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_merchant_information_merchant_descriptor.rb +6 -0
  42. data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_recipient_information_card.rb +1 -1
  43. data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +1 -1
  44. data/lib/cybersource_rest_client/models/ptsv2payments_client_reference_information.rb +1 -1
  45. data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb +60 -2
  46. data/lib/cybersource_rest_client/models/ptsv2payments_health_care_information_amount_details.rb +1 -1
  47. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +6 -0
  48. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +4 -4
  49. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_fluid_data.rb +3 -3
  50. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +1 -1
  51. data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +36 -38
  52. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +15 -5
  53. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +7 -7
  54. data/lib/cybersource_rest_client/models/ptsv2payments_recurring_payment_information.rb +24 -4
  55. data/lib/cybersource_rest_client/models/ptsv2payments_risk_information.rb +15 -4
  56. data/lib/cybersource_rest_client/models/ptsv2payments_risk_information_auxiliary_data.rb +207 -0
  57. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_payment_information_card.rb +1 -1
  58. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb +15 -5
  59. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +4 -4
  60. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information.rb +1 -1
  61. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_client_reference_information.rb +17 -1
  62. data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_processing_information.rb +1 -1
  63. data/lib/cybersource_rest_client/models/ptsv2payouts_merchant_information_merchant_descriptor.rb +6 -0
  64. data/lib/cybersource_rest_client/models/ptsv2payouts_payment_information_card.rb +4 -4
  65. data/lib/cybersource_rest_client/models/resource_not_found_error.rb +192 -0
  66. data/lib/cybersource_rest_client/models/riskv1authenticationresults_consumer_authentication_information.rb +1 -1
  67. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_card.rb +3 -3
  68. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +1 -1
  69. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_card.rb +3 -3
  70. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +1 -1
  71. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_card.rb +3 -3
  72. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_fluid_data.rb +3 -3
  73. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_tokenized_card.rb +1 -1
  74. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_processing_information.rb +1 -1
  75. data/lib/cybersource_rest_client/models/riskv1decisions_client_reference_information.rb +17 -1
  76. data/lib/cybersource_rest_client/models/riskv1decisions_consumer_authentication_information.rb +1 -1
  77. data/lib/cybersource_rest_client/models/riskv1decisions_device_information.rb +1 -11
  78. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_card.rb +3 -3
  79. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +1 -1
  80. data/lib/cybersource_rest_client/models/riskv1decisions_risk_information.rb +15 -4
  81. data/lib/cybersource_rest_client/models/riskv1liststypeentries_client_reference_information.rb +224 -0
  82. data/lib/cybersource_rest_client/models/riskv1liststypeentries_payment_information_card.rb +1 -1
  83. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb +5 -5
  84. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_authorization_options.rb +13 -4
  85. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_card.rb +3 -3
  86. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processing_information.rb +1 -1
  87. data/lib/cybersource_rest_client/models/unauthorized_client_error.rb +192 -0
  88. data/lib/cybersource_rest_client/models/validate_export_compliance_request.rb +1 -1
  89. data/lib/cybersource_rest_client/models/verify_customer_address_request.rb +1 -1
  90. metadata +120 -101
  91. data/lib/AuthenticationSDK/resource/TRRReports.json +0 -12
  92. data/lib/AuthenticationSDK/resource/cybs.yml +0 -31
  93. data/lib/AuthenticationSDK/resource/request.json +0 -54
  94. data/lib/AuthenticationSDK/resource/request_capture.json +0 -11
  95. data/lib/AuthenticationSDK/resource/testrest.p12 +0 -0
  96. data/lib/AuthenticationSDK/spec/Authorization_spec.rb +0 -274
  97. data/lib/AuthenticationSDK/spec/MerchantConfigData.rb +0 -59
  98. data/lib/AuthenticationSDK/spec/MerchantConfig_spec.rb +0 -116
  99. data/lib/AuthenticationSDK/spec/PostRequestData.json +0 -54
  100. data/lib/AuthenticationSDK/spec/PutRequestData.json +0 -12
  101. data/lib/AuthenticationSDK/spec/ResponseCodeMessage_spec.rb +0 -60
  102. data/lib/AuthenticationSDK/spec/spec_helper.rb +0 -12
  103. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_card.rb +0 -184
@@ -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 PtsV2PaymentsPost201ResponsePaymentAccountInformation
17
+ attr_accessor :card
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'card' => :'card'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'card' => :'PtsV2PaymentsPost201ResponsePaymentAccountInformationCard'
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?(:'card')
42
+ self.card = attributes[:'card']
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
+ card == o.card
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
+ [card].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
@@ -0,0 +1,242 @@
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 PtsV2PaymentsPost201ResponsePaymentAccountInformationCard
17
+ # Last four digits of the cardholder’s account number. 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. #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response. #### PIN debit This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. Returned by PIN debit credit and PIN debit purchase. This field is supported only by the following processors: - American Express Direct - Credit Mutuel-CIC - FDC Nashville Global - OmniPay Direct - SIX
18
+ attr_accessor :suffix
19
+
20
+ # Two-digit month in which the payment card expires. Format: `MM`. Valid values: `01` through `12`. Leading 0 is required. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (`01` through `12`) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (_type_=039), if there is no expiration date on the card, use `12`. #### FDMS Nashville Required field. #### All other processors Required if `pointOfSaleInformation.entryMode=keyed`. However, this field is optional if your account is configured for relaxed requirements for address data and expiration date. **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response.
21
+ attr_accessor :expiration_month
22
+
23
+ # Four-digit year in which the payment card expires. Format: `YYYY`. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (`1900` through `3000`) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (**_type_**`=039`), if there is no expiration date on the card, use `2021`. #### FDMS Nashville Required field. #### FDC Nashville Global and FDMS South You can send in 2 digits or 4 digits. If you send in 2 digits, they must be the last 2 digits of the year. #### All other processors Required if `pointOfSaleInformation.entryMode=keyed`. However, this field is optional if your account is configured for relaxed requirements for address data and expiration date. **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response.
24
+ attr_accessor :expiration_year
25
+
26
+ # 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
27
+ attr_accessor :type
28
+
29
+ # Bank Identification Number (BIN). This is the initial four to six numbers on a credit card account number. #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response.
30
+ attr_accessor :prefix
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'suffix' => :'suffix',
36
+ :'expiration_month' => :'expirationMonth',
37
+ :'expiration_year' => :'expirationYear',
38
+ :'type' => :'type',
39
+ :'prefix' => :'prefix'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.swagger_types
45
+ {
46
+ :'suffix' => :'String',
47
+ :'expiration_month' => :'String',
48
+ :'expiration_year' => :'String',
49
+ :'type' => :'String',
50
+ :'prefix' => :'String'
51
+ }
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ return unless attributes.is_a?(Hash)
58
+
59
+ # convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
61
+
62
+ if attributes.has_key?(:'suffix')
63
+ self.suffix = attributes[:'suffix']
64
+ end
65
+
66
+ if attributes.has_key?(:'expirationMonth')
67
+ self.expiration_month = attributes[:'expirationMonth']
68
+ end
69
+
70
+ if attributes.has_key?(:'expirationYear')
71
+ self.expiration_year = attributes[:'expirationYear']
72
+ end
73
+
74
+ if attributes.has_key?(:'type')
75
+ self.type = attributes[:'type']
76
+ end
77
+
78
+ if attributes.has_key?(:'prefix')
79
+ self.prefix = attributes[:'prefix']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ invalid_properties = Array.new
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ true
94
+ end
95
+
96
+ # Custom attribute writer method with validation
97
+ # @param [Object] expiration_month Value to be assigned
98
+ def expiration_month=(expiration_month)
99
+ @expiration_month = expiration_month
100
+ end
101
+
102
+ # Custom attribute writer method with validation
103
+ # @param [Object] expiration_year Value to be assigned
104
+ def expiration_year=(expiration_year)
105
+ @expiration_year = expiration_year
106
+ end
107
+
108
+ # Custom attribute writer method with validation
109
+ # @param [Object] prefix Value to be assigned
110
+ def prefix=(prefix)
111
+ @prefix = prefix
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ suffix == o.suffix &&
120
+ expiration_month == o.expiration_month &&
121
+ expiration_year == o.expiration_year &&
122
+ type == o.type &&
123
+ prefix == o.prefix
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Fixnum] Hash code
134
+ def hash
135
+ [suffix, expiration_month, expiration_year, type, prefix].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ self.class.swagger_types.each_pair do |key, type|
144
+ if type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
148
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
149
+ end
150
+ elsif !attributes[self.class.attribute_map[key]].nil?
151
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
152
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
153
+ end
154
+
155
+ self
156
+ end
157
+
158
+ # Deserializes the data based on type
159
+ # @param string type Data type
160
+ # @param string value Value to be deserialized
161
+ # @return [Object] Deserialized data
162
+ def _deserialize(type, value)
163
+ case type.to_sym
164
+ when :DateTime
165
+ DateTime.parse(value)
166
+ when :Date
167
+ Date.parse(value)
168
+ when :String
169
+ value.to_s
170
+ when :Integer
171
+ value.to_i
172
+ when :Float
173
+ value.to_f
174
+ when :BOOLEAN
175
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
176
+ true
177
+ else
178
+ false
179
+ end
180
+ when :Object
181
+ # generic object (usually a Hash), return directly
182
+ value
183
+ when /\AArray<(?<inner_type>.+)>\z/
184
+ inner_type = Regexp.last_match[:inner_type]
185
+ value.map { |v| _deserialize(inner_type, v) }
186
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
187
+ k_type = Regexp.last_match[:k_type]
188
+ v_type = Regexp.last_match[:v_type]
189
+ {}.tap do |hash|
190
+ value.each do |k, v|
191
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
192
+ end
193
+ end
194
+ else # model
195
+ temp_model = CyberSource.const_get(type).new
196
+ temp_model.build_from_hash(value)
197
+ end
198
+ end
199
+
200
+ # Returns the string representation of the object
201
+ # @return [String] String presentation of the object
202
+ def to_s
203
+ to_hash.to_s
204
+ end
205
+
206
+ # to_body is an alias to to_hash (backward compatibility)
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_body
209
+ to_hash
210
+ end
211
+
212
+ # Returns the object in the form of hash
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_hash
215
+ hash = {}
216
+ self.class.attribute_map.each_pair do |attr, param|
217
+ value = self.send(attr)
218
+ next if value.nil?
219
+ hash[param] = _to_hash(value)
220
+ end
221
+ hash
222
+ end
223
+
224
+ # Outputs non-array value in the form of hash
225
+ # For object, use to_hash. Otherwise, just return the value
226
+ # @param [Object] value Any valid value
227
+ # @return [Hash] Returns the value in the form of hash
228
+ def _to_hash(value)
229
+ if value.is_a?(Array)
230
+ value.compact.map { |v| _to_hash(v) }
231
+ elsif value.is_a?(Hash)
232
+ {}.tap do |hash|
233
+ value.each { |k, v| hash[k] = _to_hash(v) }
234
+ end
235
+ elsif value.respond_to? :to_hash
236
+ value.to_hash
237
+ else
238
+ value
239
+ end
240
+ end
241
+ end
242
+ end
@@ -67,7 +67,7 @@ module CyberSource
67
67
  # Attribute type mapping.
68
68
  def self.swagger_types
69
69
  {
70
- :'card' => :'PtsV2PaymentsPost201ResponsePaymentInformationCard',
70
+ :'card' => :'PtsV2PaymentsPost201ResponsePaymentAccountInformationCard',
71
71
  :'tokenized_card' => :'PtsV2PaymentsPost201ResponsePaymentInformationTokenizedCard',
72
72
  :'account_features' => :'PtsV2PaymentsPost201ResponsePaymentInformationAccountFeatures',
73
73
  :'bank' => :'PtsV2PaymentsPost201ResponsePaymentInformationBank',
@@ -20,7 +20,7 @@ module CyberSource
20
20
  # Last four digits of token. CyberSource includes this field in the reply message when it decrypts the payment blob for the tokenized transaction. For details, see `token_suffix` field description in [Google Pay Using the SCMP API.] (https://apps.cybersource.com/library/documentation/dev_guides/Google_Pay_SCMP_API/html/)
21
21
  attr_accessor :suffix
22
22
 
23
- # 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] - `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. #### 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 #### GPX This field only supports transactions from the following card types: - Visa - Mastercard - AMEX - Discover - Diners - JCB - Union Pay International
23
+ # 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
24
24
  attr_accessor :type
25
25
 
26
26
  # Confidence level of the tokenization. This value is assigned by the token service provider. **Note** This field is supported only for **CyberSource through VisaNet** and **FDC Nashville Global**. Returned by PIN debit credit or PIN debit purchase.
@@ -16,7 +16,7 @@ module CyberSource
16
16
  class PtsV2PaymentsPost201ResponseProcessingInformation
17
17
  attr_accessor :bank_transfer_options
18
18
 
19
- # Type of digital payment solution for the transaction. Possible Values: - `visacheckout`: Visa Checkout. This value is required for Visa Checkout transactions. For details, see `payment_solution` field description in [Visa Checkout Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/VCO_SCMP_API/html/) - `001`: Apple Pay. - `004`: Cybersource In-App Solution. - `005`: Masterpass. This value is required for Masterpass transactions on OmniPay Direct. For details, see \"Masterpass\" in the [Credit Card Services Using the SCMP API Guide.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/) - `006`: Android Pay. - `007`: Chase Pay. - `008`: Samsung Pay. - `012`: Google Pay. - `014`: Mastercard credential on file (COF) payment network token. Returned in authorizations that use a payment network token associated with a TMS token. - `015`: Visa credential on file (COF) payment network token. Returned in authorizations that use a payment network token associated with a TMS token.
19
+ # Type of digital payment solution for the transaction. Possible Values: - `visacheckout`: Visa Checkout. This value is required for Visa Checkout transactions. For details, see `payment_solution` field description in [Visa Checkout Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/VCO_SCMP_API/html/) - `001`: Apple Pay. - `004`: Cybersource In-App Solution. - `005`: Masterpass. This value is required for Masterpass transactions on OmniPay Direct. For details, see \"Masterpass\" in the [Credit Card Services Using the SCMP API Guide.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/) - `006`: Android Pay. - `007`: Chase Pay. - `008`: Samsung Pay. - `012`: Google Pay. - `013`: Cybersource P2PE Decryption - `014`: Mastercard credential on file (COF) payment network token. Returned in authorizations that use a payment network token associated with a TMS token. - `015`: Visa credential on file (COF) payment network token. Returned in authorizations that use a payment network token associated with a TMS token. - `027`: Click to Pay.
20
20
  attr_accessor :payment_solution
21
21
 
22
22
  # The possible values for the reply field are: - `true` : the airline data was included in the request to the processor. - `false` : the airline data was not included in the request to the processor. Returned by authorization, capture, or credit services.