cybersource_rest_client 0.0.70 → 0.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client/api/batches_api.rb +9 -9
  3. data/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +3 -149
  4. data/lib/cybersource_rest_client/api/manage_webhooks_api.rb +20 -261
  5. data/lib/cybersource_rest_client/api/transaction_batches_api.rb +75 -0
  6. data/lib/cybersource_rest_client/models/generate_unified_checkout_capture_context_request.rb +1 -1
  7. data/lib/cybersource_rest_client/models/inline_response_200_2.rb +64 -26
  8. data/lib/cybersource_rest_client/models/{inline_response_200_5__embedded.rb → inline_response_200_2__embedded.rb} +2 -2
  9. data/lib/cybersource_rest_client/models/{inline_response_200_5__embedded__links.rb → inline_response_200_2__embedded__links.rb} +2 -2
  10. data/lib/cybersource_rest_client/models/{inline_response_200_5__embedded__links_reports.rb → inline_response_200_2__embedded__links_reports.rb} +1 -1
  11. data/lib/cybersource_rest_client/models/{inline_response_200_5__embedded_batches.rb → inline_response_200_2__embedded_batches.rb} +3 -3
  12. data/lib/cybersource_rest_client/models/{inline_response_200_5__embedded_totals.rb → inline_response_200_2__embedded_totals.rb} +1 -1
  13. data/lib/cybersource_rest_client/models/{inline_response_200_5__links.rb → inline_response_200_2__links.rb} +1 -1
  14. data/lib/cybersource_rest_client/models/inline_response_200_3.rb +75 -120
  15. data/lib/cybersource_rest_client/models/{inline_response_200_6__links.rb → inline_response_200_3__links.rb} +2 -2
  16. data/lib/cybersource_rest_client/models/{inline_response_200_6__links_report.rb → inline_response_200_3__links_report.rb} +1 -1
  17. data/lib/cybersource_rest_client/models/{inline_response_200_6_billing.rb → inline_response_200_3_billing.rb} +1 -1
  18. data/lib/cybersource_rest_client/models/inline_response_200_4.rb +83 -126
  19. data/lib/cybersource_rest_client/models/{inline_response_200_7_records.rb → inline_response_200_4_records.rb} +3 -3
  20. data/lib/cybersource_rest_client/models/{inline_response_200_7_response_record.rb → inline_response_200_4_response_record.rb} +2 -2
  21. data/lib/cybersource_rest_client/models/{inline_response_200_7_response_record_additional_updates.rb → inline_response_200_4_response_record_additional_updates.rb} +1 -1
  22. data/lib/cybersource_rest_client/models/{inline_response_200_7_source_record.rb → inline_response_200_4_source_record.rb} +1 -1
  23. data/lib/cybersource_rest_client/models/inline_response_201_4.rb +64 -134
  24. data/lib/cybersource_rest_client/models/inline_response_201_4_payloads.rb +189 -0
  25. data/lib/cybersource_rest_client/models/inline_response_201_4_payloads_test_payload.rb +190 -0
  26. data/lib/cybersource_rest_client/models/inline_response_201_5.rb +5 -25
  27. data/lib/cybersource_rest_client/models/model_400_upload_batch_file_response.rb +199 -0
  28. data/lib/cybersource_rest_client/models/payments_strong_auth_issuer_information.rb +22 -5
  29. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1.rb +25 -5
  30. data/lib/cybersource_rest_client/models/{inline_response_404_2.rb → pts_v2_payments_post201_response_1_error_information.rb} +4 -2
  31. data/lib/cybersource_rest_client/models/{inline_response_404_2_details.rb → pts_v2_payments_post201_response_1_error_information_details.rb} +3 -12
  32. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_issuer_information.rb +213 -0
  33. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_order_information.rb +15 -5
  34. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_order_information_amount_details.rb +196 -0
  35. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_payment_information.rb +11 -1
  36. data/lib/cybersource_rest_client/models/{notificationsubscriptionsv1webhooks_security_policy_1.rb → pts_v2_payments_post201_response_1_payment_information_e_wallet.rb} +30 -29
  37. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_processor_information.rb +41 -1
  38. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response.rb +11 -1
  39. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +1 -1
  40. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +1 -1
  41. data/lib/cybersource_rest_client/models/ptsv2payouts_recipient_information.rb +7 -7
  42. data/lib/cybersource_rest_client/models/ptsv2payouts_sender_information.rb +3 -3
  43. data/lib/cybersource_rest_client/models/ptsv2payouts_sender_information_account.rb +1 -1
  44. data/lib/cybersource_rest_client/models/save_asym_egress_key.rb +0 -10
  45. data/lib/cybersource_rest_client/models/save_sym_egress_key.rb +0 -10
  46. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_issuer_information.rb +22 -5
  47. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processor_information.rb +12 -1
  48. data/lib/cybersource_rest_client.rb +21 -32
  49. metadata +23 -34
  50. data/lib/cybersource_rest_client/api/replay_webhooks_api.rb +0 -98
  51. data/lib/cybersource_rest_client/models/create_webhook_request.rb +0 -289
  52. data/lib/cybersource_rest_client/models/inline_response_200_5.rb +0 -251
  53. data/lib/cybersource_rest_client/models/inline_response_200_6.rb +0 -290
  54. data/lib/cybersource_rest_client/models/inline_response_200_7.rb +0 -292
  55. data/lib/cybersource_rest_client/models/notificationsubscriptionsv1productsorganization_id_event_types.rb +0 -233
  56. data/lib/cybersource_rest_client/models/notificationsubscriptionsv1webhooks_notification_scope.rb +0 -205
  57. data/lib/cybersource_rest_client/models/notificationsubscriptionsv1webhooks_products.rb +0 -202
  58. data/lib/cybersource_rest_client/models/notificationsubscriptionsv1webhooks_retry_policy.rb +0 -270
  59. data/lib/cybersource_rest_client/models/notificationsubscriptionsv1webhooks_security_policy.rb +0 -201
  60. data/lib/cybersource_rest_client/models/notificationsubscriptionsv1webhooks_security_policy_1_config.rb +0 -223
  61. data/lib/cybersource_rest_client/models/notificationsubscriptionsv1webhooks_security_policy_1_config_additional_config.rb +0 -220
  62. data/lib/cybersource_rest_client/models/notificationsubscriptionsv1webhooks_security_policy_config.rb +0 -213
  63. data/lib/cybersource_rest_client/models/nrtfv1webhookswebhook_idreplays_by_delivery_status.rb +0 -243
  64. data/lib/cybersource_rest_client/models/replay_webhooks_request.rb +0 -201
  65. data/lib/cybersource_rest_client/models/update_webhook_request.rb +0 -314
