Class: CyberSourceMergedSpec::ClientReferenceInformation26
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::ClientReferenceInformation26
- Defined in:
- lib/cyber_source_merged_spec/models/client_reference_information26.rb
Overview
ClientReferenceInformation26 Model.
Instance Attribute Summary collapse
-
#code ⇒ String
Merchant-generated order reference or tracking number.
-
#reconciliation_id ⇒ String
Reference number for 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, reconciliation_id: SKIP, additional_properties: nil) ⇒ ClientReferenceInformation26
constructor
A new instance of ClientReferenceInformation26.
-
#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, reconciliation_id: SKIP, additional_properties: nil) ⇒ ClientReferenceInformation26
Returns a new instance of ClientReferenceInformation26.
62 63 64 65 66 67 68 69 70 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information26.rb', line 62 def initialize(code: SKIP, reconciliation_id: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @code = code unless code == SKIP @reconciliation_id = reconciliation_id unless reconciliation_id == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#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_information26.rb', line 31 def code @code 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.
39 40 41 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information26.rb', line 39 def reconciliation_id @reconciliation_id end |
Class Method Details
.from_element(root) ⇒ Object
94 95 96 97 98 99 100 101 102 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information26.rb', line 94 def self.from_element(root) code = XmlUtilities.from_element(root, 'code', String) reconciliation_id = XmlUtilities.from_element(root, 'reconciliationId', String) new(code: code, reconciliation_id: reconciliation_id, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information26.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. code = hash.key?('code') ? hash['code'] : SKIP reconciliation_id = hash.key?('reconciliationId') ? hash['reconciliationId'] : 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. ClientReferenceInformation26.new(code: code, reconciliation_id: reconciliation_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
42 43 44 45 46 47 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information26.rb', line 42 def self.names @_hash = {} if @_hash.nil? @_hash['code'] = 'code' @_hash['reconciliation_id'] = 'reconciliationId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
58 59 60 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information26.rb', line 58 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information26.rb', line 50 def self.optionals %w[ code reconciliation_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
124 125 126 127 128 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information26.rb', line 124 def inspect class_name = self.class.name.split('::').last "<#{class_name} code: #{@code.inspect}, reconciliation_id: #{@reconciliation_id.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
117 118 119 120 121 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information26.rb', line 117 def to_s class_name = self.class.name.split('::').last "<#{class_name} code: #{@code}, reconciliation_id: #{@reconciliation_id},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information26.rb', line 104 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, 'reconciliationId', reconciliation_id) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |