Class: PaysecureApiDocumentationLive::Aft

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/paysecure_api_documentation_live/models/aft.rb

Overview

Aft 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(account_owner_address1:, account_owner_address2:, account_owner_street:, account_owner_postal_code:, account_owner_city:, account_owner_country:, merchant_postal_code:, merchant_state:, acceptor_legal_name:, sender_address:, sender_city:, sender_state:, sender_country:, sender_name:, sender_account_number:, recipient_name:, bai:, additional_properties: nil) ⇒ Aft

Returns a new instance of Aft.



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 113

def initialize(account_owner_address1:, account_owner_address2:,
               account_owner_street:, account_owner_postal_code:,
               account_owner_city:, account_owner_country:,
               merchant_postal_code:, merchant_state:, acceptor_legal_name:,
               sender_address:, sender_city:, sender_state:,
               sender_country:, sender_name:, sender_account_number:,
               recipient_name:, bai:, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @account_owner_address1 = 
  @account_owner_address2 = 
  @account_owner_street = 
  @account_owner_postal_code = 
  @account_owner_city = 
  @account_owner_country = 
  @merchant_postal_code = merchant_postal_code
  @merchant_state = merchant_state
  @acceptor_legal_name = acceptor_legal_name
  @sender_address = sender_address
  @sender_city = sender_city
  @sender_state = sender_state
  @sender_country = sender_country
  @sender_name = sender_name
  @sender_account_number = 
  @recipient_name = recipient_name
  @bai = bai
  @additional_properties = additional_properties
end

Instance Attribute Details

TODO: Write general description for this method

Returns:

  • (String)


46
47
48
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 46

def acceptor_legal_name
  @acceptor_legal_name
end

#account_owner_address1String

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 14

def 
  @account_owner_address1
end

#account_owner_address2String

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 18

def 
  @account_owner_address2
end

#account_owner_cityString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 30

def 
  @account_owner_city
end

#account_owner_countryString

TODO: Write general description for this method

Returns:

  • (String)


34
35
36
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 34

def 
  @account_owner_country
end

#account_owner_postal_codeString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 26

def 
  @account_owner_postal_code
end

#account_owner_streetString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 22

def 
  @account_owner_street
end

#baiString

TODO: Write general description for this method

Returns:

  • (String)


78
79
80
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 78

def bai
  @bai
end

#merchant_postal_codeString

TODO: Write general description for this method

Returns:

  • (String)


38
39
40
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 38

def merchant_postal_code
  @merchant_postal_code
end

#merchant_stateString

TODO: Write general description for this method

Returns:

  • (String)


42
43
44
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 42

def merchant_state
  @merchant_state
end

#recipient_nameString

TODO: Write general description for this method

Returns:

  • (String)


74
75
76
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 74

def recipient_name
  @recipient_name
end

#sender_account_numberString

TODO: Write general description for this method

Returns:

  • (String)


70
71
72
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 70

def 
  @sender_account_number
end

#sender_addressString

TODO: Write general description for this method

Returns:

  • (String)


50
51
52
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 50

def sender_address
  @sender_address
end

#sender_cityString

TODO: Write general description for this method

Returns:

  • (String)


54
55
56
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 54

def sender_city
  @sender_city
end

#sender_countryString

TODO: Write general description for this method

Returns:

  • (String)


62
63
64
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 62

def sender_country
  @sender_country
end

#sender_nameString

TODO: Write general description for this method

Returns:

  • (String)


66
67
68
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 66

def sender_name
  @sender_name
end

#sender_stateString

TODO: Write general description for this method

Returns:

  • (String)


58
59
60
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 58

def sender_state
  @sender_state
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 144

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   =
    hash.key?('account_owner_address1') ? hash['account_owner_address1'] : nil
   =
    hash.key?('account_owner_address2') ? hash['account_owner_address2'] : nil
   =
    hash.key?('account_owner_street') ? hash['account_owner_street'] : nil
   =
    hash.key?('account_owner_postal_code') ? hash['account_owner_postal_code'] : nil
   =
    hash.key?('account_owner_city') ? hash['account_owner_city'] : nil
   =
    hash.key?('account_owner_country') ? hash['account_owner_country'] : nil
  merchant_postal_code =
    hash.key?('merchant_postal_code') ? hash['merchant_postal_code'] : nil
  merchant_state =
    hash.key?('merchant_state') ? hash['merchant_state'] : nil
  acceptor_legal_name =
    hash.key?('acceptor_legal_name') ? hash['acceptor_legal_name'] : nil
  sender_address =
    hash.key?('sender_address') ? hash['sender_address'] : nil
  sender_city = hash.key?('sender_city') ? hash['sender_city'] : nil
  sender_state = hash.key?('sender_state') ? hash['sender_state'] : nil
  sender_country =
    hash.key?('sender_country') ? hash['sender_country'] : nil
  sender_name = hash.key?('sender_name') ? hash['sender_name'] : nil
   =
    hash.key?('sender_account_number') ? hash['sender_account_number'] : nil
  recipient_name =
    hash.key?('recipient_name') ? hash['recipient_name'] : nil
  bai = hash.key?('bai') ? hash['bai'] : nil

  # 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.
  Aft.new(account_owner_address1: ,
          account_owner_address2: ,
          account_owner_street: ,
          account_owner_postal_code: ,
          account_owner_city: ,
          account_owner_country: ,
          merchant_postal_code: merchant_postal_code,
          merchant_state: merchant_state,
          acceptor_legal_name: acceptor_legal_name,
          sender_address: sender_address,
          sender_city: sender_city,
          sender_state: sender_state,
          sender_country: sender_country,
          sender_name: sender_name,
          sender_account_number: ,
          recipient_name: recipient_name,
          bai: bai,
          additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 81

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_owner_address1'] = 'account_owner_address1'
  @_hash['account_owner_address2'] = 'account_owner_address2'
  @_hash['account_owner_street'] = 'account_owner_street'
  @_hash['account_owner_postal_code'] = 'account_owner_postal_code'
  @_hash['account_owner_city'] = 'account_owner_city'
  @_hash['account_owner_country'] = 'account_owner_country'
  @_hash['merchant_postal_code'] = 'merchant_postal_code'
  @_hash['merchant_state'] = 'merchant_state'
  @_hash['acceptor_legal_name'] = 'acceptor_legal_name'
  @_hash['sender_address'] = 'sender_address'
  @_hash['sender_city'] = 'sender_city'
  @_hash['sender_state'] = 'sender_state'
  @_hash['sender_country'] = 'sender_country'
  @_hash['sender_name'] = 'sender_name'
  @_hash['sender_account_number'] = 'sender_account_number'
  @_hash['recipient_name'] = 'recipient_name'
  @_hash['bai'] = 'bai'
  @_hash
end

.nullablesObject

An array for nullable fields



109
110
111
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 109

def self.nullables
  []
end

.optionalsObject

An array for optional fields



104
105
106
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 104

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 223

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} account_owner_address1: #{@account_owner_address1.inspect},"\
  " account_owner_address2: #{@account_owner_address2.inspect}, account_owner_street:"\
  " #{@account_owner_street.inspect}, account_owner_postal_code:"\
  " #{@account_owner_postal_code.inspect}, account_owner_city: #{@account_owner_city.inspect},"\
  " account_owner_country: #{@account_owner_country.inspect}, merchant_postal_code:"\
  " #{@merchant_postal_code.inspect}, merchant_state: #{@merchant_state.inspect},"\
  " acceptor_legal_name: #{@acceptor_legal_name.inspect}, sender_address:"\
  " #{@sender_address.inspect}, sender_city: #{@sender_city.inspect}, sender_state:"\
  " #{@sender_state.inspect}, sender_country: #{@sender_country.inspect}, sender_name:"\
  " #{@sender_name.inspect}, sender_account_number: #{@sender_account_number.inspect},"\
  " recipient_name: #{@recipient_name.inspect}, bai: #{@bai.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/paysecure_api_documentation_live/models/aft.rb', line 208

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} account_owner_address1: #{@account_owner_address1}, account_owner_address2:"\
  " #{@account_owner_address2}, account_owner_street: #{@account_owner_street},"\
  " account_owner_postal_code: #{@account_owner_postal_code}, account_owner_city:"\
  " #{@account_owner_city}, account_owner_country: #{@account_owner_country},"\
  " merchant_postal_code: #{@merchant_postal_code}, merchant_state: #{@merchant_state},"\
  " acceptor_legal_name: #{@acceptor_legal_name}, sender_address: #{@sender_address},"\
  " sender_city: #{@sender_city}, sender_state: #{@sender_state}, sender_country:"\
  " #{@sender_country}, sender_name: #{@sender_name}, sender_account_number:"\
  " #{@sender_account_number}, recipient_name: #{@recipient_name}, bai: #{@bai},"\
  " additional_properties: #{@additional_properties}>"
end