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
@@ -29,6 +29,9 @@ module CyberSource
29
29
  # Boolean that indicates whether request contains the device fingerprint information. Values: - `true`: Use raw fingerprintSessionId when looking up device details. - `false` (default): Use merchant id + fingerprintSessionId as the session id for Device detail collection.
30
30
  attr_accessor :use_raw_fingerprint_session_id
31
31
 
32
+ # The device type at the client side.
33
+ attr_accessor :device_type
34
+
32
35
  attr_accessor :raw_data
33
36
 
34
37
  # Value of the Accept header sent by the customer’s web browser. **Note** If the customer’s browser provides a value, you must include it in your request.
@@ -72,6 +75,7 @@ module CyberSource
72
75
  :'user_agent' => :'userAgent',
73
76
  :'fingerprint_session_id' => :'fingerprintSessionId',
74
77
  :'use_raw_fingerprint_session_id' => :'useRawFingerprintSessionId',
78
+ :'device_type' => :'deviceType',
75
79
  :'raw_data' => :'rawData',
76
80
  :'http_accept_browser_value' => :'httpAcceptBrowserValue',
77
81
  :'http_accept_content' => :'httpAcceptContent',
@@ -95,6 +99,7 @@ module CyberSource
95
99
  :'user_agent' => :'String',
96
100
  :'fingerprint_session_id' => :'String',
97
101
  :'use_raw_fingerprint_session_id' => :'BOOLEAN',
102
+ :'device_type' => :'String',
98
103
  :'raw_data' => :'Array<Ptsv2paymentsDeviceInformationRawData>',
99
104
  :'http_accept_browser_value' => :'String',
100
105
  :'http_accept_content' => :'String',
@@ -138,6 +143,10 @@ module CyberSource
138
143
  self.use_raw_fingerprint_session_id = attributes[:'useRawFingerprintSessionId']
139
144
  end
140
145
 
146
+ if attributes.has_key?(:'deviceType')
147
+ self.device_type = attributes[:'deviceType']
148
+ end
149
+
141
150
  if attributes.has_key?(:'rawData')
142
151
  if (value = attributes[:'rawData']).is_a?(Array)
143
152
  self.raw_data = value
@@ -220,6 +229,12 @@ module CyberSource
220
229
  @user_agent = user_agent
221
230
  end
222
231
 
232
+ # Custom attribute writer method with validation
233
+ # @param [Object] device_type Value to be assigned
234
+ def device_type=(device_type)
235
+ @device_type = device_type
236
+ end
237
+
223
238
  # Custom attribute writer method with validation
224
239
  # @param [Object] http_accept_browser_value Value to be assigned
225
240
  def http_accept_browser_value=(http_accept_browser_value)
@@ -278,6 +293,7 @@ module CyberSource
278
293
  user_agent == o.user_agent &&
279
294
  fingerprint_session_id == o.fingerprint_session_id &&
280
295
  use_raw_fingerprint_session_id == o.use_raw_fingerprint_session_id &&
296
+ device_type == o.device_type &&
281
297
  raw_data == o.raw_data &&
282
298
  http_accept_browser_value == o.http_accept_browser_value &&
283
299
  http_accept_content == o.http_accept_content &&
@@ -301,7 +317,7 @@ module CyberSource
301
317
  # Calculates hash code according to all attributes.
302
318
  # @return [Fixnum] Hash code
303
319
  def hash
304
- [host_name, ip_address, user_agent, fingerprint_session_id, use_raw_fingerprint_session_id, raw_data, http_accept_browser_value, http_accept_content, http_browser_email, http_browser_language, http_browser_java_enabled, http_browser_java_script_enabled, http_browser_color_depth, http_browser_screen_height, http_browser_screen_width, http_browser_time_difference, user_agent_browser_value].hash
320
+ [host_name, ip_address, user_agent, fingerprint_session_id, use_raw_fingerprint_session_id, device_type, raw_data, http_accept_browser_value, http_accept_content, http_browser_email, http_browser_language, http_browser_java_enabled, http_browser_java_script_enabled, http_browser_color_depth, http_browser_screen_height, http_browser_screen_width, http_browser_time_difference, user_agent_browser_value].hash
305
321
  end
