Class: CyberSourceMergedSpec::ClientReferenceInformation4
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::ClientReferenceInformation4
- Defined in:
- lib/cyber_source_merged_spec/models/client_reference_information4.rb
Overview
ClientReferenceInformation4 Model.
Instance Attribute Summary collapse
-
#application_name ⇒ String
The name of the Connection Method client (such as Virtual Terminal or SOAP Toolkit API) that the merchant uses to send a transaction request to CyberSource.
-
#application_user ⇒ String
The entity that is responsible for running the transaction and submitting the processing request to CyberSource.
-
#application_version ⇒ String
Version of the CyberSource application or integration used for a transaction.
-
#code ⇒ String
Merchant-generated order reference or tracking number.
-
#comments ⇒ String
Brief description of the order or any comment you wish to add to the order.
-
#partner ⇒ Partner2
Brief description of the order or any comment you wish to add to the order.
-
#paused_request_id ⇒ String
Used to resume a transaction that was paused for an order modification rule to allow for payer authentication to complete.
-
#reconciliation_id ⇒ String
Reference number for the transaction.
-
#transaction_id ⇒ String
Identifier that you assign to the transaction.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(code: SKIP, paused_request_id: SKIP, comments: SKIP, partner: SKIP, application_name: SKIP, application_version: SKIP, application_user: SKIP, reconciliation_id: SKIP, transaction_id: SKIP, additional_properties: nil) ⇒ ClientReferenceInformation4
constructor
A new instance of ClientReferenceInformation4.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ Object
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(code: SKIP, paused_request_id: SKIP, comments: SKIP, partner: SKIP, application_name: SKIP, application_version: SKIP, application_user: SKIP, reconciliation_id: SKIP, transaction_id: SKIP, additional_properties: nil) ⇒ ClientReferenceInformation4
Returns a new instance of ClientReferenceInformation4.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 124 def initialize(code: SKIP, paused_request_id: SKIP, comments: SKIP, partner: SKIP, application_name: SKIP, application_version: SKIP, application_user: SKIP, reconciliation_id: SKIP, transaction_id: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @code = code unless code == SKIP @paused_request_id = paused_request_id unless paused_request_id == SKIP @comments = comments unless comments == SKIP @partner = partner unless partner == SKIP @application_name = application_name unless application_name == SKIP @application_version = application_version unless application_version == SKIP @application_user = application_user unless application_user == SKIP @reconciliation_id = reconciliation_id unless reconciliation_id == SKIP @transaction_id = transaction_id unless transaction_id == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#application_name ⇒ String
The name of the Connection Method client (such as Virtual Terminal or SOAP Toolkit API) that the merchant uses to send a transaction request to CyberSource.
54 55 56 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 54 def application_name @application_name end |
#application_user ⇒ String
The entity that is responsible for running the transaction and submitting the processing request to CyberSource. This could be a person, a system, or a connection method.
65 66 67 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 65 def application_user @application_user end |
#application_version ⇒ String
Version of the CyberSource application or integration used for a transaction.
59 60 61 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 59 def application_version @application_version end |
#code ⇒ String
Merchant-generated order reference or tracking number. It is recommended that you send a unique value for each transaction so that you can perform meaningful searches for the transaction.
Used by
Authorization Required field.
PIN Debit
Requests for PIN debit reversals need to use the same merchant reference number that was used in the transaction that is being reversed. Required field for all PIN Debit requests (purchase, credit, and reversal).
FDC Nashville Global
Certain circumstances can cause the processor to truncate this value to 15 or 17 characters for Level II and Level III processing, which can cause a discrepancy between the value you submit and the value included in some processor reports.
31 32 33 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 31 def code @code end |
#comments ⇒ String
Brief description of the order or any comment you wish to add to the order.
43 44 45 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 43 def comments @comments end |
#partner ⇒ Partner2
Brief description of the order or any comment you wish to add to the order.
48 49 50 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 48 def partner @partner end |
#paused_request_id ⇒ String
Used to resume a transaction that was paused for an order modification rule to allow for payer authentication to complete. To resume and continue with the authorization/decision service flow, call the services and include the request id from the prior decision call.
38 39 40 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 38 def paused_request_id @paused_request_id end |
#reconciliation_id ⇒ String
Reference number for the transaction. Depending on how your Cybersource account is configured, this value could either be provided in the API request or generated by CyberSource. The actual value used in the request to the processor is provided back to you by Cybersource in the response.
73 74 75 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 73 def reconciliation_id @reconciliation_id end |
#transaction_id ⇒ String
Identifier that you assign to the transaction. Normally generated by a client server to identify a unique API request. Note Use this field only if you want to support merchant-initiated reversal and void operations.
Used by
Authorization, Authorization Reversal, Capture, Credit, and Void Optional field.
PIN Debit
For a PIN debit reversal, your request must include a request ID or a merchant transaction identifier. Optional field for PIN debit purchase or credit requests.
87 88 89 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 87 def transaction_id @transaction_id end |
Class Method Details
.from_element(root) ⇒ Object
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 184 def self.from_element(root) code = XmlUtilities.from_element(root, 'code', String) paused_request_id = XmlUtilities.from_element(root, 'pausedRequestId', String) comments = XmlUtilities.from_element(root, 'comments', String) partner = XmlUtilities.from_element(root, 'Partner2', Partner2) application_name = XmlUtilities.from_element(root, 'applicationName', String) application_version = XmlUtilities.from_element(root, 'applicationVersion', String) application_user = XmlUtilities.from_element(root, 'applicationUser', String) reconciliation_id = XmlUtilities.from_element(root, 'reconciliationId', String) transaction_id = XmlUtilities.from_element(root, 'transactionId', String) new(code: code, paused_request_id: paused_request_id, comments: comments, partner: partner, application_name: application_name, application_version: application_version, application_user: application_user, reconciliation_id: reconciliation_id, transaction_id: transaction_id, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 145 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. code = hash.key?('code') ? hash['code'] : SKIP paused_request_id = hash.key?('pausedRequestId') ? hash['pausedRequestId'] : SKIP comments = hash.key?('comments') ? hash['comments'] : SKIP partner = Partner2.from_hash(hash['partner']) if hash['partner'] application_name = hash.key?('applicationName') ? hash['applicationName'] : SKIP application_version = hash.key?('applicationVersion') ? hash['applicationVersion'] : SKIP application_user = hash.key?('applicationUser') ? hash['applicationUser'] : SKIP reconciliation_id = hash.key?('reconciliationId') ? hash['reconciliationId'] : SKIP transaction_id = hash.key?('transactionId') ? hash['transactionId'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. ClientReferenceInformation4.new(code: code, paused_request_id: paused_request_id, comments: comments, partner: partner, application_name: application_name, application_version: application_version, application_user: application_user, reconciliation_id: reconciliation_id, transaction_id: transaction_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 90 def self.names @_hash = {} if @_hash.nil? @_hash['code'] = 'code' @_hash['paused_request_id'] = 'pausedRequestId' @_hash['comments'] = 'comments' @_hash['partner'] = 'partner' @_hash['application_name'] = 'applicationName' @_hash['application_version'] = 'applicationVersion' @_hash['application_user'] = 'applicationUser' @_hash['reconciliation_id'] = 'reconciliationId' @_hash['transaction_id'] = 'transactionId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
120 121 122 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 120 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 105 def self.optionals %w[ code paused_request_id comments partner application_name application_version application_user reconciliation_id transaction_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
247 248 249 250 251 252 253 254 255 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 247 def inspect class_name = self.class.name.split('::').last "<#{class_name} code: #{@code.inspect}, paused_request_id: #{@paused_request_id.inspect},"\ " comments: #{@comments.inspect}, partner: #{@partner.inspect}, application_name:"\ " #{@application_name.inspect}, application_version: #{@application_version.inspect},"\ " application_user: #{@application_user.inspect}, reconciliation_id:"\ " #{@reconciliation_id.inspect}, transaction_id: #{@transaction_id.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
237 238 239 240 241 242 243 244 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 237 def to_s class_name = self.class.name.split('::').last "<#{class_name} code: #{@code}, paused_request_id: #{@paused_request_id}, comments:"\ " #{@comments}, partner: #{@partner}, application_name: #{@application_name},"\ " application_version: #{@application_version}, application_user: #{@application_user},"\ " reconciliation_id: #{@reconciliation_id}, transaction_id: #{@transaction_id},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information4.rb', line 213 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'code', code) XmlUtilities.add_as_subelement(doc, root, 'pausedRequestId', paused_request_id) XmlUtilities.add_as_subelement(doc, root, 'comments', comments) XmlUtilities.add_as_subelement(doc, root, 'Partner2', partner) XmlUtilities.add_as_subelement(doc, root, 'applicationName', application_name) XmlUtilities.add_as_subelement(doc, root, 'applicationVersion', application_version) XmlUtilities.add_as_subelement(doc, root, 'applicationUser', application_user) XmlUtilities.add_as_subelement(doc, root, 'reconciliationId', reconciliation_id) XmlUtilities.add_as_subelement(doc, root, 'transactionId', transaction_id) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |