Class: VisaAcceptanceMergedSpec::BankTransferOptions2

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

Overview

BankTransferOptions2 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(customer_memo: SKIP, sec_code: SKIP, terminal_city: SKIP, terminal_state: SKIP, effective_date: SKIP, partial_payment_id: SKIP, settlement_method: SKIP, additional_properties: nil) ⇒ BankTransferOptions2

Returns a new instance of BankTransferOptions2.



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

def initialize(customer_memo: SKIP, sec_code: SKIP, terminal_city: SKIP,
               terminal_state: SKIP, effective_date: SKIP,
               partial_payment_id: SKIP, settlement_method: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @customer_memo = customer_memo unless customer_memo == SKIP
  @sec_code = sec_code unless sec_code == SKIP
  @terminal_city = terminal_city unless terminal_city == SKIP
  @terminal_state = terminal_state unless terminal_state == SKIP
  @effective_date = effective_date unless effective_date == SKIP
  @partial_payment_id = partial_payment_id unless partial_payment_id == SKIP
  @settlement_method = settlement_method unless settlement_method == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#customer_memoString

Payment related information. This information is included on the customer’s statement.

Returns:

  • (String)


15
16
17
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options2.rb', line 15

def customer_memo
  @customer_memo
end

#effective_dateString

Effective date for the transaction. The effective date must be within 45 days of the current day. If you do not include this value, Visa Acceptance sets the effective date to the next business day. Format: MMDDYYYY Supported only for the Visa Acceptance ACH Service.

Returns:

  • (String)


50
51
52
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options2.rb', line 50

def effective_date
  @effective_date
end

#partial_payment_idString

Identifier for a partial payment or partial credit. The value for each debit request or credit request must be unique within the scope of the order.

Returns:

  • (String)


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

def partial_payment_id
  @partial_payment_id
end

#sec_codeString

Specifies the authorization method for the transaction.

TeleCheck

Accepts only the following values:

  • ARC: account receivable conversion
  • CCD: corporate cash disbursement
  • POP: point of purchase conversion
  • PPD: prearranged payment and deposit entry
  • TEL: telephone-initiated entry
  • WEB: internet-initiated entry

Returns:

  • (String)


27
28
29
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options2.rb', line 27

def sec_code
  @sec_code
end

#settlement_methodString

Method used for settlement. Possible values:

  • A: Automated Clearing House (default for credits and for transactions using Canadian dollars)
  • F: Facsimile draft (U.S. dollars only)
  • B: Best possible (U.S. dollars only) (default if the field has not already been configured for your merchant ID)

Returns:

  • (String)


67
68
69
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options2.rb', line 67

def settlement_method
  @settlement_method
end

#terminal_cityString

City in which the terminal is located. If more than four alphanumeric characters are submitted, the transaction will be declined. You cannot include any special characters.

Returns:

  • (String)


34
35
36
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options2.rb', line 34

def terminal_city
  @terminal_city
end

#terminal_stateString

State in which the terminal is located. If more than two alphanumeric characters are submitted, the transaction will be declined. You cannot include any special characters.

Returns:

  • (String)


41
42
43
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options2.rb', line 41

def terminal_state
  @terminal_state
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options2.rb', line 118

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  customer_memo = hash.key?('customerMemo') ? hash['customerMemo'] : SKIP
  sec_code = hash.key?('secCode') ? hash['secCode'] : SKIP
  terminal_city = hash.key?('terminalCity') ? hash['terminalCity'] : SKIP
  terminal_state = hash.key?('terminalState') ? hash['terminalState'] : SKIP
  effective_date = hash.key?('effectiveDate') ? hash['effectiveDate'] : SKIP
  partial_payment_id =
    hash.key?('partialPaymentId') ? hash['partialPaymentId'] : SKIP
  settlement_method =
    hash.key?('settlementMethod') ? hash['settlementMethod'] : 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.
  BankTransferOptions2.new(customer_memo: customer_memo,
                           sec_code: sec_code,
                           terminal_city: terminal_city,
                           terminal_state: terminal_state,
                           effective_date: effective_date,
                           partial_payment_id: partial_payment_id,
                           settlement_method: settlement_method,
                           additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



70
71
72
73
74
75
76
77
78
79
80
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options2.rb', line 70

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['customer_memo'] = 'customerMemo'
  @_hash['sec_code'] = 'secCode'
  @_hash['terminal_city'] = 'terminalCity'
  @_hash['terminal_state'] = 'terminalState'
  @_hash['effective_date'] = 'effectiveDate'
  @_hash['partial_payment_id'] = 'partialPaymentId'
  @_hash['settlement_method'] = 'settlementMethod'
  @_hash
end

.nullablesObject

An array for nullable fields



96
97
98
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options2.rb', line 96

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    customer_memo
    sec_code
    terminal_city
    terminal_state
    effective_date
    partial_payment_id
    settlement_method
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



160
161
162
163
164
165
166
167
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options2.rb', line 160

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} customer_memo: #{@customer_memo.inspect}, sec_code: #{@sec_code.inspect},"\
  " terminal_city: #{@terminal_city.inspect}, terminal_state: #{@terminal_state.inspect},"\
  " effective_date: #{@effective_date.inspect}, partial_payment_id:"\
  " #{@partial_payment_id.inspect}, settlement_method: #{@settlement_method.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



151
152
153
154
155
156
157
# File 'lib/visa_acceptance_merged_spec/models/bank_transfer_options2.rb', line 151

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} customer_memo: #{@customer_memo}, sec_code: #{@sec_code}, terminal_city:"\
  " #{@terminal_city}, terminal_state: #{@terminal_state}, effective_date: #{@effective_date},"\
  " partial_payment_id: #{@partial_payment_id}, settlement_method: #{@settlement_method},"\
  " additional_properties: #{@additional_properties}>"
end