cybersource_rest_client 0.0.36 → 0.0.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/authentication/http/GetSignatureParameter.rb +13 -6
  3. data/lib/AuthenticationSDK/authentication/http/HttpSignatureHeader.rb +13 -5
  4. data/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb +26 -11
  5. data/lib/AuthenticationSDK/authentication/oauth/OAuthToken.rb +11 -5
  6. data/lib/AuthenticationSDK/authentication/payloadDigest/digest.rb +2 -2
  7. data/lib/AuthenticationSDK/core/Authorization.rb +28 -20
  8. data/lib/AuthenticationSDK/core/MerchantConfig.rb +72 -78
  9. data/lib/AuthenticationSDK/logging/log_configuration.rb +71 -0
  10. data/lib/AuthenticationSDK/logging/log_factory.rb +65 -0
  11. data/lib/AuthenticationSDK/logging/sensitive_logging.rb +101 -0
  12. data/lib/AuthenticationSDK/util/Cache.rb +1 -1
  13. data/lib/AuthenticationSDK/util/Constants.rb +25 -17
  14. data/lib/AuthenticationSDK/util/ExceptionHandler.rb +26 -0
  15. data/lib/AuthenticationSDK/util/PropertiesUtil.rb +2 -2
  16. data/lib/cybersource_rest_client/api/asymmetric_key_management_api.rb +46 -46
  17. data/lib/cybersource_rest_client/api/capture_api.rb +16 -16
  18. data/lib/cybersource_rest_client/api/chargeback_details_api.rb +16 -16
  19. data/lib/cybersource_rest_client/api/chargeback_summaries_api.rb +16 -16
  20. data/lib/cybersource_rest_client/api/conversion_details_api.rb +16 -16
  21. data/lib/cybersource_rest_client/api/credit_api.rb +16 -16
  22. data/lib/cybersource_rest_client/api/customer_api.rb +61 -61
  23. data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +76 -76
  24. data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +76 -76
  25. data/lib/cybersource_rest_client/api/decision_manager_api.rb +46 -46
  26. data/lib/cybersource_rest_client/api/download_dtd_api.rb +16 -16
  27. data/lib/cybersource_rest_client/api/download_xsd_api.rb +16 -16
  28. data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +91 -91
  29. data/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb +16 -16
  30. data/lib/cybersource_rest_client/api/invoice_settings_api.rb +31 -31
  31. data/lib/cybersource_rest_client/api/invoices_api.rb +97 -97
  32. data/lib/cybersource_rest_client/api/key_generation_api.rb +16 -16
  33. data/lib/cybersource_rest_client/api/net_fundings_api.rb +16 -16
  34. data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +16 -16
  35. data/lib/cybersource_rest_client/api/payer_authentication_api.rb +46 -46
  36. data/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb +16 -16
  37. data/lib/cybersource_rest_client/api/payment_instrument_api.rb +61 -61
  38. data/lib/cybersource_rest_client/api/payments_api.rb +33 -33
  39. data/lib/cybersource_rest_client/api/payouts_api.rb +16 -16
  40. data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +16 -16
  41. data/lib/cybersource_rest_client/api/refund_api.rb +31 -31
  42. data/lib/cybersource_rest_client/api/report_definitions_api.rb +31 -31
  43. data/lib/cybersource_rest_client/api/report_downloads_api.rb +16 -16
  44. data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +76 -76
  45. data/lib/cybersource_rest_client/api/reports_api.rb +46 -46
  46. data/lib/cybersource_rest_client/api/retrieval_details_api.rb +16 -16
  47. data/lib/cybersource_rest_client/api/retrieval_summaries_api.rb +16 -16
  48. data/lib/cybersource_rest_client/api/reversal_api.rb +31 -31
  49. data/lib/cybersource_rest_client/api/search_transactions_api.rb +31 -31
  50. data/lib/cybersource_rest_client/api/secure_file_share_api.rb +31 -31
  51. data/lib/cybersource_rest_client/api/symmetric_key_management_api.rb +46 -46
  52. data/lib/cybersource_rest_client/api/taxes_api.rb +31 -31
  53. data/lib/cybersource_rest_client/api/tokenization_api.rb +16 -16
  54. data/lib/cybersource_rest_client/api/transaction_batches_api.rb +46 -46
  55. data/lib/cybersource_rest_client/api/transaction_details_api.rb +16 -16
  56. data/lib/cybersource_rest_client/api/user_management_api.rb +16 -16
  57. data/lib/cybersource_rest_client/api/user_management_search_api.rb +16 -16
  58. data/lib/cybersource_rest_client/api/verification_api.rb +31 -31
  59. data/lib/cybersource_rest_client/api/void_api.rb +76 -76
  60. data/lib/cybersource_rest_client/api_client.rb +7 -8
  61. data/lib/cybersource_rest_client/models/create_adhoc_report_request.rb +2 -5
  62. data/lib/cybersource_rest_client/models/create_payment_request.rb +19 -1
  63. data/lib/cybersource_rest_client/models/create_search_request.rb +1 -1
  64. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information_amount_details.rb +20 -4
  65. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +10 -1
  66. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_buyer_information.rb +243 -0
  67. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information.rb +10 -1
  68. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information_issuer_information.rb +206 -0
  69. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information_strong_authentication.rb +183 -0
  70. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +52 -4
  71. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +17 -1
  72. data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information.rb +33 -1
  73. data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information_personal_identification.rb +15 -5
  74. data/lib/cybersource_rest_client/models/ptsv2payments_client_reference_information.rb +17 -1
  75. data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information_strong_authentication.rb +17 -1
  76. data/lib/cybersource_rest_client/models/ptsv2payments_device_information.rb +17 -1
  77. data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +24 -4
  78. data/lib/cybersource_rest_client/models/ptsv2payments_invoice_details.rb +191 -0
  79. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb +65 -1
  80. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +1 -1
  81. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +17 -1
  82. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +20 -4
  83. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_ship_to.rb +33 -1
  84. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +13 -4
  85. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank.rb +14 -4
  86. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_e_wallet.rb +190 -0
  87. data/lib/cybersource_rest_client/models/ptsv2payments_processor_information.rb +191 -0
  88. data/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb +17 -1
  89. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information.rb +14 -5
  90. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_bank.rb +215 -0
  91. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +36 -4
  92. data/lib/cybersource_rest_client/models/ptsv2payouts_recipient_information.rb +17 -1
  93. data/lib/cybersource_rest_client/models/ptsv2payouts_sender_information.rb +17 -1
  94. data/lib/cybersource_rest_client/models/reportingv3reports_report_filters.rb +218 -0
  95. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +17 -1
  96. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +17 -1
  97. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +17 -1
  98. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response.rb +10 -11
  99. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information.rb +10 -1
  100. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information_partner.rb +190 -0
  101. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_installment_information.rb +14 -4
  102. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details.rb +13 -4
  103. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information.rb +32 -5
  104. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_customer.rb +206 -0
  105. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_instrument_identifier.rb +190 -0
  106. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb +36 -4
  107. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_token_information.rb +210 -0
  108. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response.rb +1 -1
  109. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_client_reference_information.rb +13 -4
  110. data/lib/cybersource_rest_client/utilities/flex/token_verification.rb +4 -4
  111. data/lib/cybersource_rest_client.rb +17 -3
  112. metadata +18 -4
  113. data/lib/AuthenticationSDK/core/Logger.rb +0 -26
  114. data/lib/AuthenticationSDK/util/ApiException.rb +0 -19