@@ -28,6 +28,9 @@ module CyberSource
28
28
  # This will be the value returned by Visanet when transaction risk analysis (TRA) exemption has been requested. Valid values: Visa Platform Connect - `2` transaction risk analysis (TRA) exemption validated/honored - `3` transaction risk analysis (TRA) exemption failed validation/not honored
29
29
  attr_accessor :transaction_risk_analysis_exemption_result
30
30
 
31
+ # This will be the value returned by Visanet when delegated authentication has been requested.
32
+ attr_accessor :delegated_authentication_result
33
+
31
34
  # Attribute mapping from ruby-style variable name to JSON key.
32
35
  def self.attribute_map
33
36
  {
@@ -35,7 +38,8 @@ module CyberSource
35
38
  :'trusted_merchant_exemption_result' => :'trustedMerchantExemptionResult',
36
39
  :'low_value_exemption_result' => :'lowValueExemptionResult',
37
40
  :'secure_corporate_payment_result' => :'secureCorporatePaymentResult',
38
- :'transaction_risk_analysis_exemption_result' => :'transactionRiskAnalysisExemptionResult'
41
+ :'transaction_risk_analysis_exemption_result' => :'transactionRiskAnalysisExemptionResult',
42
+ :'delegated_authentication_result' => :'delegatedAuthenticationResult'
39
43
  }
40
44
  end
41
45
 
@@ -46,7 +50,8 @@ module CyberSource
46
50
  :'trusted_merchant_exemption_result' => :'trusted_merchant_exemption_result',
47
51
  :'low_value_exemption_result' => :'low_value_exemption_result',
48
52
  :'secure_corporate_payment_result' => :'secure_corporate_payment_result',
49
- :'transaction_risk_analysis_exemption_result' => :'transaction_risk_analysis_exemption_result'
53
+ :'transaction_risk_analysis_exemption_result' => :'transaction_risk_analysis_exemption_result',
54
+ :'delegated_authentication_result' => :'delegated_authentication_result'
50
55
  }
51
56
  end
52
57
 
@@ -57,7 +62,8 @@ module CyberSource
57
62
  :'trusted_merchant_exemption_result' => :'String',
58
63
  :'low_value_exemption_result' => :'String',
59
64
  :'secure_corporate_payment_result' => :'String',
60
- :'transaction_risk_analysis_exemption_result' => :'String'
65
+ :'transaction_risk_analysis_exemption_result' => :'String',
66
+ :'delegated_authentication_result' => :'String'
61
67
  }
