Class: VisaAcceptanceMergedSpec::PointOfSaleInformation1

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

Overview

PointOfSaleInformation1 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(emv: SKIP, amex_capn_data: SKIP, terminal_id: SKIP, additional_properties: nil) ⇒ PointOfSaleInformation1

Returns a new instance of PointOfSaleInformation1.



113
114
115
116
117
118
119
120
121
122
# File 'lib/visa_acceptance_merged_spec/models/point_of_sale_information1.rb', line 113

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

  @emv = emv unless emv == SKIP
  @amex_capn_data = amex_capn_data unless amex_capn_data == SKIP
  @terminal_id = terminal_id unless terminal_id == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#amex_capn_dataString

Point-of-sale details for the transaction. This value is returned only for American Express Direct. Visa Acceptance generates this value, which consists of a series of codes that identify terminal capability, security data, and specific conditions present at the time the transaction occurred. To comply with the CAPN requirements, this value must be included in all subsequent follow-on requests, such as captures and follow-on credits. When you perform authorizations, captures, and credits through Visa Acceptance, Visa Acceptance passes this value from the authorization service to the subsequent services for you. However, when you perform authorizations through Visa Acceptance and perform subsequent services through other financial institutions, you must ensure that your requests for captures and credits include this value.

Returns:

  • (String)


33
34
35
# File 'lib/visa_acceptance_merged_spec/models/point_of_sale_information1.rb', line 33

def amex_capn_data
  @amex_capn_data
end

#emvEmv1

TODO: Write general description for this method

Returns:



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

def emv
  @emv
end

#terminal_idString

Identifier for the terminal at your retail location. You can define this value yourself, but consult the processor for requirements.

Visa Acceptance through VisaNet

A list of all possible values is stored in your Visa Acceptance account. If terminal ID validation is enabled for your Visa Acceptance account, the value you send for this field is validated against the list each time you include the field in a request. To enable or disable terminal ID validation, contact Visa Acceptance Customer Support. When you do not include this field in a request, Visa Acceptance uses the default value that is defined in your Visa Acceptance account.

FDC Nashville Global

To have your account configured to support this field, contact Visa Acceptance Customer Support. This value must be a value that FDC Nashville Global issued to you.

For Payouts

This field is applicable for Visa Acceptance through VisaNet.

GPX

Identifier for the terminal at your retail location. A list of all possible values is stored in your account. If terminal ID validation is enabled for your account, the value you send for this field is validated against the list each time you include the field in a request. To enable or disable terminal ID validation, contact customer support. When you do not include this field in a request, the default value that is defined in your account is used. Optional for authorizations.

Used by

Authorization Optional for the following processors. When you do not include this field in a request, the default value that is defined in your account is used.

  • American Express Direct
  • Credit Mutuel-CIC
  • FDC Nashville Global
  • SIX
  • Chase Paymentech Solutions: Optional field. If you include this field in your request, you must also include pointOfSaleInformation.catLevel.
  • FDMS Nashville: The default value that is defined in your account is used.
  • GPX
  • OmniPay Direct: Optional field. For the following processors, this field is not used.
  • GPN
  • JCN Gateway
  • RBS WorldPay Atlanta
  • TSYS Acquiring Solutions
  • Worldpay VAP

Card Present reply

Terminal identifier assigned by the acquirer. This value must be printed on the receipt.

Returns:

  • (String)


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

def terminal_id
  @terminal_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/visa_acceptance_merged_spec/models/point_of_sale_information1.rb', line 125

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  emv = Emv1.from_hash(hash['emv']) if hash['emv']
  amex_capn_data = hash.key?('amexCapnData') ? hash['amexCapnData'] : SKIP
  terminal_id = hash.key?('terminalId') ? hash['terminalId'] : 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.
  PointOfSaleInformation1.new(emv: emv,
                              amex_capn_data: amex_capn_data,
                              terminal_id: terminal_id,
                              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



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

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['emv'] = 'emv'
  @_hash['amex_capn_data'] = 'amexCapnData'
  @_hash['terminal_id'] = 'terminalId'
  @_hash
end

.nullablesObject

An array for nullable fields



109
110
111
# File 'lib/visa_acceptance_merged_spec/models/point_of_sale_information1.rb', line 109

def self.nullables
  []
end

.optionalsObject

An array for optional fields



100
101
102
103
104
105
106
# File 'lib/visa_acceptance_merged_spec/models/point_of_sale_information1.rb', line 100

def self.optionals
  %w[
    emv
    amex_capn_data
    terminal_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



155
156
157
158
159
# File 'lib/visa_acceptance_merged_spec/models/point_of_sale_information1.rb', line 155

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

#to_sObject

Provides a human-readable string representation of the object.



148
149
150
151
152
# File 'lib/visa_acceptance_merged_spec/models/point_of_sale_information1.rb', line 148

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