@@ -34,6 +34,8 @@ module CyberSource
34
34
 
35
35
  attr_accessor :payment_type
36
36
 
37
+ attr_accessor :e_wallet
38
+
37
39
  # Attribute mapping from ruby-style variable name to JSON key.
38
40
  def self.attribute_map
39
41
  {
@@ -46,7 +48,8 @@ module CyberSource
46
48
  :'instrument_identifier' => :'instrumentIdentifier',
47
49
  :'shipping_address' => :'shippingAddress',
48
50
  :'legacy_token' => :'legacyToken',
49
- :'payment_type' => :'paymentType'
51
+ :'payment_type' => :'paymentType',
52
+ :'e_wallet' => :'eWallet'
50
53
  }
51
54
  end
52
55
 
@@ -54,7 +57,7 @@ module CyberSource
54
57
  def self.swagger_types
55
58
  {
56
59
  :'card' => :'Ptsv2paymentsidrefundsPaymentInformationCard',
57
- :'bank' => :'Ptsv2paymentsPaymentInformationBank',
60
+ :'bank' => :'Ptsv2paymentsidrefundsPaymentInformationBank',
58
61
  :'tokenized_card' => :'Ptsv2paymentsPaymentInformationTokenizedCard',
59
62
  :'fluid_data' => :'Ptsv2paymentsPaymentInformationFluidData',
60
63
  :'customer' => :'Ptsv2paymentsPaymentInformationCustomer',
@@ -62,7 +65,8 @@ module CyberSource
62
65
  :'instrument_identifier' => :'Ptsv2paymentsPaymentInformationInstrumentIdentifier',
63
66
  :'shipping_address' => :'Ptsv2paymentsPaymentInformationShippingAddress',
64
67
  :'legacy_token' => :'Ptsv2paymentsPaymentInformationLegacyToken',
65
- :'payment_type' => :'Ptsv2paymentsPaymentInformationPaymentType'
68
+ :'payment_type' => :'Ptsv2paymentsPaymentInformationPaymentType',
69
+ :'e_wallet' => :'Ptsv2paymentsPaymentInformationEWallet'
66
70
  }
67
71
  end
68
72
 
@@ -113,6 +117,10 @@ module CyberSource
113
117
  if attributes.has_key?(:'paymentType')
114
118
  self.payment_type = attributes[:'paymentType']
115
119
  end
120
+
121
+ if attributes.has_key?(:'eWallet')
122
+ self.e_wallet = attributes[:'eWallet']
123
+ end
116
124
  end
117
125
 
118
126
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -142,7 +150,8 @@ module CyberSource
142
150
  instrument_identifier == o.instrument_identifier &&
143
151
  shipping_address == o.shipping_address &&
144
152
  legacy_token == o.legacy_token &&
145
- payment_type == o.payment_type
153
+ payment_type == o.payment_type &&
154
+ e_wallet == o.e_wallet
146
155
  end
147
156
 
148
157
  # @see the `==` method
@@ -154,7 +163,7 @@ module CyberSource
154
163
  # Calculates hash code according to all attributes.
155
164
  # @return [Fixnum] Hash code
156
165
  def hash
157
- [card, bank, tokenized_card, fluid_data, customer, payment_instrument, instrument_identifier, shipping_address, legacy_token, payment_type].hash
166
+ [card, bank, tokenized_card, fluid_data, customer, payment_instrument, instrument_identifier, shipping_address, legacy_token, payment_type, e_wallet].hash
158
167
  end
159
168
 
160
169
  # Builds the object from hash
@@ -0,0 +1,215 @@
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 Ptsv2paymentsidrefundsPaymentInformationBank
17
+ attr_accessor :account
18
+
19
+ # Bank routing number. This is also called the _transit number_. For details, see `ecp_rdfi` request field description in the [Electronic Check Services Using the SCMP API Guide.](https://apps.cybersource.com/library/documentation/dev_guides/EChecks_SCMP_API/html/)
20
+ attr_accessor :routing_number
21
+
22
+ # International Bank Account Number (IBAN) for the bank account. For some countries you can provide this number instead of the traditional bank account information. You can use this field only when scoring a direct debit transaction. For all possible values, see the `bank_iban` field description in the _Decision Manager Using the SCMP API Developer Guide_ on the [CyberSource Business Center.](https://ebc2.cybersource.com/ebc2/) Click **Decision Manager** > **Documentation** > **Guides** > _Decision Manager Using the SCMP API Developer Guide_ (PDF link).
23
+ attr_accessor :iban
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'account' => :'account',
29
+ :'routing_number' => :'routingNumber',
30
+ :'iban' => :'iban'
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.swagger_types
36
+ {
37
+ :'account' => :'Ptsv2paymentsPaymentInformationBankAccount',
38
+ :'routing_number' => :'String',
39
+ :'iban' => :'String'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ return unless attributes.is_a?(Hash)
47
+
48
+ # convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
50
+
51
+ if attributes.has_key?(:'account')
52
+ self.account = attributes[:'account']
53
+ end
54
+
55
+ if attributes.has_key?(:'routingNumber')
56
+ self.routing_number = attributes[:'routingNumber']
57
+ end
58
+
59
+ if attributes.has_key?(:'iban')
60
+ self.iban = attributes[:'iban']
61
+ end
62
+ end
63
+
64
+ # Show invalid properties with the reasons. Usually used together with valid?
65
+ # @return Array for valid properties with the reasons
66
+ def list_invalid_properties
67
+ invalid_properties = Array.new
68
+ invalid_properties
69
+ end
70
+
71
+ # Check to see if the all the properties in the model are valid
72
+ # @return true if the model is valid
73
+ def valid?
74
+ true
75
+ end
76
+
77
+ # Custom attribute writer method with validation
78
+ # @param [Object] routing_number Value to be assigned
79
+ def routing_number=(routing_number)
80
+ @routing_number = routing_number
81
+ end
82
+
83
+ # Custom attribute writer method with validation
84
+ # @param [Object] iban Value to be assigned
85
+ def iban=(iban)
86
+ @iban = iban
87
+ end
88
+
89
+ # Checks equality by comparing each attribute.
90
+ # @param [Object] Object to be compared
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ account == o.account &&
95
+ routing_number == o.routing_number &&
96
+ iban == o.iban
97
+ end
98
+
99
+ # @see the `==` method
100
+ # @param [Object] Object to be compared
101
+ def eql?(o)
102
+ self == o
103
+ end
104
+
105
+ # Calculates hash code according to all attributes.
106
+ # @return [Fixnum] Hash code
107
+ def hash
108
+ [account, routing_number, iban].hash
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def build_from_hash(attributes)
115
+ return nil unless attributes.is_a?(Hash)
116
+ self.class.swagger_types.each_pair do |key, type|
117
+ if type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
121
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
122
+ end
123
+ elsif !attributes[self.class.attribute_map[key]].nil?
124
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
126
+ end
127
+
128
+ self
129
+ end
130
+
131
+ # Deserializes the data based on type
132
+ # @param string type Data type
133
+ # @param string value Value to be deserialized
134
+ # @return [Object] Deserialized data
135
+ def _deserialize(type, value)
136
+ case type.to_sym
137
+ when :DateTime
138
+ DateTime.parse(value)
139
+ when :Date
140
+ Date.parse(value)
141
+ when :String
142
+ value.to_s
143
+ when :Integer
144
+ value.to_i
145
+ when :Float
146
+ value.to_f
147
+ when :BOOLEAN
148
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
+ true
150
+ else
151
+ false
152
+ end
153
+ when :Object
154
+ # generic object (usually a Hash), return directly
155
+ value
156
+ when /\AArray<(?<inner_type>.+)>\z/
157
+ inner_type = Regexp.last_match[:inner_type]
158
+ value.map { |v| _deserialize(inner_type, v) }
159
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
+ k_type = Regexp.last_match[:k_type]
161
+ v_type = Regexp.last_match[:v_type]
162
+ {}.tap do |hash|
163
+ value.each do |k, v|
164
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
165
+ end
166
+ end
167
+ else # model
168
+ temp_model = CyberSource.const_get(type).new
169
+ temp_model.build_from_hash(value)
170
+ end
171
+ end
172
+
173
+ # Returns the string representation of the object
174
+ # @return [String] String presentation of the object
175
+ def to_s
176
+ to_hash.to_s
177
+ end
178
+
179
+ # to_body is an alias to to_hash (backward compatibility)
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_body
182
+ to_hash
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ next if value.nil?
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ # Outputs non-array value in the form of hash
198
+ # For object, use to_hash. Otherwise, just return the value
199
+ # @param [Object] value Any valid value
200
+ # @return [Hash] Returns the value in the form of hash
201
+ def _to_hash(value)
202
+ if value.is_a?(Array)
203
+ value.compact.map { |v| _to_hash(v) }
204
+ elsif value.is_a?(Hash)
205
+ {}.tap do |hash|
206
+ value.each { |k, v| hash[k] = _to_hash(v) }
207
+ end
208
+ elsif value.respond_to? :to_hash
209
+ value.to_hash
210
+ else
211
+ value
212
+ end
213
+ end
214
+ end
215
+ end
@@ -28,6 +28,12 @@ module CyberSource
28
28
 
29
29
  attr_accessor :payouts_options
30
30
 
31
+ # Transaction reason code.
32
+ attr_accessor :transaction_reason
33
+
34
+ # This will send purpose of funds code for original credit transactions (OCTs).
35
+ attr_accessor :purpose_of_payment
36
+
31
37
  # Attribute mapping from ruby-style variable name to JSON key.
32
38
  def self.attribute_map
33
39
  {
@@ -35,7 +41,9 @@ module CyberSource
35
41
  :'network_routing_order' => :'networkRoutingOrder',
36
42
  :'commerce_indicator' => :'commerceIndicator',
37
43
  :'reconciliation_id' => :'reconciliationId',
38
- :'payouts_options' => :'payoutsOptions'
44
+ :'payouts_options' => :'payoutsOptions',
45
+ :'transaction_reason' => :'transactionReason',
46
+ :'purpose_of_payment' => :'purposeOfPayment'
39
47
  }
40
48
  end
41
49
 
@@ -46,7 +54,9 @@ module CyberSource
46
54
  :'network_routing_order' => :'String',
47
55
  :'commerce_indicator' => :'String',
48
56
  :'reconciliation_id' => :'String',
49
- :'payouts_options' => :'Ptsv2payoutsProcessingInformationPayoutsOptions'
57
+ :'payouts_options' => :'Ptsv2payoutsProcessingInformationPayoutsOptions',
58
+ :'transaction_reason' => :'String',
59
+ :'purpose_of_payment' => :'String'
50
60
  }