306
322
 
307
323
  # Builds the object from hash
@@ -53,6 +53,12 @@ module CyberSource
53
53
  # Amount of the first installment payment. The issuer provides this value when the first installment payment is successful. This field is supported for Mastercard installment payments on CyberSource through VisaNet in all countries except Brazil,Croatia, Georgia, and Greece. The value for this field corresponds to the following data in the TC 33 capture file: - Record: CP01 TCR5 - Position: 23-34 - Field: Amount of Each Installment
54
54
  attr_accessor :first_installment_amount
55
55
 
56
+ # Standing Instruction/Installment validation indicator. - '1': Prevalidated - '2': Not Validated
57
+ attr_accessor :validation_indicator
58
+
59
+ # Standing Instruction/Installment identifier.
60
+ attr_accessor :identifier
61
+
56
62
  # Attribute mapping from ruby-style variable name to JSON key.
57
63
  def self.attribute_map
58
64
  {
@@ -68,7 +74,9 @@ module CyberSource
68
74
  :'eligibility_inquiry' => :'eligibilityInquiry',
69
75
  :'grace_period_duration' => :'gracePeriodDuration',
70
76
  :'grace_period_duration_type' => :'gracePeriodDurationType',
71
- :'first_installment_amount' => :'firstInstallmentAmount'
77
+ :'first_installment_amount' => :'firstInstallmentAmount',
78
+ :'validation_indicator' => :'validationIndicator',
79
+ :'identifier' => :'identifier'
72
80
  }
73
81
  end
74
82
 
@@ -87,7 +95,9 @@ module CyberSource
87
95
  :'eligibility_inquiry' => :'String',
88
96
  :'grace_period_duration' => :'String',
89
97
  :'grace_period_duration_type' => :'String',
90
- :'first_installment_amount' => :'String'
98
+ :'first_installment_amount' => :'String',
99
+ :'validation_indicator' => :'String',
100
+ :'identifier' => :'String'
91
101
  }
92
102
  end
93
103
 
@@ -150,6 +160,14 @@ module CyberSource
150
160
  if attributes.has_key?(:'firstInstallmentAmount')
151
161
  self.first_installment_amount = attributes[:'firstInstallmentAmount']
152
162
  end
163
+
164
+ if attributes.has_key?(:'validationIndicator')
165
+ self.validation_indicator = attributes[:'validationIndicator']
166
+ end
167
+
168
+ if attributes.has_key?(:'identifier')
169
+ self.identifier = attributes[:'identifier']
170
+ end
153
171
  end
154
172
 
155
173
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -272,7 +290,9 @@ module CyberSource
272
290
  eligibility_inquiry == o.eligibility_inquiry &&
273
291
  grace_period_duration == o.grace_period_duration &&
274
292
  grace_period_duration_type == o.grace_period_duration_type &&
275
- first_installment_amount == o.first_installment_amount
293
+ first_installment_amount == o.first_installment_amount &&
294
+ validation_indicator == o.validation_indicator &&
295
+ identifier == o.identifier
276
296
  end
277
297
 
278
298
  # @see the `==` method
@@ -284,7 +304,7 @@ module CyberSource
284
304
  # Calculates hash code according to all attributes.
285
305
  # @return [Fixnum] Hash code
286
306
  def hash
287
- [amount, frequency, plan_type, sequence, total_amount, total_count, first_installment_date, invoice_data, payment_type, eligibility_inquiry, grace_period_duration, grace_period_duration_type, first_installment_amount].hash
307
+ [amount, frequency, plan_type, sequence, total_amount, total_count, first_installment_date, invoice_data, payment_type, eligibility_inquiry, grace_period_duration, grace_period_duration_type, first_installment_amount, validation_indicator, identifier].hash
288
308
  end
289
309
 
290
310
  # Builds the object from hash
