Class: VisaAcceptanceMergedSpec::Customer2

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

Overview

Customer2 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(personal_id_result: SKIP, additional_properties: nil) ⇒ Customer2

Returns a new instance of Customer2.



55
56
57
58
59
60
61
# File 'lib/visa_acceptance_merged_spec/models/customer2.rb', line 55

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

  @personal_id_result = personal_id_result unless personal_id_result == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#personal_id_resultString

Personal identifier result. This field is supported only for Redecard in Brazil for Visa Acceptance Latin American Processing. If you included buyerInformation.personalIdentification[].ID in the request, this value indicates whether or not buyerInformation.personalIdentification[].ID matched a value in a record on file. Returned only when the personal ID result is returned by the processor. Possible values:

  • Y: Match
  • N: No match
  • K: Not supported
  • U: Unknown
  • Z: No response returned Note Visa Acceptance Latin American Processing is the name of a specific processing connection that Visa Acceptance supports. In the Visa Acceptance API documentation, Visa Acceptance Latin American Processing does not refer to the general topic of processing in Latin America.The information in this field description is for the specific processing connection called Visa Acceptance Latin American Processing. It is not for any other Latin American processors that Visa Acceptance supports.

Returns:

  • (String)


34
35
36
# File 'lib/visa_acceptance_merged_spec/models/customer2.rb', line 34

def personal_id_result
  @personal_id_result
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/visa_acceptance_merged_spec/models/customer2.rb', line 64

def self.from_hash(hash)
  return nil unless hash

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

.namesObject

A mapping from model property names to API property names.



37
38
39
40
41
# File 'lib/visa_acceptance_merged_spec/models/customer2.rb', line 37

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

.nullablesObject

An array for nullable fields



51
52
53
# File 'lib/visa_acceptance_merged_spec/models/customer2.rb', line 51

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    personal_id_result
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



91
92
93
94
95
# File 'lib/visa_acceptance_merged_spec/models/customer2.rb', line 91

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

#to_sObject

Provides a human-readable string representation of the object.



84
85
86
87
88
# File 'lib/visa_acceptance_merged_spec/models/customer2.rb', line 84

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