Class: VisaAcceptanceMergedSpec::ClientReferenceInformation47

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

Overview

ClientReferenceInformation47 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(code: SKIP, application_version: SKIP, application_name: SKIP, application_user: SKIP, partner: SKIP, comments: SKIP, additional_properties: nil) ⇒ ClientReferenceInformation47

Returns a new instance of ClientReferenceInformation47.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information47.rb', line 90

def initialize(code: SKIP, application_version: SKIP,
               application_name: SKIP, application_user: SKIP,
               partner: SKIP, comments: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @code = code unless code == SKIP
  @application_version = application_version unless application_version == SKIP
  @application_name = application_name unless application_name == SKIP
  @application_user = application_user unless application_user == SKIP
  @partner = partner unless partner == SKIP
  @comments = comments unless comments == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#application_nameString

The name of the Connection Method client (such as Virtual Terminal or SOAP Toolkit API) that the merchant uses to send a transaction request to Visa Acceptance.

Returns:

  • (String)


42
43
44
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information47.rb', line 42

def application_name
  @application_name
end

#application_userString

The entity that is responsible for running the transaction and submitting the processing request to Visa Acceptance. This could be a person, a system, or a connection method.

Returns:

  • (String)


48
49
50
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information47.rb', line 48

def application_user
  @application_user
end

#application_versionString

Version of the Visa Acceptance application or integration used for a transaction.

Returns:

  • (String)


36
37
38
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information47.rb', line 36

def application_version
  @application_version
end

#codeString

Merchant-generated order reference or tracking number. It is recommended that you send a unique value for each transaction so that you can perform meaningful searches for the transaction.

Used by

Authorization Required field.

PIN Debit

Requests for PIN debit reversals need to use the same merchant reference number that was used in the transaction that is being reversed. Required field for all PIN Debit requests (purchase, credit, and reversal).

FDC Nashville Global

Certain circumstances can cause the processor to truncate this value to 15 or 17 characters for Level II and Level III processing, which can cause a discrepancy between the value you submit and the value included in some processor reports.

Returns:

  • (String)


31
32
33
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information47.rb', line 31

def code
  @code
end

#commentsString

Brief description of the order or any comment you wish to add to the order.

Returns:

  • (String)


59
60
61
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information47.rb', line 59

def comments
  @comments
end

#partnerPartner16

The entity that is responsible for running the transaction and submitting the processing request to Visa Acceptance. This could be a person, a system, or a connection method.

Returns:



54
55
56
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information47.rb', line 54

def partner
  @partner
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information47.rb', line 106

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  code = hash.key?('code') ? hash['code'] : SKIP
  application_version =
    hash.key?('applicationVersion') ? hash['applicationVersion'] : SKIP
  application_name =
    hash.key?('applicationName') ? hash['applicationName'] : SKIP
  application_user =
    hash.key?('applicationUser') ? hash['applicationUser'] : SKIP
  partner = Partner16.from_hash(hash['partner']) if hash['partner']
  comments = hash.key?('comments') ? hash['comments'] : 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.
  ClientReferenceInformation47.new(code: code,
                                   application_version: application_version,
                                   application_name: application_name,
                                   application_user: application_user,
                                   partner: partner,
                                   comments: comments,
                                   additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



62
63
64
65
66
67
68
69
70
71
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information47.rb', line 62

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['code'] = 'code'
  @_hash['application_version'] = 'applicationVersion'
  @_hash['application_name'] = 'applicationName'
  @_hash['application_user'] = 'applicationUser'
  @_hash['partner'] = 'partner'
  @_hash['comments'] = 'comments'
  @_hash
end

.nullablesObject

An array for nullable fields



86
87
88
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information47.rb', line 86

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    code
    application_version
    application_name
    application_user
    partner
    comments
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



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

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} code: #{@code.inspect}, application_version:"\
  " #{@application_version.inspect}, application_name: #{@application_name.inspect},"\
  " application_user: #{@application_user.inspect}, partner: #{@partner.inspect}, comments:"\
  " #{@comments.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



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

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} code: #{@code}, application_version: #{@application_version},"\
  " application_name: #{@application_name}, application_user: #{@application_user}, partner:"\
  " #{@partner}, comments: #{@comments}, additional_properties: #{@additional_properties}>"
end