51
61
  end
52
62
 
@@ -77,6 +87,14 @@ module CyberSource
77
87
  if attributes.has_key?(:'payoutsOptions')
78
88
  self.payouts_options = attributes[:'payoutsOptions']
79
89
  end
90
+
91
+ if attributes.has_key?(:'transactionReason')
92
+ self.transaction_reason = attributes[:'transactionReason']
93
+ end
94
+
95
+ if attributes.has_key?(:'purposeOfPayment')
96
+ self.purpose_of_payment = attributes[:'purposeOfPayment']
97
+ end
80
98
  end
81
99
 
82
100
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -116,6 +134,18 @@ module CyberSource
116
134
  @reconciliation_id = reconciliation_id
117
135
  end
118
136
 
137
+ # Custom attribute writer method with validation
138
+ # @param [Object] transaction_reason Value to be assigned
139
+ def transaction_reason=(transaction_reason)
140
+ @transaction_reason = transaction_reason
141
+ end
142
+
143
+ # Custom attribute writer method with validation
144
+ # @param [Object] purpose_of_payment Value to be assigned
145
+ def purpose_of_payment=(purpose_of_payment)
146
+ @purpose_of_payment = purpose_of_payment
147
+ end
148
+
119
149
  # Checks equality by comparing each attribute.
120
150
  # @param [Object] Object to be compared
121
151
  def ==(o)
@@ -125,7 +155,9 @@ module CyberSource
125
155
  network_routing_order == o.network_routing_order &&
126
156
  commerce_indicator == o.commerce_indicator &&
127
157
  reconciliation_id == o.reconciliation_id &&
128
- payouts_options == o.payouts_options
158
+ payouts_options == o.payouts_options &&
159
+ transaction_reason == o.transaction_reason &&
160
+ purpose_of_payment == o.purpose_of_payment
129
161
  end
130
162
 
131
163
  # @see the `==` method
@@ -137,7 +169,7 @@ module CyberSource
137
169
  # Calculates hash code according to all attributes.
138
170
  # @return [Fixnum] Hash code
139
171
  def hash
140
- [business_application_id, network_routing_order, commerce_indicator, reconciliation_id, payouts_options].hash
172
+ [business_application_id, network_routing_order, commerce_indicator, reconciliation_id, payouts_options, transaction_reason, purpose_of_payment].hash
141
173
  end
142
174
 
143
175
  # Builds the object from hash
@@ -20,6 +20,9 @@ module CyberSource
20
20
  # Middle Initial of recipient. Required only for FDCCompass.
21
21
  attr_accessor :middle_initial
22
22
 
23
+ # Recipient’s middle name. This field is a _passthrough_, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor.
24
+ attr_accessor :middle_name
25
+
23
26
  # Last name of recipient. characters. * CTV (14) * Paymentech (30)
24
27
  attr_accessor :last_name
25
28
 
