Class: VisaAcceptanceMergedSpec::ClientReferenceInformation11

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

Overview

ClientReferenceInformation11 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, submit_local_date_time: SKIP, owner_merchant_id: SKIP, return_reconciliation_id: SKIP, additional_properties: nil) ⇒ ClientReferenceInformation11

Returns a new instance of ClientReferenceInformation11.



83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information11.rb', line 83

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

  @code = code unless code == SKIP
  @submit_local_date_time = submit_local_date_time unless submit_local_date_time == SKIP
  @owner_merchant_id = owner_merchant_id unless owner_merchant_id == SKIP
  @return_reconciliation_id = return_reconciliation_id unless return_reconciliation_id == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#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_information11.rb', line 31

def code
  @code
end

#owner_merchant_idString

Merchant ID that was used to create the subscription or customer profile for which the service was requested. If your Visa Acceptance account is enabled for Recurring Billing, this field is returned only if you are using subscription sharing and if your merchant ID is in the same merchant ID pool as the owner merchant ID. If your Visa Acceptance account is enabled for Payment Tokenization, this field is returned only if you are using profile sharing and if your merchant ID is in the same merchant ID pool as the owner merchant ID.

Returns:

  • (String)


52
53
54
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information11.rb', line 52

def owner_merchant_id
  @owner_merchant_id
end

#return_reconciliation_idString

A new ID which is created for refund

Returns:

  • (String)


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

def return_reconciliation_id
  @return_reconciliation_id
end

#submit_local_date_timeString

Date and time at your physical location. Format: YYYYMMDDhhmmss, where YYYY = year, MM = month, DD = day, hh = hour, mm = minutes ss = seconds

PIN Debit

Optional field for PIN Debit purchase and credit requests.

Returns:

  • (String)


39
40
41
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information11.rb', line 39

def submit_local_date_time
  @submit_local_date_time
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information11.rb', line 97

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  code = hash.key?('code') ? hash['code'] : SKIP
  submit_local_date_time =
    hash.key?('submitLocalDateTime') ? hash['submitLocalDateTime'] : SKIP
  owner_merchant_id =
    hash.key?('ownerMerchantId') ? hash['ownerMerchantId'] : SKIP
  return_reconciliation_id =
    hash.key?('returnReconciliationId') ? hash['returnReconciliationId'] : 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.
  ClientReferenceInformation11.new(code: code,
                                   submit_local_date_time: submit_local_date_time,
                                   owner_merchant_id: owner_merchant_id,
                                   return_reconciliation_id: return_reconciliation_id,
                                   additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



59
60
61
62
63
64
65
66
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information11.rb', line 59

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['code'] = 'code'
  @_hash['submit_local_date_time'] = 'submitLocalDateTime'
  @_hash['owner_merchant_id'] = 'ownerMerchantId'
  @_hash['return_reconciliation_id'] = 'returnReconciliationId'
  @_hash
end

.nullablesObject

An array for nullable fields



79
80
81
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information11.rb', line 79

def self.nullables
  []
end

.optionalsObject

An array for optional fields



69
70
71
72
73
74
75
76
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information11.rb', line 69

def self.optionals
  %w[
    code
    submit_local_date_time
    owner_merchant_id
    return_reconciliation_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



133
134
135
136
137
138
139
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information11.rb', line 133

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

#to_sObject

Provides a human-readable string representation of the object.



125
126
127
128
129
130
# File 'lib/visa_acceptance_merged_spec/models/client_reference_information11.rb', line 125

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