Class: VisaAcceptanceMergedSpec::PtsV2PaymentsPost201Response

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

Overview

PtsV2PaymentsPost201Response 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(links: SKIP, id: SKIP, message: SKIP, submit_time_utc: SKIP, status: SKIP, reconciliation_id: SKIP, error_information: SKIP, client_reference_information: SKIP, processing_information: SKIP, processor_information: SKIP, issuer_information: SKIP, payment_account_information: SKIP, payment_information: SKIP, payment_insights_information: SKIP, order_information: SKIP, point_of_sale_information: SKIP, installment_information: SKIP, token_information: SKIP, buyer_information: SKIP, risk_information: SKIP, consumer_authentication_information: SKIP, merchant_information: SKIP, embedded_actions: SKIP, watchlist_screening_information: SKIP, additional_properties: nil) ⇒ PtsV2PaymentsPost201Response

Returns a new instance of PtsV2PaymentsPost201Response.



287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 287

def initialize(links: SKIP, id: SKIP, message: SKIP, submit_time_utc: SKIP,
               status: SKIP, reconciliation_id: SKIP,
               error_information: SKIP, client_reference_information: SKIP,
               processing_information: SKIP, processor_information: SKIP,
               issuer_information: SKIP, payment_account_information: SKIP,
               payment_information: SKIP,
               payment_insights_information: SKIP, order_information: SKIP,
               point_of_sale_information: SKIP,
               installment_information: SKIP, token_information: SKIP,
               buyer_information: SKIP, risk_information: SKIP,
               consumer_authentication_information: SKIP,
               merchant_information: SKIP, embedded_actions: SKIP,
               watchlist_screening_information: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @links = links unless links == SKIP
  @id = id unless id == SKIP
  @message = message unless message == SKIP
  @submit_time_utc = submit_time_utc unless submit_time_utc == SKIP
  @status = status unless status == SKIP
  @reconciliation_id = reconciliation_id unless reconciliation_id == SKIP
  @error_information = error_information unless error_information == SKIP
  unless client_reference_information == SKIP
    @client_reference_information =
      client_reference_information
  end
  @processing_information = processing_information unless processing_information == SKIP
  @processor_information = processor_information unless processor_information == SKIP
  @issuer_information = issuer_information unless issuer_information == SKIP
  unless  == SKIP
    @payment_account_information =
      
  end
  @payment_information = payment_information unless payment_information == SKIP
  unless payment_insights_information == SKIP
    @payment_insights_information =
      payment_insights_information
  end
  @order_information = order_information unless order_information == SKIP
  unless point_of_sale_information == SKIP
    @point_of_sale_information =
      point_of_sale_information
  end
  @installment_information = installment_information unless installment_information == SKIP
  @token_information = token_information unless token_information == SKIP
  @buyer_information = buyer_information unless buyer_information == SKIP
  @risk_information = risk_information unless risk_information == SKIP
  unless consumer_authentication_information == SKIP
    @consumer_authentication_information =
      consumer_authentication_information
  end
  @merchant_information = merchant_information unless merchant_information == SKIP
  @embedded_actions = embedded_actions unless embedded_actions == SKIP
  unless watchlist_screening_information == SKIP
    @watchlist_screening_information =
      watchlist_screening_information
  end
  @additional_properties = additional_properties
end

Instance Attribute Details

#buyer_information ⇒ BuyerInformation1

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.

Returns:



173
174
175
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 173

def buyer_information
  @buyer_information
end

#client_reference_information ⇒ ClientReferenceInformation1

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.



74
75
76
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 74

def client_reference_information
  @client_reference_information
end

#consumer_authentication_information ⇒ ConsumerAuthenticationInformation1

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.



191
192
193
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 191

def consumer_authentication_information
  @consumer_authentication_information
end

#embedded_actions ⇒ EmbeddedActions2

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.

Returns:



209
210
211
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 209

def embedded_actions
  @embedded_actions
end

#error_information ⇒ ErrorInformation

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.

Returns:



65
66
67
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 65

def error_information
  @error_information
end

#id ⇒ String

An unique identification number generated by Visa Acceptance to identify the submitted request. Returned by all services. It is also appended to the endpoint of the resource. On incremental authorizations, this value with be the same as the identification number returned in the original authorization response.

Returns:

  • (String)


22
23
24
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 22

def id
  @id
end

#installment_information ⇒ InstallmentInformation1

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.



155
156
157
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 155

def installment_information
  @installment_information
end

#issuer_information ⇒ IssuerInformation2

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.

Returns:



101
102
103
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 101

def issuer_information
  @issuer_information
end

TODO: Write general description for this method

Returns:



14
15
16
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 14

def links
  @links
end

#merchant_information ⇒ MerchantInformation1

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.



200
201
202
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 200

def merchant_information
  @merchant_information
end

#message ⇒ String

More information about the transaction response.

Returns:

  • (String)


26
27
28
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 26

def message
  @message
end

#order_information ⇒ OrderInformation1

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.

Returns:



137
138
139
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 137

def order_information
  @order_information
end

#payment_account_information ⇒ PaymentAccountInformation

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.



110
111
112
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 110

def 
  @payment_account_information
end

#payment_information ⇒ PaymentInformation1

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.

Returns:



119
120
121
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 119

def payment_information
  @payment_information
end

#payment_insights_information ⇒ PaymentInsightsInformation

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.



128
129
130
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 128

def payment_insights_information
  @payment_insights_information
end

#point_of_sale_information ⇒ PointOfSaleInformation1

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.



146
147
148
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 146

def point_of_sale_information
  @point_of_sale_information
end

#processing_information ⇒ ProcessingInformation1

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.



83
84
85
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 83

def processing_information
  @processing_information
end

#processor_information ⇒ ProcessorInformation1

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.



92
93
94
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 92

def processor_information
  @processor_information
end

#reconciliation_id ⇒ String

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.

Returns:

  • (String)


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

def reconciliation_id
  @reconciliation_id
end

#risk_information ⇒ RiskInformation22

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.

Returns:



182
183
184
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 182

def risk_information
  @risk_information
end

#status ⇒ String

The status of the submitted transaction. Possible values:

  • AUTHORIZED
  • PARTIAL_AUTHORIZED
  • AUTHORIZED_PENDING_REVIEW
  • AUTHORIZED_RISK_DECLINED
  • PENDING_AUTHENTICATION
  • PENDING_REVIEW
  • DECLINED
  • INVALID_REQUEST

Returns:

  • (String)


47
48
49
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 47

def status
  @status
end

#submit_time_utc ⇒ String

Time of request in UTC. Format: YYYY-MM-DDThh:mm:ssZ Example 2016-08-11T22:47:57Z equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The T separates the date and the time. The Z indicates UTC. Returned by Visa Acceptance for all services.

Returns:

  • (String)


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

def submit_time_utc
  @submit_time_utc
end

#token_information ⇒ TokenInformation1

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.

Returns:



164
165
166
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 164

def token_information
  @token_information
end

#watchlist_screening_information ⇒ WatchlistScreeningInformation1

Reference number for the transaction. Depending on how your Visa Acceptance account is configured, this value could either be provided in the API request or generated by Visa Acceptance. The actual value used in the request to the processor is provided back to you by Visa Acceptance in the response.



218
219
220
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 218

def watchlist_screening_information
  @watchlist_screening_information
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 350

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  links = Links.from_hash(hash['_links']) if hash['_links']
  id = hash.key?('id') ? hash['id'] : SKIP
  message = hash.key?('message') ? hash['message'] : SKIP
  submit_time_utc =
    hash.key?('submitTimeUtc') ? hash['submitTimeUtc'] : SKIP
  status = hash.key?('status') ? hash['status'] : SKIP
  reconciliation_id =
    hash.key?('reconciliationId') ? hash['reconciliationId'] : SKIP
  error_information = ErrorInformation.from_hash(hash['errorInformation']) if
    hash['errorInformation']
  if hash['clientReferenceInformation']
    client_reference_information = ClientReferenceInformation1.from_hash(hash['clientReferenceInformation'])
  end
  processing_information = ProcessingInformation1.from_hash(hash['processingInformation']) if
    hash['processingInformation']
  processor_information = ProcessorInformation1.from_hash(hash['processorInformation']) if
    hash['processorInformation']
  issuer_information = IssuerInformation2.from_hash(hash['issuerInformation']) if
    hash['issuerInformation']
  if hash['paymentAccountInformation']
     = PaymentAccountInformation.from_hash(hash['paymentAccountInformation'])
  end
  payment_information = PaymentInformation1.from_hash(hash['paymentInformation']) if
    hash['paymentInformation']
  if hash['paymentInsightsInformation']
    payment_insights_information = PaymentInsightsInformation.from_hash(hash['paymentInsightsInformation'])
  end
  order_information = OrderInformation1.from_hash(hash['orderInformation']) if
    hash['orderInformation']
  if hash['pointOfSaleInformation']
    point_of_sale_information = PointOfSaleInformation1.from_hash(hash['pointOfSaleInformation'])
  end
  installment_information = InstallmentInformation1.from_hash(hash['installmentInformation']) if
    hash['installmentInformation']
  token_information = TokenInformation1.from_hash(hash['tokenInformation']) if
    hash['tokenInformation']
  buyer_information = BuyerInformation1.from_hash(hash['buyerInformation']) if
    hash['buyerInformation']
  risk_information = RiskInformation22.from_hash(hash['riskInformation']) if
    hash['riskInformation']
  if hash['consumerAuthenticationInformation']
    consumer_authentication_information = ConsumerAuthenticationInformation1.from_hash(hash['consumerAuthenticationInformation'])
  end
  merchant_information = MerchantInformation1.from_hash(hash['merchantInformation']) if
    hash['merchantInformation']
  embedded_actions = EmbeddedActions2.from_hash(hash['embeddedActions']) if
    hash['embeddedActions']
  if hash['watchlistScreeningInformation']
    watchlist_screening_information = WatchlistScreeningInformation1.from_hash(hash['watchlistScreeningInformation'])
  end

  # 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.
  PtsV2PaymentsPost201Response.new(links: links,
                                   id: id,
                                   message: message,
                                   submit_time_utc: submit_time_utc,
                                   status: status,
                                   reconciliation_id: reconciliation_id,
                                   error_information: error_information,
                                   client_reference_information: client_reference_information,
                                   processing_information: processing_information,
                                   processor_information: processor_information,
                                   issuer_information: issuer_information,
                                   payment_account_information: ,
                                   payment_information: payment_information,
                                   payment_insights_information: payment_insights_information,
                                   order_information: order_information,
                                   point_of_sale_information: point_of_sale_information,
                                   installment_information: installment_information,
                                   token_information: token_information,
                                   buyer_information: buyer_information,
                                   risk_information: risk_information,
                                   consumer_authentication_information: consumer_authentication_information,
                                   merchant_information: merchant_information,
                                   embedded_actions: embedded_actions,
                                   watchlist_screening_information: watchlist_screening_information,
                                   additional_properties: additional_properties)
end

.names ⇒ Object

A mapping from model property names to API property names.



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
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 221

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['links'] = '_links'
  @_hash['id'] = 'id'
  @_hash['message'] = 'message'
  @_hash['submit_time_utc'] = 'submitTimeUtc'
  @_hash['status'] = 'status'
  @_hash['reconciliation_id'] = 'reconciliationId'
  @_hash['error_information'] = 'errorInformation'
  @_hash['client_reference_information'] = 'clientReferenceInformation'
  @_hash['processing_information'] = 'processingInformation'
  @_hash['processor_information'] = 'processorInformation'
  @_hash['issuer_information'] = 'issuerInformation'
  @_hash['payment_account_information'] = 'paymentAccountInformation'
  @_hash['payment_information'] = 'paymentInformation'
  @_hash['payment_insights_information'] = 'paymentInsightsInformation'
  @_hash['order_information'] = 'orderInformation'
  @_hash['point_of_sale_information'] = 'pointOfSaleInformation'
  @_hash['installment_information'] = 'installmentInformation'
  @_hash['token_information'] = 'tokenInformation'
  @_hash['buyer_information'] = 'buyerInformation'
  @_hash['risk_information'] = 'riskInformation'
  @_hash['consumer_authentication_information'] =
    'consumerAuthenticationInformation'
  @_hash['merchant_information'] = 'merchantInformation'
  @_hash['embedded_actions'] = 'embeddedActions'
  @_hash['watchlist_screening_information'] =
    'watchlistScreeningInformation'
  @_hash
end

.nullables ⇒ Object

An array for nullable fields



283
284
285
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 283

def self.nullables
  []
end

.optionals ⇒ Object

An array for optional fields



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 253

def self.optionals
  %w[
    links
    id
    message
    submit_time_utc
    status
    reconciliation_id
    error_information
    client_reference_information
    processing_information
    processor_information
    issuer_information
    payment_account_information
    payment_information
    payment_insights_information
    order_information
    point_of_sale_information
    installment_information
    token_information
    buyer_information
    risk_information
    consumer_authentication_information
    merchant_information
    embedded_actions
    watchlist_screening_information
  ]
end

Instance Method Details

#inspect ⇒ Object

Provides a debugging-friendly string with detailed object information.



461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 461

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} links: #{@links.inspect}, id: #{@id.inspect}, message: #{@message.inspect},"\
  " submit_time_utc: #{@submit_time_utc.inspect}, status: #{@status.inspect},"\
  " reconciliation_id: #{@reconciliation_id.inspect}, error_information:"\
  " #{@error_information.inspect}, client_reference_information:"\
  " #{@client_reference_information.inspect}, processing_information:"\
  " #{@processing_information.inspect}, processor_information:"\
  " #{@processor_information.inspect}, issuer_information: #{@issuer_information.inspect},"\
  " payment_account_information: #{@payment_account_information.inspect}, payment_information:"\
  " #{@payment_information.inspect}, payment_insights_information:"\
  " #{@payment_insights_information.inspect}, order_information:"\
  " #{@order_information.inspect}, point_of_sale_information:"\
  " #{@point_of_sale_information.inspect}, installment_information:"\
  " #{@installment_information.inspect}, token_information: #{@token_information.inspect},"\
  " buyer_information: #{@buyer_information.inspect}, risk_information:"\
  " #{@risk_information.inspect}, consumer_authentication_information:"\
  " #{@consumer_authentication_information.inspect}, merchant_information:"\
  " #{@merchant_information.inspect}, embedded_actions: #{@embedded_actions.inspect},"\
  " watchlist_screening_information: #{@watchlist_screening_information.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_s ⇒ Object

