Class: VisaAcceptanceMergedSpec::ClientReferenceInformation26

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/visa_acceptance_merged_spec/models/client_reference_information26.rb

Overview

ClientReferenceInformation26 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.



63
64
65
66
67
68
69
70
71
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information26.rb', line 63

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

#codeString

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.

Returns:

  • (String)


31
32
33
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information26.rb', line 31

def code
  @code
end

#reconciliation_idString

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.

Returns:

  • (String)


40
41
42
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information26.rb', line 40

def reconciliation_id
  @reconciliation_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information26.rb', line 74

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

.namesObject

A mapping from model property names to API property names.



43
44
45
46
47
48
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information26.rb', line 43

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['code'] = 'code'
  @_hash['reconciliation_id'] = 'reconciliationId'
  @_hash
end

.nullablesObject

An array for nullable fields



59
60
61
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information26.rb', line 59

def self.nullables
  []
end

.optionalsObject

An array for optional fields



51
52
53
54
55
56
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information26.rb', line 51

def self.optionals
  %w[
    code
    reconciliation_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



103
104
105
106
107
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information26.rb', line 103

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_sObject

Provides a human-readable string representation of the object.



96
97
98
99
100
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information26.rb', line 96

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} code: #{@code}, reconciliation_id: #{@reconciliation_id},"\
  " additional_properties: #{@additional_properties}>"
end