Class: PaysecureApiDocumentationLive::PayInDetails2

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

Overview

PayInDetails2 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(type:, name:, email_address:, secret_qa:, secret_answer:, reference_number:, payment_method:, transaction_expiry:, qr_code:, gpay_uri:, phonepe_uri:, paytm_uri:, intent_uri:, generated_link:, instruction:, payment_url:, script:, clabe:, beneficiary:, amount:, link_expires_on:, card_expires_on:, sub_status:, additional_properties: nil) ⇒ PayInDetails2

Returns a new instance of PayInDetails2.



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
# File 'lib/paysecure_api_documentation_live/models/pay_in_details2.rb', line 162

def initialize(type:, name:, email_address:, secret_qa:, secret_answer:,
               reference_number:, payment_method:, transaction_expiry:,
               qr_code:, gpay_uri:, phonepe_uri:, paytm_uri:, intent_uri:,
               generated_link:, instruction:, payment_url:, script:, clabe:,
               beneficiary:, amount:, link_expires_on:, card_expires_on:,
               sub_status:, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @type = type
  @name = name
  @email_address = email_address
  @secret_qa = secret_qa
  @secret_answer = secret_answer
  @reference_number = reference_number
  @payment_method = payment_method
  @transaction_expiry = transaction_expiry
  @qr_code = qr_code
  @gpay_uri = gpay_uri
  @phonepe_uri = phonepe_uri
  @paytm_uri = paytm_uri
  @intent_uri = intent_uri
  @generated_link = generated_link
  @instruction = instruction
  @payment_url = payment_url
  @script = script
  @clabe = clabe
  @beneficiary = beneficiary
  @amount = amount
  @link_expires_on = link_expires_on
  @card_expires_on = card_expires_on
  @sub_status = sub_status
  @additional_properties = additional_properties
end

Instance Attribute Details

#amountString

TODO: Write general description for this method

Returns:

  • (String)


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

def amount
  @amount
end

#beneficiaryString

TODO: Write general description for this method

Returns:

  • (String)


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

def beneficiary
  @beneficiary
end

#card_expires_onString

TODO: Write general description for this method

Returns:

  • (String)


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

def card_expires_on
  @card_expires_on
end

#clabeString

TODO: Write general description for this method

Returns:

  • (String)


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

def clabe
  @clabe
end

#email_addressString

TODO: Write general description for this method

Returns:

  • (String)


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

def email_address
  @email_address
end

TODO: Write general description for this method

Returns:

  • (String)


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

def generated_link
  @generated_link
end

#gpay_uriString

TODO: Write general description for this method

Returns:

  • (String)


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

def gpay_uri
  @gpay_uri
end

#instructionString

TODO: Write general description for this method

Returns:

  • (String)


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

def instruction
  @instruction
end

#intent_uriString

TODO: Write general description for this method

Returns:

  • (String)


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

def intent_uri
  @intent_uri
end

TODO: Write general description for this method

Returns:

  • (String)


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

def link_expires_on
  @link_expires_on
end

#nameString

TODO: Write general description for this method

Returns:

  • (String)


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

def name
  @name
end

#payment_methodString

TODO: Write general description for this method

Returns:

  • (String)


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

def payment_method
  @payment_method
end

#payment_urlString

TODO: Write general description for this method

Returns:

  • (String)


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

def payment_url
  @payment_url
end

#paytm_uriString

TODO: Write general description for this method

Returns:

  • (String)


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

def paytm_uri
  @paytm_uri
end

#phonepe_uriString

TODO: Write general description for this method

Returns:

  • (String)


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

def phonepe_uri
  @phonepe_uri
end

#qr_codeString

TODO: Write general description for this method

Returns:

  • (String)


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

def qr_code
  @qr_code
end

#reference_numberString

TODO: Write general description for this method

Returns:

  • (String)


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

def reference_number
  @reference_number
end

#scriptString

TODO: Write general description for this method

Returns:

  • (String)


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

def script
  @script
end

#secret_answerString

TODO: Write general description for this method

Returns:

  • (String)


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

def secret_answer
  @secret_answer
end

#secret_qaString

TODO: Write general description for this method

Returns:

  • (String)


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

def secret_qa
  @secret_qa
end

#sub_statusString

TODO: Write general description for this method

Returns:

  • (String)


102
103
104
# File 'lib/paysecure_api_documentation_live/models/pay_in_details2.rb', line 102

def sub_status
  @sub_status
end

#transaction_expiryString

TODO: Write general description for this method

Returns:

  • (String)


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

def transaction_expiry
  @transaction_expiry
end

#typeString

TODO: Write general description for this method

Returns:

  • (String)


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

def type
  @type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/paysecure_api_documentation_live/models/pay_in_details2.rb', line 198

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  type = hash.key?('_type') ? hash['_type'] : nil
  name = hash.key?('name') ? hash['name'] : nil
  email_address = hash.key?('emailAddress') ? hash['emailAddress'] : nil
  secret_qa = hash.key?('secretQA') ? hash['secretQA'] : nil
  secret_answer = hash.key?('secretAnswer') ? hash['secretAnswer'] : nil
  reference_number =
    hash.key?('reference_number') ? hash['reference_number'] : nil
  payment_method =
    hash.key?('payment_method') ? hash['payment_method'] : nil
  transaction_expiry =
    hash.key?('transaction_expiry') ? hash['transaction_expiry'] : nil
  qr_code = hash.key?('qrCode') ? hash['qrCode'] : nil
  gpay_uri = hash.key?('gpayUri') ? hash['gpayUri'] : nil
  phonepe_uri = hash.key?('phonepeUri') ? hash['phonepeUri'] : nil
  paytm_uri = hash.key?('paytmUri') ? hash['paytmUri'] : nil
  intent_uri = hash.key?('intentUri') ? hash['intentUri'] : nil
  generated_link = hash.key?('generatedLink') ? hash['generatedLink'] : nil
  instruction = hash.key?('instruction') ? hash['instruction'] : nil
  payment_url = hash.key?('paymentUrl') ? hash['paymentUrl'] : nil
  script = hash.key?('script') ? hash['script'] : nil
  clabe = hash.key?('clabe') ? hash['clabe'] : nil
  beneficiary = hash.key?('beneficiary') ? hash['beneficiary'] : nil
  amount = hash.key?('amount') ? hash['amount'] : nil
  link_expires_on = hash.key?('linkExpiresOn') ? hash['linkExpiresOn'] : nil
  card_expires_on = hash.key?('cardExpiresOn') ? hash['cardExpiresOn'] : nil
  sub_status = hash.key?('subStatus') ? hash['subStatus'] : 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.
  PayInDetails2.new(type: type,
                    name: name,
                    email_address: email_address,
                    secret_qa: secret_qa,
                    secret_answer: secret_answer,
                    reference_number: reference_number,
                    payment_method: payment_method,
                    transaction_expiry: transaction_expiry,
                    qr_code: qr_code,
                    gpay_uri: gpay_uri,
                    phonepe_uri: phonepe_uri,
                    paytm_uri: paytm_uri,
                    intent_uri: intent_uri,
                    generated_link: generated_link,
                    instruction: instruction,
                    payment_url: payment_url,
                    script: script,
                    clabe: clabe,
                    beneficiary: beneficiary,
                    amount: amount,
                    link_expires_on: link_expires_on,
                    card_expires_on: card_expires_on,
                    sub_status: sub_status,
                    additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



105
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
# File 'lib/paysecure_api_documentation_live/models/pay_in_details2.rb', line 105

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['type'] = '_type'
  @_hash['name'] = 'name'
  @_hash['email_address'] = 'emailAddress'
  @_hash['secret_qa'] = 'secretQA'
  @_hash['secret_answer'] = 'secretAnswer'
  @_hash['reference_number'] = 'reference_number'
  @_hash['payment_method'] = 'payment_method'
  @_hash['transaction_expiry'] = 'transaction_expiry'
  @_hash['qr_code'] = 'qrCode'
  @_hash['gpay_uri'] = 'gpayUri'
  @_hash['phonepe_uri'] = 'phonepeUri'
  @_hash['paytm_uri'] = 'paytmUri'
  @_hash['intent_uri'] = 'intentUri'
  @_hash['generated_link'] = 'generatedLink'
  @_hash['instruction'] = 'instruction'
  @_hash['payment_url'] = 'paymentUrl'
  @_hash['script'] = 'script'
  @_hash['clabe'] = 'clabe'
  @_hash['beneficiary'] = 'beneficiary'
  @_hash['amount'] = 'amount'
  @_hash['link_expires_on'] = 'linkExpiresOn'
  @_hash['card_expires_on'] = 'cardExpiresOn'
  @_hash['sub_status'] = 'subStatus'
  @_hash
end

.nullablesObject

An array for nullable fields



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/paysecure_api_documentation_live/models/pay_in_details2.rb', line 139

def self.nullables
  %w[
    reference_number
    payment_method
    transaction_expiry
    qr_code
    gpay_uri
    phonepe_uri
    paytm_uri
    intent_uri
    generated_link
    instruction
    payment_url
    script
    clabe
    beneficiary
    amount
    link_expires_on
    card_expires_on
    sub_status
  ]
end

.optionalsObject

An array for optional fields



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

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



278
279
280
281
282
283
284
285
286
287
288
289
290
291
# File 'lib/paysecure_api_documentation_live/models/pay_in_details2.rb', line 278

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} type: #{@type.inspect}, name: #{@name.inspect}, email_address:"\
  " #{@email_address.inspect}, secret_qa: #{@secret_qa.inspect}, secret_answer:"\
  " #{@secret_answer.inspect}, reference_number: #{@reference_number.inspect}, payment_method:"\
  " #{@payment_method.inspect}, transaction_expiry: #{@transaction_expiry.inspect}, qr_code:"\
  " #{@qr_code.inspect}, gpay_uri: #{@gpay_uri.inspect}, phonepe_uri: #{@phonepe_uri.inspect},"\
  " paytm_uri: #{@paytm_uri.inspect}, intent_uri: #{@intent_uri.inspect}, generated_link:"\
  " #{@generated_link.inspect}, instruction: #{@instruction.inspect}, payment_url:"\
  " #{@payment_url.inspect}, script: #{@script.inspect}, clabe: #{@clabe.inspect},"\
  " beneficiary: #{@beneficiary.inspect}, amount: #{@amount.inspect}, link_expires_on:"\
  " #{@link_expires_on.inspect}, card_expires_on: #{@card_expires_on.inspect}, sub_status:"\
  " #{@sub_status.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



264
265
266
267
268
269
270
271
272
273
274
275
# File 'lib/paysecure_api_documentation_live/models/pay_in_details2.rb', line 264

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} type: #{@type}, name: #{@name}, email_address: #{@email_address},"\
  " secret_qa: #{@secret_qa}, secret_answer: #{@secret_answer}, reference_number:"\
  " #{@reference_number}, payment_method: #{@payment_method}, transaction_expiry:"\
  " #{@transaction_expiry}, qr_code: #{@qr_code}, gpay_uri: #{@gpay_uri}, phonepe_uri:"\
  " #{@phonepe_uri}, paytm_uri: #{@paytm_uri}, intent_uri: #{@intent_uri}, generated_link:"\
  " #{@generated_link}, instruction: #{@instruction}, payment_url: #{@payment_url}, script:"\
  " #{@script}, clabe: #{@clabe}, beneficiary: #{@beneficiary}, amount: #{@amount},"\
  " link_expires_on: #{@link_expires_on}, card_expires_on: #{@card_expires_on}, sub_status:"\
  " #{@sub_status}, additional_properties: #{@additional_properties}>"
end