Class: VisaAcceptanceMergedSpec::ClientReferenceInformation3

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

Overview

ClientReferenceInformation3 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, additional_properties: nil) ⇒ ClientReferenceInformation3

Returns a new instance of ClientReferenceInformation3.



52
53
54
55
56
57
58
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information3.rb', line 52

def initialize(code: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @code = code unless code == 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_information3.rb', line 31

def code
  @code
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information3.rb', line 61

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  code = hash.key?('code') ? hash['code'] : 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.
  ClientReferenceInformation3.new(code: code,
                                  additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



34
35
36
37
38
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information3.rb', line 34

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

.nullablesObject

An array for nullable fields



48
49
50
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information3.rb', line 48

def self.nullables
  []
end

.optionalsObject

An array for optional fields



41
42
43
44
45
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information3.rb', line 41

def self.optionals
  %w[
    code
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



86
87
88
89
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information3.rb', line 86

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

#to_sObject

Provides a human-readable string representation of the object.



80
81
82
83
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information3.rb', line 80

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