62
68
  end
63
69
 
@@ -88,6 +94,10 @@ module CyberSource
88
94
  if attributes.has_key?(:'transactionRiskAnalysisExemptionResult')
89
95
  self.transaction_risk_analysis_exemption_result = attributes[:'transactionRiskAnalysisExemptionResult']
90
96
  end
97
+
98
+ if attributes.has_key?(:'delegatedAuthenticationResult')
99
+ self.delegated_authentication_result = attributes[:'delegatedAuthenticationResult']
100
+ end
91
101
  end
92
102
 
93
103
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -133,6 +143,12 @@ module CyberSource
133
143
  @transaction_risk_analysis_exemption_result = transaction_risk_analysis_exemption_result
134
144
  end
135
145
 
146
+ # Custom attribute writer method with validation
147
+ # @param [Object] delegated_authentication_result Value to be assigned
148
+ def delegated_authentication_result=(delegated_authentication_result)
149
+ @delegated_authentication_result = delegated_authentication_result
150
+ end
151
+
136
152
  # Checks equality by comparing each attribute.
137
153
  # @param [Object] Object to be compared
138
154
  def ==(o)
@@ -142,7 +158,8 @@ module CyberSource
142
158
  trusted_merchant_exemption_result == o.trusted_merchant_exemption_result &&
143
159
  low_value_exemption_result == o.low_value_exemption_result &&
144
160
  secure_corporate_payment_result == o.secure_corporate_payment_result &&
145
- transaction_risk_analysis_exemption_result == o.transaction_risk_analysis_exemption_result
161
+ transaction_risk_analysis_exemption_result == o.transaction_risk_analysis_exemption_result &&
162
+ delegated_authentication_result == o.delegated_authentication_result
146
163
  end
147
164
 
148
165
  # @see the `==` method
@@ -154,7 +171,7 @@ module CyberSource
154
171
  # Calculates hash code according to all attributes.
155
172
  # @return [Fixnum] Hash code
156
173
  def hash
157
- [risk_analysis_exemption_result, trusted_merchant_exemption_result, low_value_exemption_result, secure_corporate_payment_result, transaction_risk_analysis_exemption_result].hash
174
+ [risk_analysis_exemption_result, trusted_merchant_exemption_result, low_value_exemption_result, secure_corporate_payment_result, transaction_risk_analysis_exemption_result, delegated_authentication_result].hash
158
175
  end
159
176
 
160
177
  # Builds the object from hash
@@ -33,6 +33,10 @@ module CyberSource
33
33
 
34
34
  attr_accessor :client_reference_information
35
35
 
36
+ attr_accessor :issuer_information
37
+
38
+ attr_accessor :error_information
39
+
36
40
  # Attribute mapping from ruby-style variable name to JSON key.
37
41
  def self.attribute_map
38
42
  {
@@ -43,7 +47,9 @@ module CyberSource
43
47
  :'reconciliation_id' => :'reconciliationId',
44
48
  :'payment_information' => :'paymentInformation',
45
49
  :'order_information' => :'orderInformation',
46
- :'client_reference_information' => :'clientReferenceInformation'
50
+ :'client_reference_information' => :'clientReferenceInformation',
51
+ :'issuer_information' => :'issuerInformation',
52
+ :'error_information' => :'errorInformation'
47
53
  }
48
54
  end
49
55
 
@@ -57,7 +63,9 @@ module CyberSource
57
63
  :'reconciliation_id' => :'reconciliation_id',
58
64
  :'payment_information' => :'payment_information',
59
65
  :'order_information' => :'order_information',
60
- :'client_reference_information' => :'client_reference_information'
66
+ :'client_reference_information' => :'client_reference_information',
67
+ :'issuer_information' => :'issuer_information',
68
+ :'error_information' => :'error_information'
61
69
  }
62
70
  end
63
71
 
@@ -71,7 +79,9 @@ module CyberSource
71
79
  :'reconciliation_id' => :'String',
72
80
  :'payment_information' => :'PtsV2PaymentsPost201Response1PaymentInformation',
73
81
  :'order_information' => :'PtsV2PaymentsPost201Response1OrderInformation',
74
- :'client_reference_information' => :'PtsV2IncrementalAuthorizationPatch201ResponseClientReferenceInformation'
82
+ :'client_reference_information' => :'PtsV2IncrementalAuthorizationPatch201ResponseClientReferenceInformation',
83
+ :'issuer_information' => :'PtsV2PaymentsPost201Response1IssuerInformation',
84
+ :'error_information' => :'PtsV2PaymentsPost201Response1ErrorInformation'
75
85
  }
76
86
  end
77
87
 
@@ -114,6 +124,14 @@ module CyberSource
114
124
  if attributes.has_key?(:'clientReferenceInformation')
115
125
  self.client_reference_information = attributes[:'clientReferenceInformation']
116
126
  end
127
+
128
+ if attributes.has_key?(:'issuerInformation')
129
+ self.issuer_information = attributes[:'issuerInformation']
130
+ end
131
+
132
+ if attributes.has_key?(:'errorInformation')
133
+ self.error_information = attributes[:'errorInformation']
134
+ end
117
135
  end
118
136
 
119
137
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -153,7 +171,9 @@ module CyberSource
153
171
  reconciliation_id == o.reconciliation_id &&
154
172
  payment_information == o.payment_information &&
155
173
  order_information == o.order_information &&
156
- client_reference_information == o.client_reference_information
174
+ client_reference_information == o.client_reference_information &&
175
+ issuer_information == o.issuer_information &&
176
+ error_information == o.error_information
157
177
  end
158
178
 
159
179
  # @see the `==` method
@@ -165,7 +185,7 @@ module CyberSource
165
185
  # Calculates hash code according to all attributes.
166
186
  # @return [Fixnum] Hash code
167
187
  def hash
168
- [id, status, submit_time_utc, processor_information, reconciliation_id, payment_information, order_information, client_reference_information].hash
188
+ [id, status, submit_time_utc, processor_information, reconciliation_id, payment_information, order_information, client_reference_information, issuer_information, error_information].hash
169
189
  end
170
190
 
171
191
  # Builds the object from hash
@@ -12,9 +12,11 @@ Swagger Codegen version: 2.4.38
12
12
  require 'date'
13
13
 
14
14
  module CyberSource
15
- class InlineResponse4042
15
+ class PtsV2PaymentsPost201Response1ErrorInformation
16
+ # The reason of the status.
16
17
  attr_accessor :reason
17
18
 
19
+ # The detail message related to the status and reason listed above.
18
20
  attr_accessor :message
19
21
 
20
22
  attr_accessor :details
@@ -42,7 +44,7 @@ module CyberSource
42
44
  {
43
45
  :'reason' => :'String',
44
46
  :'message' => :'String',
45
- :'details' => :'Array<InlineResponse4042Details>'
47
+ :'details' => :'Array<PtsV2PaymentsPost201Response1ErrorInformationDetails>'
46
48
  }
47
49
  end
48
50
 
@@ -12,15 +12,13 @@ Swagger Codegen version: 2.4.38
12
12
  require 'date'
13
13
 
14
14
  module CyberSource
15
- class InlineResponse4042Details
16
- attr_accessor :field
17
-
15
+ class PtsV2PaymentsPost201Response1ErrorInformationDetails
16
+ # Possible reasons for the error. Possible values: - MISSING_FIELD - INVALID_DATA
18
17
  attr_accessor :reason
19
18
 
20
19
  # Attribute mapping from ruby-style variable name to JSON key.
21
20
  def self.attribute_map
22
21
  {
23
- :'field' => :'field',
24
22
  :'reason' => :'reason'
25
23
  }
26
24
  end
@@ -28,7 +26,6 @@ module CyberSource
28
26
  # Attribute mapping from JSON key to ruby-style variable name.
29
27
  def self.json_map
30
28
  {
31
- :'field' => :'field',
32
29
  :'reason' => :'reason'
33
30
  }
34
31
  end
@@ -36,7 +33,6 @@ module CyberSource
36
33
  # Attribute type mapping.
37
34
  def self.swagger_types
38
35
  {
39
- :'field' => :'String',
40
36
  :'reason' => :'String'
41
37
  }
42
38
  end
@@ -49,10 +45,6 @@ module CyberSource
49
45
  # convert string to symbol for hash key
50
46
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
51
47
 
52
- if attributes.has_key?(:'field')
53
- self.field = attributes[:'field']
54
- end
55
-
56
48
  if attributes.has_key?(:'reason')
57
49
  self.reason = attributes[:'reason']
58
50
  end
@@ -76,7 +68,6 @@ module CyberSource
76
68
  def ==(o)
77
69
  return true if self.equal?(o)
78
70
  self.class == o.class &&
79
- field == o.field &&
80
71
  reason == o.reason
81
72
  end
82
73
 
@@ -89,7 +80,7 @@ module CyberSource
89
80
  # Calculates hash code according to all attributes.
90
81
  # @return [Fixnum] Hash code
91
82
  def hash
92
- [field, reason].hash
83
+ [reason].hash
93
84
  end
94
85
 
95
86
  # Builds the object from hash
