Class: VisaAcceptanceMergedSpec::IssuerInformation3

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

Overview

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

Returns a new instance of IssuerInformation3.



92
93
94
95
96
97
98
# File 'lib/visa_acceptance_merged_spec/models/issuer_information3.rb', line 92

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

  @response_code = response_code unless response_code == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#response_codeString

This is the raw Association/Issuer Response Codes. You can use ‘issuer/association’ response codes to identify when you can retry to authorize a declined transaction and increase successful transaction volumes. You’ll receive an association/issuer response code for the majority of transactions.

Processors supported:

- HSBC
- FDC Nashville Global
- SIX

Currently SIX is not receiving Association/Issuer Response Codes here it receives the additional authorization code that must be printed on the receipt when returned by the processor.

Possible values:

| Card Type | Response Code | Description | | ----------- | ------------- |

---- | | VISA | 000 | Successful approval/completion or that V.I.P. PIN verification is successful | | VISA | 001 | Refer to card issuer | | VISA | 002 | Refer to card issuer, special condition | | VISA | 003 | Invalid merchant or service provider | | VISA | 004 | Pickup card |
| MasterCard | 000 | Approved or completed successfully | | MasterCard | 001 | Refer to card issuer | | MasterCard | 003 | Invalid merchant | | MasterCard | 004 | Capture card | | MasterCard | 005 | Do not honor | | AMEX | 000 | Approved | | AMEX | 001 | Approve with ID | | AMEX | 002 | Partial Approval (Prepaid Cards only) | | AMEX | 100 | Deny | | AMEX | 101 | Expired Card/Invalid Expiration Date | | Discover | 000 | Approved or completed successfully | | Discover | 001 | Reserved for future USE | | Discover | 002 | Reserved for future USE | | Discover | 003 | Invalid Merchant | | Discover | 004 | Capture Card |

Returns:

  • (String)


71
72
73
# File 'lib/visa_acceptance_merged_spec/models/issuer_information3.rb', line 71

def response_code
  @response_code
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/visa_acceptance_merged_spec/models/issuer_information3.rb', line 101

def self.from_hash(hash)
  return nil unless hash

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

.namesObject

A mapping from model property names to API property names.



74
75
76
77
78
# File 'lib/visa_acceptance_merged_spec/models/issuer_information3.rb', line 74

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

.nullablesObject

An array for nullable fields



88
89
90
# File 'lib/visa_acceptance_merged_spec/models/issuer_information3.rb', line 88

def self.nullables
  []
end

.optionalsObject

An array for optional fields



81
82
83
84
85
# File 'lib/visa_acceptance_merged_spec/models/issuer_information3.rb', line 81

def self.optionals
  %w[
    response_code
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



127
128
129
130
131
# File 'lib/visa_acceptance_merged_spec/models/issuer_information3.rb', line 127

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

#to_sObject

Provides a human-readable string representation of the object.



120
121
122
123
124
# File 'lib/visa_acceptance_merged_spec/models/issuer_information3.rb', line 120

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