Provides a human-readable string representation of the object.



441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
# File 'lib/visa_acceptance_merged_spec/models/pts_v2_payments_post201_response.rb', line 441

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} links: #{@links}, id: #{@id}, message: #{@message}, submit_time_utc:"\
  " #{@submit_time_utc}, status: #{@status}, reconciliation_id: #{@reconciliation_id},"\
  " error_information: #{@error_information}, client_reference_information:"\
  " #{@client_reference_information}, processing_information: #{@processing_information},"\
  " processor_information: #{@processor_information}, issuer_information:"\
  " #{@issuer_information}, payment_account_information: #{@payment_account_information},"\
  " payment_information: #{@payment_information}, payment_insights_information:"\
  " #{@payment_insights_information}, order_information: #{@order_information},"\
  " point_of_sale_information: #{@point_of_sale_information}, installment_information:"\
  " #{@installment_information}, token_information: #{@token_information}, buyer_information:"\
  " #{@buyer_information}, risk_information: #{@risk_information},"\
  " consumer_authentication_information: #{@consumer_authentication_information},"\
  " merchant_information: #{@merchant_information}, embedded_actions: #{@embedded_actions},"\
  " watchlist_screening_information: #{@watchlist_screening_information},"\
  " additional_properties: #{@additional_properties}>"
end