Class: VisaAcceptanceMergedSpec::PersonalIdentification6

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

Overview

PersonalIdentification6 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(type: SKIP, id: SKIP, additional_properties: nil) ⇒ PersonalIdentification6

Returns a new instance of PersonalIdentification6.



84
85
86
87
88
89
90
91
# File 'lib/visa_acceptance_merged_spec/models/personal_identification6.rb', line 84

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

  @type = type unless type == SKIP
  @id = id unless id == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#idString

The value of the identification type. This field is supported only on the following processors.

ComercioLatino

Set this field to the Cadastro de Pessoas Fisicas (CPF).

Visa Acceptance Latin American Processing

Supported for Redecard in Brazil. Set this field to the Cadastro de Pessoas Fisicas (CPF), which is required for AVS for Redecard in Brazil. 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.

If type = PASSPORT, this is the cardholder's passport number. Recommended for Discover ProtectBuy.

Returns:

  • (String)


61
62
63
# File 'lib/visa_acceptance_merged_spec/models/personal_identification6.rb', line 61

def id
  @id
end

#typeString

The type of the identification. Possible values:

- `NATIONAL`
- `CPF`
- `CPNJ`
- `CURP`
- `SSN`
- `DRIVER_LICENSE`
- `PASSPORT_NUMBER`
- `PERSONAL_ID`
- `TAX_ID`
-	`BR_CPF`     The individual tax ID type, typically is 11 characters

long

  • BR_CNPJ The business tax ID type, typically is 14 characters long. This field is supported only on the following processors.

ComercioLatino

Set this field to the Cadastro de Pessoas Fisicas (CPF).

Visa Acceptance Latin American Processing

Supported for Redecard in Brazil. Set this field to the Cadastro de Pessoas Fisicas (CPF), which is required for AVS for Redecard in Brazil. 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)


41
42
43
# File 'lib/visa_acceptance_merged_spec/models/personal_identification6.rb', line 41

def type
  @type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/visa_acceptance_merged_spec/models/personal_identification6.rb', line 94

def self.from_hash(hash)
  return nil unless hash

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

.namesObject

A mapping from model property names to API property names.



64
65
66
67
68
69
# File 'lib/visa_acceptance_merged_spec/models/personal_identification6.rb', line 64

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

.nullablesObject

An array for nullable fields



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

def self.nullables
  []
end

.optionalsObject

An array for optional fields



72
73
74
75
76
77
# File 'lib/visa_acceptance_merged_spec/models/personal_identification6.rb', line 72

def self.optionals
  %w[
    type
    id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



122
123
124
125
126
# File 'lib/visa_acceptance_merged_spec/models/personal_identification6.rb', line 122

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

#to_sObject

Provides a human-readable string representation of the object.



115
116
117
118
119
# File 'lib/visa_acceptance_merged_spec/models/personal_identification6.rb', line 115

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