@@ -0,0 +1,191 @@
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
+ # invoice Details
17
+ class Ptsv2paymentsInvoiceDetails
18
+ # Barcode ID scanned from the Payment Application.
19
+ attr_accessor :barcode_number
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'barcode_number' => :'barcodeNumber'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.swagger_types
30
+ {
31
+ :'barcode_number' => :'String'
32
+ }
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ return unless attributes.is_a?(Hash)
39
+
40
+ # convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
42
+
43
+ if attributes.has_key?(:'barcodeNumber')
44
+ self.barcode_number = attributes[:'barcodeNumber']
45
+ end
46
+ end
47
+
48
+ # Show invalid properties with the reasons. Usually used together with valid?
49
+ # @return Array for valid properties with the reasons
50
+ def list_invalid_properties
51
+ invalid_properties = Array.new
52
+ invalid_properties
53
+ end
54
+
55
+ # Check to see if the all the properties in the model are valid
56
+ # @return true if the model is valid
57
+ def valid?
58
+ true
59
+ end
60
+
61
+ # Custom attribute writer method with validation
62
+ # @param [Object] barcode_number Value to be assigned
63
+ def barcode_number=(barcode_number)
64
+ @barcode_number = barcode_number
65
+ end
66
+
67
+ # Checks equality by comparing each attribute.
68
+ # @param [Object] Object to be compared
69
+ def ==(o)
70
+ return true if self.equal?(o)
71
+ self.class == o.class &&
72
+ barcode_number == o.barcode_number
73
+ end
74
+
75
+ # @see the `==` method
76
+ # @param [Object] Object to be compared
77
+ def eql?(o)
78
+ self == o
79
+ end
80
+
81
+ # Calculates hash code according to all attributes.
82
+ # @return [Fixnum] Hash code
83
+ def hash
84
+ [barcode_number].hash
85
+ end
86
+
87
+ # Builds the object from hash
88
+ # @param [Hash] attributes Model attributes in the form of hash
89
+ # @return [Object] Returns the model itself
90
+ def build_from_hash(attributes)
91
+ return nil unless attributes.is_a?(Hash)
92
+ self.class.swagger_types.each_pair do |key, type|
93
+ if type =~ /\AArray<(.*)>/i
94
+ # check to ensure the input is an array given that the the attribute
95
+ # is documented as an array but the input is not
96
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
97
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
98
+ end
99
+ elsif !attributes[self.class.attribute_map[key]].nil?
100
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
101
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
102
+ end
103
+
104
+ self
105
+ end
106
+
107
+ # Deserializes the data based on type
108
+ # @param string type Data type
109
+ # @param string value Value to be deserialized
110
+ # @return [Object] Deserialized data
111
+ def _deserialize(type, value)
112
+ case type.to_sym
113
+ when :DateTime
114
+ DateTime.parse(value)
115
+ when :Date
116
+ Date.parse(value)
117
+ when :String
118
+ value.to_s
119
+ when :Integer
120
+ value.to_i
121
+ when :Float
122
+ value.to_f
123
+ when :BOOLEAN
124
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
125
+ true
126
+ else
127
+ false
128
+ end
129
+ when :Object
130
+ # generic object (usually a Hash), return directly
131
+ value
132
+ when /\AArray<(?<inner_type>.+)>\z/
133
+ inner_type = Regexp.last_match[:inner_type]
134
+ value.map { |v| _deserialize(inner_type, v) }
135
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
136
+ k_type = Regexp.last_match[:k_type]
137
+ v_type = Regexp.last_match[:v_type]
138
+ {}.tap do |hash|
139
+ value.each do |k, v|
140
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
141
+ end
142
+ end
143
+ else # model
144
+ temp_model = CyberSource.const_get(type).new
145
+ temp_model.build_from_hash(value)
146
+ end
147
+ end
148
+
149
+ # Returns the string representation of the object
150
+ # @return [String] String presentation of the object
151
+ def to_s
152
+ to_hash.to_s
153
+ end
154
+
155
+ # to_body is an alias to to_hash (backward compatibility)
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_body
158
+ to_hash
159
+ end
160
+
161
+ # Returns the object in the form of hash
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_hash
164
+ hash = {}
165
+ self.class.attribute_map.each_pair do |attr, param|
166
+ value = self.send(attr)
167
+ next if value.nil?
168
+ hash[param] = _to_hash(value)
169
+ end
170
+ hash
171
+ end
172
+
173
+ # Outputs non-array value in the form of hash
174
+ # For object, use to_hash. Otherwise, just return the value
175
+ # @param [Object] value Any valid value
176
+ # @return [Hash] Returns the value in the form of hash
177
+ def _to_hash(value)
178
+ if value.is_a?(Array)
179
+ value.compact.map { |v| _to_hash(v) }
180
+ elsif value.is_a?(Hash)
181
+ {}.tap do |hash|
182
+ value.each { |k, v| hash[k] = _to_hash(v) }
183
+ end
184
+ elsif value.respond_to? :to_hash
185
+ value.to_hash
186
+ else
187
+ value
188
+ end
189
+ end
190
+ end
191
+ end
@@ -16,6 +16,9 @@ module CyberSource
16
16
  class Ptsv2paymentsMerchantInformation
