Class: PaysecureApiDocumentationLive::Names

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

Overview

Names 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(netbanking:, amex:, master:, crypto_bridge:, payid:, spei:, discover:, jcb:, visa:, neosurf:, interac_e_transfer:, thirdparty_upi:, virtual_iban:, banktransfer:, diners:, interac_request_money:, upi_collect:, upi_qr:, mobilemoney:, fawry_pay:, virtual_account:, pix:, additional_properties: nil) ⇒ Names

Returns a new instance of Names.



138
139
140
141
142
143
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
# File 'lib/paysecure_api_documentation_live/models/names.rb', line 138

def initialize(netbanking:, amex:, master:, crypto_bridge:, payid:, spei:,
               discover:, jcb:, visa:, neosurf:, interac_e_transfer:,
               thirdparty_upi:, virtual_iban:, banktransfer:, diners:,
               interac_request_money:, upi_collect:, upi_qr:, mobilemoney:,
               fawry_pay:, virtual_account:, pix:,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @netbanking = netbanking
  @amex = amex
  @master = master
  @crypto_bridge = crypto_bridge
  @payid = payid
  @spei = spei
  @discover = discover
  @jcb = jcb
  @visa = visa
  @neosurf = neosurf
  @interac_e_transfer = interac_e_transfer
  @thirdparty_upi = thirdparty_upi
  @virtual_iban = virtual_iban
  @banktransfer = banktransfer
  @diners = diners
  @interac_request_money = interac_request_money
  @upi_collect = upi_collect
  @upi_qr = upi_qr
  @mobilemoney = mobilemoney
  @fawry_pay = fawry_pay
  @virtual_account = 
  @pix = pix
  @additional_properties = additional_properties
end

Instance Attribute Details

#amexString

TODO: Write general description for this method

Returns:

  • (String)


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

def amex
  @amex
end

#banktransferString

TODO: Write general description for this method

Returns:

  • (String)


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

def banktransfer
  @banktransfer
end

#crypto_bridgeString

TODO: Write general description for this method

Returns:

  • (String)


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

def crypto_bridge
  @crypto_bridge
end

#dinersString

TODO: Write general description for this method

Returns:

  • (String)


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

def diners
  @diners
end

#discoverString

TODO: Write general description for this method

Returns:

  • (String)


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

def discover
  @discover
end

#fawry_payString

TODO: Write general description for this method

Returns:

  • (String)


90
91
92
# File 'lib/paysecure_api_documentation_live/models/names.rb', line 90

def fawry_pay
  @fawry_pay
end

#interac_e_transferString

TODO: Write general description for this method

Returns:

  • (String)


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

def interac_e_transfer
  @interac_e_transfer
end

#interac_request_moneyString

TODO: Write general description for this method

Returns:

  • (String)


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

def interac_request_money
  @interac_request_money
end

#jcbString

TODO: Write general description for this method

Returns:

  • (String)


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

def jcb
  @jcb
end

#masterString

TODO: Write general description for this method

Returns:

  • (String)


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

def master
  @master
end

#mobilemoneyString

TODO: Write general description for this method

Returns:

  • (String)


86
87
88
# File 'lib/paysecure_api_documentation_live/models/names.rb', line 86

def mobilemoney
  @mobilemoney
end

#neosurfString

TODO: Write general description for this method

Returns:

  • (String)


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

def neosurf
  @neosurf
end

#netbankingString

TODO: Write general description for this method

Returns:

  • (String)


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

def netbanking
  @netbanking
end

#payidString

TODO: Write general description for this method

Returns:

  • (String)


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

def payid
  @payid
end

#pixString

TODO: Write general description for this method

Returns:

  • (String)


98
99
100
# File 'lib/paysecure_api_documentation_live/models/names.rb', line 98

def pix
  @pix
end

#speiString

TODO: Write general description for this method

Returns:

  • (String)


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

def spei
  @spei
end

#thirdparty_upiString

TODO: Write general description for this method

Returns:

  • (String)


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

def thirdparty_upi
  @thirdparty_upi
end

#upi_collectString

TODO: Write general description for this method

Returns:

  • (String)


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

def upi_collect
  @upi_collect
end

#upi_qrString

TODO: Write general description for this method

Returns:

  • (String)


82
83
84
# File 'lib/paysecure_api_documentation_live/models/names.rb', line 82

def upi_qr
  @upi_qr
end

#virtual_accountString

TODO: Write general description for this method

Returns:

  • (String)


94
95
96
# File 'lib/paysecure_api_documentation_live/models/names.rb', line 94

def 
  @virtual_account
end

#virtual_ibanString

TODO: Write general description for this method

Returns:

  • (String)


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

def virtual_iban
  @virtual_iban
end

#visaString

TODO: Write general description for this method

Returns:

  • (String)


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

def visa
  @visa
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/paysecure_api_documentation_live/models/names.rb', line 173

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  netbanking = hash.key?('NETBANKING') ? hash['NETBANKING'] : nil
  amex = hash.key?('AMEX') ? hash['AMEX'] : nil
  master = hash.key?('MASTER') ? hash['MASTER'] : nil
  crypto_bridge = hash.key?('CRYPTO-BRIDGE') ? hash['CRYPTO-BRIDGE'] : nil
  payid = hash.key?('PAYID') ? hash['PAYID'] : nil
  spei = hash.key?('SPEI') ? hash['SPEI'] : nil
  discover = hash.key?('DISCOVER') ? hash['DISCOVER'] : nil
  jcb = hash.key?('JCB') ? hash['JCB'] : nil
  visa = hash.key?('VISA') ? hash['VISA'] : nil
  neosurf = hash.key?('NEOSURF') ? hash['NEOSURF'] : nil
  interac_e_transfer =
    hash.key?('INTERAC-E-TRANSFER') ? hash['INTERAC-E-TRANSFER'] : nil
  thirdparty_upi =
    hash.key?('THIRDPARTY-UPI') ? hash['THIRDPARTY-UPI'] : nil
  virtual_iban = hash.key?('VIRTUAL-IBAN') ? hash['VIRTUAL-IBAN'] : nil
  banktransfer = hash.key?('BANKTRANSFER') ? hash['BANKTRANSFER'] : nil
  diners = hash.key?('DINERS') ? hash['DINERS'] : nil
  interac_request_money =
    hash.key?('INTERAC-REQUEST-MONEY') ? hash['INTERAC-REQUEST-MONEY'] : nil
  upi_collect = hash.key?('UPI-COLLECT') ? hash['UPI-COLLECT'] : nil
  upi_qr = hash.key?('UPI-QR') ? hash['UPI-QR'] : nil
  mobilemoney = hash.key?('MOBILEMONEY') ? hash['MOBILEMONEY'] : nil
  fawry_pay = hash.key?('FawryPay') ? hash['FawryPay'] : nil
   =
    hash.key?('VIRTUAL-ACCOUNT') ? hash['VIRTUAL-ACCOUNT'] : nil
  pix = hash.key?('PIX') ? hash['PIX'] : 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.
  Names.new(netbanking: netbanking,
            amex: amex,
            master: master,
            crypto_bridge: crypto_bridge,
            payid: payid,
            spei: spei,
            discover: discover,
            jcb: jcb,
            visa: visa,
            neosurf: neosurf,
            interac_e_transfer: interac_e_transfer,
            thirdparty_upi: thirdparty_upi,
            virtual_iban: virtual_iban,
            banktransfer: banktransfer,
            diners: diners,
            interac_request_money: interac_request_money,
            upi_collect: upi_collect,
            upi_qr: upi_qr,
            mobilemoney: mobilemoney,
            fawry_pay: fawry_pay,
            virtual_account: ,
            pix: pix,
            additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/paysecure_api_documentation_live/models/names.rb', line 101

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['netbanking'] = 'NETBANKING'
  @_hash['amex'] = 'AMEX'
  @_hash['master'] = 'MASTER'
  @_hash['crypto_bridge'] = 'CRYPTO-BRIDGE'
  @_hash['payid'] = 'PAYID'
  @_hash['spei'] = 'SPEI'
  @_hash['discover'] = 'DISCOVER'
  @_hash['jcb'] = 'JCB'
  @_hash['visa'] = 'VISA'
  @_hash['neosurf'] = 'NEOSURF'
  @_hash['interac_e_transfer'] = 'INTERAC-E-TRANSFER'
  @_hash['thirdparty_upi'] = 'THIRDPARTY-UPI'
  @_hash['virtual_iban'] = 'VIRTUAL-IBAN'
  @_hash['banktransfer'] = 'BANKTRANSFER'
  @_hash['diners'] = 'DINERS'
  @_hash['interac_request_money'] = 'INTERAC-REQUEST-MONEY'
  @_hash['upi_collect'] = 'UPI-COLLECT'
  @_hash['upi_qr'] = 'UPI-QR'
  @_hash['mobilemoney'] = 'MOBILEMONEY'
  @_hash['fawry_pay'] = 'FawryPay'
  @_hash['virtual_account'] = 'VIRTUAL-ACCOUNT'
  @_hash['pix'] = 'PIX'
  @_hash
end

.nullablesObject

An array for nullable fields



134
135
136
# File 'lib/paysecure_api_documentation_live/models/names.rb', line 134

def self.nullables
  []
end

.optionalsObject

An array for optional fields



129
130
131
# File 'lib/paysecure_api_documentation_live/models/names.rb', line 129

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



251
252
253
254
255
256
257
258
259
260
261
262
263
# File 'lib/paysecure_api_documentation_live/models/names.rb', line 251

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} netbanking: #{@netbanking.inspect}, amex: #{@amex.inspect}, master:"\
  " #{@master.inspect}, crypto_bridge: #{@crypto_bridge.inspect}, payid: #{@payid.inspect},"\
  " spei: #{@spei.inspect}, discover: #{@discover.inspect}, jcb: #{@jcb.inspect}, visa:"\
  " #{@visa.inspect}, neosurf: #{@neosurf.inspect}, interac_e_transfer:"\
  " #{@interac_e_transfer.inspect}, thirdparty_upi: #{@thirdparty_upi.inspect}, virtual_iban:"\
  " #{@virtual_iban.inspect}, banktransfer: #{@banktransfer.inspect}, diners:"\
  " #{@diners.inspect}, interac_request_money: #{@interac_request_money.inspect}, upi_collect:"\
  " #{@upi_collect.inspect}, upi_qr: #{@upi_qr.inspect}, mobilemoney: #{@mobilemoney.inspect},"\
  " fawry_pay: #{@fawry_pay.inspect}, virtual_account: #{@virtual_account.inspect}, pix:"\
  " #{@pix.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



238
239
240
241
242
243
244
245
246
247
248
# File 'lib/paysecure_api_documentation_live/models/names.rb', line 238

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} netbanking: #{@netbanking}, amex: #{@amex}, master: #{@master},"\
  " crypto_bridge: #{@crypto_bridge}, payid: #{@payid}, spei: #{@spei}, discover:"\
  " #{@discover}, jcb: #{@jcb}, visa: #{@visa}, neosurf: #{@neosurf}, interac_e_transfer:"\
  " #{@interac_e_transfer}, thirdparty_upi: #{@thirdparty_upi}, virtual_iban:"\
  " #{@virtual_iban}, banktransfer: #{@banktransfer}, diners: #{@diners},"\
  " interac_request_money: #{@interac_request_money}, upi_collect: #{@upi_collect}, upi_qr:"\
  " #{@upi_qr}, mobilemoney: #{@mobilemoney}, fawry_pay: #{@fawry_pay}, virtual_account:"\
  " #{@virtual_account}, pix: #{@pix}, additional_properties: #{@additional_properties}>"
end