@@ -0,0 +1,213 @@
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.38
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module CyberSource
15
+ class PtsV2PaymentsPost201Response1IssuerInformation
16
+ # Name of the card issuer provided by the processor.
17
+ attr_accessor :name
18
+
19
+ # Unique code for card issuer provided by the processor.
20
+ attr_accessor :code
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'name' => :'name',
26
+ :'code' => :'code'
27
+ }
28
+ end
29
+
30
+ # Attribute mapping from JSON key to ruby-style variable name.
31
+ def self.json_map
32
+ {
33
+ :'name' => :'name',
34
+ :'code' => :'code'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'name' => :'String',
42
+ :'code' => :'String'
43
+ }
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ return unless attributes.is_a?(Hash)
50
+
51
+ # convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
53
+
54
+ if attributes.has_key?(:'name')
55
+ self.name = attributes[:'name']
56
+ end
57
+
58
+ if attributes.has_key?(:'code')
59
+ self.code = attributes[:'code']
60
+ end
61
+ end
62
+
63
+ # Show invalid properties with the reasons. Usually used together with valid?
64
+ # @return Array for valid properties with the reasons
65
+ def list_invalid_properties
66
+ invalid_properties = Array.new
67
+ invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ true
74
+ end
75
+
76
+ # Custom attribute writer method with validation
77
+ # @param [Object] name Value to be assigned
78
+ def name=(name)
79
+ @name = name
80
+ end
81
+
82
+ # Custom attribute writer method with validation
83
+ # @param [Object] code Value to be assigned
84
+ def code=(code)
85
+ @code = code
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ name == o.name &&
94
+ code == o.code
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Fixnum] Hash code
105
+ def hash
106
+ [name, code].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ self.class.swagger_types.each_pair do |key, type|
115
+ if type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :DateTime
136
+ DateTime.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :BOOLEAN
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ temp_model = CyberSource.const_get(type).new
167
+ temp_model.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ next if value.nil?
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map { |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end
212
+ end
213
+ end
@@ -17,11 +17,14 @@ module CyberSource
17
17
 
18
18
  attr_accessor :ship_to
19
19
 
20
+ attr_accessor :amount_details
21
+
20
22
  # Attribute mapping from ruby-style variable name to JSON key.
21
23
  def self.attribute_map
22
24
  {
23
25
  :'bill_to' => :'billTo',
24
- :'ship_to' => :'shipTo'
26
+ :'ship_to' => :'shipTo',
27
+ :'amount_details' => :'amountDetails'
25
28
  }
26
29
  end
27
30
 
@@ -29,7 +32,8 @@ module CyberSource
29
32
  def self.json_map
30
33
  {
31
34
  :'bill_to' => :'bill_to',
32
- :'ship_to' => :'ship_to'
35
+ :'ship_to' => :'ship_to',
36
+ :'amount_details' => :'amount_details'
33
37
  }
34
38
  end
35
39
 
@@ -37,7 +41,8 @@ module CyberSource
37
41
  def self.swagger_types
38
42
  {
39
43
  :'bill_to' => :'PtsV2PaymentsPost201Response1OrderInformationBillTo',
40
- :'ship_to' => :'PtsV2PaymentsPost201Response1OrderInformationShipTo'
44
+ :'ship_to' => :'PtsV2PaymentsPost201Response1OrderInformationShipTo',
45
+ :'amount_details' => :'PtsV2PaymentsPost201Response1OrderInformationAmountDetails'
41
46
  }
42
47
  end
43
48
 
@@ -56,6 +61,10 @@ module CyberSource
56
61
  if attributes.has_key?(:'shipTo')
57
62
  self.ship_to = attributes[:'shipTo']
58
63
  end
64
+
65
+ if attributes.has_key?(:'amountDetails')
66
+ self.amount_details = attributes[:'amountDetails']
67
+ end
59
68
  end
60
69
 
61
70
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -77,7 +86,8 @@ module CyberSource
77
86
  return true if self.equal?(o)
78
87
  self.class == o.class &&
79
88
  bill_to == o.bill_to &&
80
- ship_to == o.ship_to
89
+ ship_to == o.ship_to &&
90
+ amount_details == o.amount_details
81
91
  end
82
92
 
83
93
  # @see the `==` method
@@ -89,7 +99,7 @@ module CyberSource
89
99
  # Calculates hash code according to all attributes.
90
100
  # @return [Fixnum] Hash code
91
101
  def hash
92
- [bill_to, ship_to].hash
102
+ [bill_to, ship_to, amount_details].hash
93
103
  end
94
104
 
95
105
  # Builds the object from hash