17
17
  attr_accessor :merchant_descriptor
18
18
 
19
+ # This field will contain either the merchant url or the reverse domain as per the requirement for DSRP Format 3. This might vary transaction to transaction and might not be static. Merchant needs to have access to send this value for all DSRP program.
20
+ attr_accessor :domain_name
21
+
19
22
  # Company ID assigned to an independent sales organization. Get this value from Mastercard. #### CyberSource through VisaNet The value for this field corresponds to the following data in the TC 33 capture file: - Record: CP01 TCR6 - Position: 106-116 - Field: Mastercard Independent Sales Organization ID **Note** The TC 33 Capture file contains information about the purchases and refunds that a merchant submits to CyberSource. CyberSource through VisaNet creates the TC 33 Capture file at the end of the day and sends it to the merchant’s acquirer, who uses this information to facilitate end-of-day clearing processing with payment card companies. For processor-specific information, see the `sales_organization_ID` field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
20
23
  attr_accessor :sales_organization_id
21
24
 
@@ -39,6 +42,15 @@ module CyberSource
39
42
 
40
43
  attr_accessor :service_fee_descriptor
41
44
 
45
+ # customer would be redirected to this url based on the decision of the transaction
46
+ attr_accessor :cancel_url
47
+
48
+ # customer would be redirected to this url based on the decision of the transaction
49
+ attr_accessor :success_url
50
+
51
+ # customer would be redirected to this url based on the decision of the transaction
52
+ attr_accessor :failure_url
53
+
42
54
  # Use this field only if you are requesting payment with Payer Authentication serice together. Your company’s name as you want it to appear to the customer in the issuing bank’s authentication form. This value overrides the value specified by your merchant bank.
43
55
  attr_accessor :merchant_name
44
56
 
@@ -46,6 +58,7 @@ module CyberSource
46
58
  def self.attribute_map
47
59
  {
48
60
  :'merchant_descriptor' => :'merchantDescriptor',
61
+ :'domain_name' => :'domainName',
49
62
  :'sales_organization_id' => :'salesOrganizationId',
50
63
  :'category_code' => :'categoryCode',
51
64
  :'category_code_domestic' => :'categoryCodeDomestic',
@@ -54,6 +67,9 @@ module CyberSource
54
67
  :'card_acceptor_reference_number' => :'cardAcceptorReferenceNumber',
55
68
  :'transaction_local_date_time' => :'transactionLocalDateTime',
56
69
  :'service_fee_descriptor' => :'serviceFeeDescriptor',
70
+ :'cancel_url' => :'cancelUrl',
71
+ :'success_url' => :'successUrl',
72
+ :'failure_url' => :'failureUrl',
57
73
  :'merchant_name' => :'merchantName'
58
74
  }
59
75
  end
@@ -62,6 +78,7 @@ module CyberSource
62
78
  def self.swagger_types
63
79
  {
64
80
  :'merchant_descriptor' => :'Ptsv2paymentsMerchantInformationMerchantDescriptor',
81
+ :'domain_name' => :'String',
65
82
  :'sales_organization_id' => :'String',
66
83
  :'category_code' => :'Integer',
67
84
  :'category_code_domestic' => :'Integer',
@@ -70,6 +87,9 @@ module CyberSource
70
87
  :'card_acceptor_reference_number' => :'String',
71
88
  :'transaction_local_date_time' => :'String',
72
89
  :'service_fee_descriptor' => :'Ptsv2paymentsMerchantInformationServiceFeeDescriptor',
90
+ :'cancel_url' => :'String',
91
+ :'success_url' => :'String',
92
+ :'failure_url' => :'String',
73
93
  :'merchant_name' => :'String'
74
94
  }