@@ -49,6 +52,7 @@ module CyberSource
49
52
  {
50
53
  :'first_name' => :'firstName',
51
54
  :'middle_initial' => :'middleInitial',
55
+ :'middle_name' => :'middleName',
52
56
  :'last_name' => :'lastName',
53
57
  :'address1' => :'address1',
54
58
  :'locality' => :'locality',
@@ -65,6 +69,7 @@ module CyberSource
65
69
  {
66
70
  :'first_name' => :'String',
67
71
  :'middle_initial' => :'String',
72
+ :'middle_name' => :'String',
68
73
  :'last_name' => :'String',
69
74
  :'address1' => :'String',
70
75
  :'locality' => :'String',
@@ -92,6 +97,10 @@ module CyberSource
92
97
  self.middle_initial = attributes[:'middleInitial']
93
98
  end
94
99
 
100
+ if attributes.has_key?(:'middleName')
101
+ self.middle_name = attributes[:'middleName']
102
+ end
103
+
95
104
  if attributes.has_key?(:'lastName')
96
105
  self.last_name = attributes[:'lastName']
97
106
  end
@@ -150,6 +159,12 @@ module CyberSource
150
159
  @middle_initial = middle_initial
151
160
  end
152
161
 
162
+ # Custom attribute writer method with validation
163
+ # @param [Object] middle_name Value to be assigned
164
+ def middle_name=(middle_name)
165
+ @middle_name = middle_name
166
+ end
167
+
153
168
  # Custom attribute writer method with validation
154
169
  # @param [Object] last_name Value to be assigned
155
170
  def last_name=(last_name)
@@ -205,6 +220,7 @@ module CyberSource
205
220
  self.class == o.class &&
206
221
  first_name == o.first_name &&
207
222
  middle_initial == o.middle_initial &&
223
+ middle_name == o.middle_name &&
208
224
  last_name == o.last_name &&
209
225
  address1 == o.address1 &&
210
226
  locality == o.locality &&
@@ -224,7 +240,7 @@ module CyberSource
224
240
  # Calculates hash code according to all attributes.
225
241
  # @return [Fixnum] Hash code
226
242
  def hash
227
- [first_name, middle_initial, last_name, address1, locality, administrative_area, country, postal_code, phone_number, date_of_birth].hash
243
+ [first_name, middle_initial, middle_name, last_name, address1, locality, administrative_area, country, postal_code, phone_number, date_of_birth].hash
228
244
  end
229
245
 
230
246
  # Builds the object from hash
@@ -25,6 +25,9 @@ module CyberSource
25
25
  # Recipient middle initial (Optional).
26
26
  attr_accessor :middle_initial
27
27
 
28
+ # Sender’s middle name. This field is a _passthrough_, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor.
29
+ attr_accessor :middle_name
30
+
28
31
  # Recipient last name (Optional). * CTV (14) * Paymentech (30)
29
32
  attr_accessor :last_name
30
33
 
@@ -62,6 +65,7 @@ module CyberSource
62
65
  :'account' => :'account',
63
66
  :'first_name' => :'firstName',
64
67
  :'middle_initial' => :'middleInitial',
68
+ :'middle_name' => :'middleName',
65
69
  :'last_name' => :'lastName',
66
70
  :'name' => :'name',
67
71
  :'address1' => :'address1',
@@ -82,6 +86,7 @@ module CyberSource
82
86
  :'account' => :'Ptsv2payoutsSenderInformationAccount',
83
87
  :'first_name' => :'String',
84
88
  :'middle_initial' => :'String',
89
+ :'middle_name' => :'String',
85
90
  :'last_name' => :'String',
86
91
  :'name' => :'String',
87
92
  :'address1' => :'String',
@@ -119,6 +124,10 @@ module CyberSource
119
124
  self.middle_initial = attributes[:'middleInitial']
120
125
  end
121
126
 
127
+ if attributes.has_key?(:'middleName')
128
+ self.middle_name = attributes[:'middleName']
129
+ end
130
+
122
131
  if attributes.has_key?(:'lastName')
123
132
  self.last_name = attributes[:'lastName']
124
133
  end
@@ -191,6 +200,12 @@ module CyberSource
191
200
  @middle_initial = middle_initial
192
201
  end
193
202
 
203
+ # Custom attribute writer method with validation
204
+ # @param [Object] middle_name Value to be assigned
205
+ def middle_name=(middle_name)
206
+ @middle_name = middle_name
207
+ end
208
+
194
209
  # Custom attribute writer method with validation
195
210
  # @param [Object] last_name Value to be assigned
196
211
  def last_name=(last_name)
@@ -260,6 +275,7 @@ module CyberSource
260
275
  account == o.account &&
261
276
  first_name == o.first_name &&
262
277
  middle_initial == o.middle_initial &&
278
+ middle_name == o.middle_name &&
263
279
  last_name == o.last_name &&
264
280
  name == o.name &&
265
281
  address1 == o.address1 &&
@@ -281,7 +297,7 @@ module CyberSource
281
297
  # Calculates hash code according to all attributes.
282
298
  # @return [Fixnum] Hash code
283
299
  def hash
284
- [reference_number, account, first_name, middle_initial, last_name, name, address1, locality, administrative_area, country_code, postal_code, phone_number, date_of_birth, vat_registration_number].hash
300
+ [reference_number, account, first_name, middle_initial, middle_name, last_name, name, address1, locality, administrative_area, country_code, postal_code, phone_number, date_of_birth, vat_registration_number].hash
285
301
  end
286
302
 
287
303
  # Builds the object from hash