Class: VisaAcceptanceMergedSpec::ProcessorInformation19

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

Overview

ProcessorInformation19 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(seller_protection: SKIP, avs: SKIP, transaction_id: SKIP, response_details: SKIP, additional_properties: nil) ⇒ ProcessorInformation19

Returns a new instance of ProcessorInformation19.



89
90
91
92
93
94
95
96
97
98
99
# File 'lib/visa_acceptance_merged_spec/models/processor_information19.rb', line 89

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

  @seller_protection = seller_protection unless seller_protection == SKIP
  @avs = avs unless avs == SKIP
  @transaction_id = transaction_id unless transaction_id == SKIP
  @response_details = response_details unless response_details == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#avsAvs1

TODO: Write general description for this method

Returns:



18
19
20
# File 'lib/visa_acceptance_merged_spec/models/processor_information19.rb', line 18

def avs
  @avs
end

#response_detailsString

This field might contain information about a decline. This field is supported only for Visa Acceptance through VisaNet.

Returns:

  • (String)


62
63
64
# File 'lib/visa_acceptance_merged_spec/models/processor_information19.rb', line 62

def response_details
  @response_details
end

#seller_protectionSellerProtection3

TODO: Write general description for this method

Returns:



14
15
16
# File 'lib/visa_acceptance_merged_spec/models/processor_information19.rb', line 14

def seller_protection
  @seller_protection
end

#transaction_idString

Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. Returned by the authorization service.

PIN debit

Transaction identifier generated by the processor. Returned by PIN debit credit.

GPX

Processor transaction ID.

Cielo

For Cielo, this value is the non-sequential unit (NSU) and is supported for all transactions. The value is generated by Cielo or the issuing bank.

Comercio Latino

For Comercio Latino, this value is the proof of sale or non-sequential unit (NSU) number generated by the acquirers Cielo and Rede, or the issuing bank.

Visa Acceptance through VisaNet and GPN

For details about this value for Visa Acceptance through VisaNet and GPN, see "processorInformation.networkTransactionId" in [REST API Fields](

Moneris

This value identifies the transaction on a host system. It contains the following information:

  • Terminal used to process the transaction
  • Shift during which the transaction took place
  • Batch number
  • Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003:
  • Terminal ID = 66012345
  • Shift number = 001
  • Batch number = 069
  • Transaction number = 003

Returns:

  • (String)


56
57
58
# File 'lib/visa_acceptance_merged_spec/models/processor_information19.rb', line 56

def transaction_id
  @transaction_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/visa_acceptance_merged_spec/models/processor_information19.rb', line 102

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  seller_protection = SellerProtection3.from_hash(hash['sellerProtection']) if
    hash['sellerProtection']
  avs = Avs1.from_hash(hash['avs']) if hash['avs']
  transaction_id = hash.key?('transactionId') ? hash['transactionId'] : SKIP
  response_details =
    hash.key?('responseDetails') ? hash['responseDetails'] : 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.
  ProcessorInformation19.new(seller_protection: seller_protection,
                             avs: avs,
                             transaction_id: transaction_id,
                             response_details: response_details,
                             additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



65
66
67
68
69
70
71
72
# File 'lib/visa_acceptance_merged_spec/models/processor_information19.rb', line 65

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['seller_protection'] = 'sellerProtection'
  @_hash['avs'] = 'avs'
  @_hash['transaction_id'] = 'transactionId'
  @_hash['response_details'] = 'responseDetails'
  @_hash
end

.nullablesObject

An array for nullable fields



85
86
87
# File 'lib/visa_acceptance_merged_spec/models/processor_information19.rb', line 85

def self.nullables
  []
end

.optionalsObject

An array for optional fields



75
76
77
78
79
80
81
82
# File 'lib/visa_acceptance_merged_spec/models/processor_information19.rb', line 75

def self.optionals
  %w[
    seller_protection
    avs
    transaction_id
    response_details
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



137
138
139
140
141
142
# File 'lib/visa_acceptance_merged_spec/models/processor_information19.rb', line 137

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

#to_sObject

Provides a human-readable string representation of the object.



129
130
131
132
133
134
# File 'lib/visa_acceptance_merged_spec/models/processor_information19.rb', line 129

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