75
95
  end
@@ -86,6 +106,10 @@ module CyberSource
86
106
  self.merchant_descriptor = attributes[:'merchantDescriptor']
87
107
  end
88
108
 
109
+ if attributes.has_key?(:'domainName')
110
+ self.domain_name = attributes[:'domainName']
111
+ end
112
+
89
113
  if attributes.has_key?(:'salesOrganizationId')
90
114
  self.sales_organization_id = attributes[:'salesOrganizationId']
91
115
  end
@@ -118,6 +142,18 @@ module CyberSource
118
142
  self.service_fee_descriptor = attributes[:'serviceFeeDescriptor']
119
143
  end
120
144
 
145
+ if attributes.has_key?(:'cancelUrl')
146
+ self.cancel_url = attributes[:'cancelUrl']
147
+ end
148
+
149
+ if attributes.has_key?(:'successUrl')
150
+ self.success_url = attributes[:'successUrl']
151
+ end
152
+
153
+ if attributes.has_key?(:'failureUrl')
154
+ self.failure_url = attributes[:'failureUrl']
155
+ end
156
+
121
157
  if attributes.has_key?(:'merchantName')
122
158
  self.merchant_name = attributes[:'merchantName']
123
159
  end
@@ -146,6 +182,12 @@ module CyberSource
146
182
  true
147
183
  end
148
184
 
185
+ # Custom attribute writer method with validation
186
+ # @param [Object] domain_name Value to be assigned
187
+ def domain_name=(domain_name)
188
+ @domain_name = domain_name
189
+ end
190
+
149
191
  # Custom attribute writer method with validation
150
192
  # @param [Object] sales_organization_id Value to be assigned
151
193
  def sales_organization_id=(sales_organization_id)
@@ -196,6 +238,24 @@ module CyberSource
196
238
  @transaction_local_date_time = transaction_local_date_time
197
239
  end
198
240
 
241
+ # Custom attribute writer method with validation
242
+ # @param [Object] cancel_url Value to be assigned
243
+ def cancel_url=(cancel_url)
244
+ @cancel_url = cancel_url
245
+ end
246
+
247
+ # Custom attribute writer method with validation
248
+ # @param [Object] success_url Value to be assigned
249
+ def success_url=(success_url)
250
+ @success_url = success_url
251
+ end
252
+
253
+ # Custom attribute writer method with validation
254
+ # @param [Object] failure_url Value to be assigned
255
+ def failure_url=(failure_url)
256
+ @failure_url = failure_url
257
+ end
258
+
199
259
  # Custom attribute writer method with validation
200
260
  # @param [Object] merchant_name Value to be assigned
201
261
  def merchant_name=(merchant_name)
@@ -208,6 +268,7 @@ module CyberSource
208
268
  return true if self.equal?(o)
209
269
  self.class == o.class &&
210
270
  merchant_descriptor == o.merchant_descriptor &&
271
+ domain_name == o.domain_name &&
211
272
  sales_organization_id == o.sales_organization_id &&
212
273
  category_code == o.category_code &&
213
274
  category_code_domestic == o.category_code_domestic &&
@@ -216,6 +277,9 @@ module CyberSource
216
277
  card_acceptor_reference_number == o.card_acceptor_reference_number &&
217
278
  transaction_local_date_time == o.transaction_local_date_time &&
218
279
  service_fee_descriptor == o.service_fee_descriptor &&
280
+ cancel_url == o.cancel_url &&
281
+ success_url == o.success_url &&
282
+ failure_url == o.failure_url &&
219
283
  merchant_name == o.merchant_name
220
284
  end
221
285
 
@@ -228,7 +292,7 @@ module CyberSource
228
292
  # Calculates hash code according to all attributes.
229
293
  # @return [Fixnum] Hash code
230
294
  def hash
231
- [merchant_descriptor, sales_organization_id, category_code, category_code_domestic, tax_id, vat_registration_number, card_acceptor_reference_number, transaction_local_date_time, service_fee_descriptor, merchant_name].hash
295
+ [merchant_descriptor, domain_name, sales_organization_id, category_code, category_code_domestic, tax_id, vat_registration_number, card_acceptor_reference_number, transaction_local_date_time, service_fee_descriptor, cancel_url, success_url, failure_url, merchant_name].hash
232
296
  end
233
297
 
234
298
  # Builds the object from hash
@@ -38,7 +38,7 @@ module CyberSource
38
38
  # The state where the merchant is located. #### PIN debit State code or region code for your business. Use the Use the [State, Province, and Territory Codes for the United States and Canada](https://developer.cybersource.com/library/documentation/sbc/quickref/states_and_provinces.pdf) This value might be displayed on the cardholder’s statement. When you do not include this value in your PIN debit request, the merchant name from your account is used. **Important** This value must consist of English characters. **Note** This field is supported only for businesses located in the U.S. or Canada. Optional field for PIN debit credit or PIN debit purchase.
39
39
  attr_accessor :administrative_area
40
40
 
41
- # Merchnat phone as contact information for CNP transactions
41
+ # Merchant phone as contact information for CNP transactions
42
42
  attr_accessor :phone
43
43
 
44
44
  # Address of company's website provided by merchant
@@ -17,6 +17,9 @@ module CyberSource
17
17
  # Grand total for the order. This value cannot be negative. You can include a decimal point (.), but no other special characters. CyberSource truncates the amount to the correct number of decimal places. **Note** For CTV, FDCCompass, Paymentech processors, the maximum length for this field is 12. **Important** Some processors have specific requirements and limitations, such as maximum amounts and maximum field lengths. For details, see: - \"Authorization Information for Specific Processors\" in the [Credit Card Services Using the SCMP API Guide](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/). - \"Capture Information for Specific Processors\" in the [Credit Card Services Using the SCMP API Guide](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/). - \"Credit Information for Specific Processors\" in the [Credit Card Services Using the SCMP API Guide](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/). If your processor supports zero amount authorizations, you can set this field to 0 for the authorization to check if the card is lost or stolen. For details, see \"Zero Amount Authorizations,\" \"Credit Information for Specific Processors\" in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/) #### Card Present Required to include either this field or `orderInformation.lineItems[].unitPrice` for the order. #### Invoicing Required for creating a new invoice. #### PIN Debit Amount you requested for the PIN debit purchase. This value is returned for partial authorizations. The issuing bank can approve a partial amount if the balance on the debit card is less than the requested transaction amount. Required field for PIN Debit purchase and PIN Debit credit requests. Optional field for PIN Debit reversal requests. #### GPX This field is optional for reversing an authorization or credit; however, for all other processors, these fields are required. #### DCC with a Third-Party Provider Set this field to the converted amount that was returned by the DCC provider. You must include either this field or the 1st line item in the order and the specific line-order amount in your request. For details, see `grand_total_amount` field description in [Dynamic Currency Conversion For First Data Using the SCMP API](http://apps.cybersource.com/library/documentation/dev_guides/DCC_FirstData_SCMP/DCC_FirstData_SCMP_API.pdf). #### FDMS South If you accept IDR or CLP currencies, see the entry for FDMS South in \"Authorization Information for Specific Processors\" of the [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/) #### DCC for First Data Not used.
18
18
  attr_accessor :total_amount
19
19
 
20
+ # Subtotal amount of all the items.This amount (which is the value of all items in the cart, not including the additional amounts such as tax, shipping, etc.) cannot change after a sessions request. When there is a change to any of the additional amounts, this field should be resent in the order request. When the sub total amount changes, you must initiate a new transaction starting with a sessions request. Note The amount value must be a non-negative number containing 2 decimal places and limited to 7 digits before the decimal point. This value can not be changed after a sessions request.
21
+ attr_accessor :sub_total_amount
22
+
20
23
  # Currency used for the order. Use the three-character [ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf) #### Used by **Authorization** Required field. **Authorization Reversal** For an authorization reversal (`reversalInformation`) or a capture (`processingOptions.capture` is set to `true`), you must use the same currency that you used in your payment authorization request. #### PIN Debit Currency for the amount you requested for the PIN debit purchase. This value is returned for partial authorizations. The issuing bank can approve a partial amount if the balance on the debit card is less than the requested transaction amount. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Returned by PIN debit purchase. For PIN debit reversal requests, you must use the same currency that was used for the PIN debit purchase or PIN debit credit that you are reversing. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Required field for PIN Debit purchase and PIN Debit credit requests. Optional field for PIN Debit reversal requests. #### GPX This field is optional for reversing an authorization or credit. #### DCC for First Data Your local currency. For details, see the `currency` field description in [Dynamic Currency Conversion For First Data Using the SCMP API](http://apps.cybersource.com/library/documentation/dev_guides/DCC_FirstData_SCMP/DCC_FirstData_SCMP_API.pdf). #### Tax Calculation Required for international tax and value added tax only. Optional for U.S. and Canadian taxes. Your local currency.
21
24
  attr_accessor :currency
22
25
 
@@ -89,6 +92,7 @@ module CyberSource
89
92
  def self.attribute_map
90
93
  {
91
94
  :'total_amount' => :'totalAmount',
95
+ :'sub_total_amount' => :'subTotalAmount',
92
96
  :'currency' => :'currency',
93
97
  :'discount_amount' => :'discountAmount',
94
98
  :'duty_amount' => :'dutyAmount',
@@ -120,6 +124,7 @@ module CyberSource
120
124
  def self.swagger_types
121
125
  {
122
126
  :'total_amount' => :'String',
127
+ :'sub_total_amount' => :'String',
123
128
  :'currency' => :'String',
124
129
  :'discount_amount' => :'String',
125
130
  :'duty_amount' => :'String',
@@ -159,6 +164,10 @@ module CyberSource
159
164
  self.total_amount = attributes[:'totalAmount']
160
165
  end
161
166
 
167
+ if attributes.has_key?(:'subTotalAmount')
168
+ self.sub_total_amount = attributes[:'subTotalAmount']
169
+ end
170
+
162
171
  if attributes.has_key?(:'currency')
163
172
  self.currency = attributes[:'currency']
164
173
  end
@@ -279,6 +288,12 @@ module CyberSource
279
288
  @total_amount = total_amount
280
289
  end
281
290
 
291
+ # Custom attribute writer method with validation
292
+ # @param [Object] sub_total_amount Value to be assigned
293
+ def sub_total_amount=(sub_total_amount)
294
+ @sub_total_amount = sub_total_amount
295
+ end
296
+
282
297
  # Custom attribute writer method with validation
283
298
  # @param [Object] currency Value to be assigned
284
299
  def currency=(currency)
@@ -405,6 +420,7 @@ module CyberSource
405
420
  return true if self.equal?(o)
406
421
  self.class == o.class &&
407
422
  total_amount == o.total_amount &&
423
+ sub_total_amount == o.sub_total_amount &&
408
424
  currency == o.currency &&
409
425
  discount_amount == o.discount_amount &&
410
426
  duty_amount == o.duty_amount &&
@@ -440,7 +456,7 @@ module CyberSource
440
456
  # Calculates hash code according to all attributes.
441
457
  # @return [Fixnum] Hash code
442
458
  def hash
443
- [total_amount, currency, discount_amount, duty_amount, gratuity_amount, tax_amount, national_tax_included, tax_applied_after_discount, tax_applied_level, tax_type_code, freight_amount, foreign_amount, foreign_currency, exchange_rate, exchange_rate_time_stamp, surcharge, settlement_amount, settlement_currency, amex_additional_amounts, tax_details, service_fee_amount, original_amount, original_currency, cashback_amount, currency_conversion].hash
459
+ [total_amount, sub_total_amount, currency, discount_amount, duty_amount, gratuity_amount, tax_amount, national_tax_included, tax_applied_after_discount, tax_applied_level, tax_type_code, freight_amount, foreign_amount, foreign_currency, exchange_rate, exchange_rate_time_stamp, surcharge, settlement_amount, settlement_currency, amex_additional_amounts, tax_details, service_fee_amount, original_amount, original_currency, cashback_amount, currency_conversion].hash
444
460
  end
445
461
 
446
462
  # Builds the object from hash
@@ -58,6 +58,9 @@ module CyberSource
58
58
  # Date of the tax calculation. Use format YYYYMMDD. You can provide a date in the past if you are calculating tax for a refund and want to know what the tax was on the date the order was placed. You can provide a date in the future if you are calculating the tax for a future date, such as an upcoming tax holiday. The default is the date, in Pacific time, that the bank receives the request. Keep this in mind if you are in a different time zone and want the tax calculated with the rates that are applicable on a specific date. #### Tax Calculation Optional field for U.S., Canadian, international tax, and value added taxes.
59
59
  attr_accessor :invoice_date
60
60
 
61
+ # Cost centre of the merchant
62
+ attr_accessor :cost_center
63
+
61
64
  # Attribute mapping from ruby-style variable name to JSON key.
62
65
  def self.attribute_map
63
66
  {
@@ -75,7 +78,8 @@ module CyberSource
75
78
  :'reference_data_code' => :'referenceDataCode',
76
79
  :'reference_data_number' => :'referenceDataNumber',
77
80
  :'sales_slip_number' => :'salesSlipNumber',
78
- :'invoice_date' => :'invoiceDate'
81
+ :'invoice_date' => :'invoiceDate',
82
+ :'cost_center' => :'costCenter'
79
83
  }
80
84
  end
81
85
 
@@ -96,7 +100,8 @@ module CyberSource
96
100
  :'reference_data_code' => :'String',
97
101
  :'reference_data_number' => :'String',
98
102
  :'sales_slip_number' => :'Integer',
99
- :'invoice_date' => :'String'
103
+ :'invoice_date' => :'String',
104
+ :'cost_center' => :'String'
100
105
  }
101
106
  end
102
107
 
@@ -169,6 +174,10 @@ module CyberSource
169
174
  if attributes.has_key?(:'invoiceDate')
170
175
  self.invoice_date = attributes[:'invoiceDate']
171
176
  end
177
+
178
+ if attributes.has_key?(:'costCenter')
179
+ self.cost_center = attributes[:'costCenter']
180
+ end
172
181
  end
173
182
 
174
183
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -247,6 +256,12 @@ module CyberSource
247
256
  @invoice_date = invoice_date
248
257
  end
249
258
 
259
+ # Custom attribute writer method with validation
260
+ # @param [Object] cost_center Value to be assigned
261
+ def cost_center=(cost_center)
262
+ @cost_center = cost_center
263
+ end
264
+
250
265
  # Checks equality by comparing each attribute.
251
266
  # @param [Object] Object to be compared
252
267
  def ==(o)
@@ -266,7 +281,8 @@ module CyberSource
266
281
  reference_data_code == o.reference_data_code &&
267
282
  reference_data_number == o.reference_data_number &&
268
283
  sales_slip_number == o.sales_slip_number &&
269
- invoice_date == o.invoice_date
284
+ invoice_date == o.invoice_date &&
285
+ cost_center == o.cost_center
270
286
  end
271
287
 
272
288
  # @see the `==` method
@@ -278,7 +294,7 @@ module CyberSource
278
294
  # Calculates hash code according to all attributes.
279
295
  # @return [Fixnum] Hash code
280
296
  def hash
281
- [invoice_number, barcode_number, expiration_date, purchase_order_number, purchase_order_date, purchase_contact_name, taxable, vat_invoice_reference_number, commodity_code, merchandise_code, transaction_advice_addendum, reference_data_code, reference_data_number, sales_slip_number, invoice_date].hash
297
+ [invoice_number, barcode_number, expiration_date, purchase_order_number, purchase_order_date, purchase_contact_name, taxable, vat_invoice_reference_number, commodity_code, merchandise_code, transaction_advice_addendum, reference_data_code, reference_data_number, sales_slip_number, invoice_date, cost_center].hash
282
298
  end
283
299
 
284
300
  # Builds the object from hash