Class: PaypalServerSdk::ThreeDSecureCardAuthenticationResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/paypal_server_sdk/models/three_d_secure_card_authentication_response.rb

Overview

Results of 3D Secure Authentication.

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(authentication_status: SKIP, enrollment_status: SKIP, authentication_id: SKIP) ⇒ ThreeDSecureCardAuthenticationResponse

Returns a new instance of ThreeDSecureCardAuthenticationResponse.



49
50
51
52
53
54
# File 'lib/paypal_server_sdk/models/three_d_secure_card_authentication_response.rb', line 49

def initialize(authentication_status: SKIP, enrollment_status: SKIP,
               authentication_id: SKIP)
  @authentication_status = authentication_status unless authentication_status == SKIP
  @enrollment_status = enrollment_status unless enrollment_status == SKIP
  @authentication_id = authentication_id unless authentication_id == SKIP
end

Instance Attribute Details

#authentication_idString

The externally received 3ds authentication id, to be returned in card detokenization response.

Returns:

  • (String)


24
25
26
# File 'lib/paypal_server_sdk/models/three_d_secure_card_authentication_response.rb', line 24

def authentication_id
  @authentication_id
end

#authentication_statusPaResStatus

Transactions status result identifier. The outcome of the issuer’s authentication.

Returns:



15
16
17
# File 'lib/paypal_server_sdk/models/three_d_secure_card_authentication_response.rb', line 15

def authentication_status
  @authentication_status
end

#enrollment_statusEnrollmentStatus

Status of Authentication eligibility.

Returns:



19
20
21
# File 'lib/paypal_server_sdk/models/three_d_secure_card_authentication_response.rb', line 19

def enrollment_status
  @enrollment_status
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/paypal_server_sdk/models/three_d_secure_card_authentication_response.rb', line 57

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  authentication_status =
    hash.key?('authentication_status') ? hash['authentication_status'] : SKIP
  enrollment_status =
    hash.key?('enrollment_status') ? hash['enrollment_status'] : SKIP
  authentication_id =
    hash.key?('authentication_id') ? hash['authentication_id'] : SKIP

  # Create object from extracted values.
  ThreeDSecureCardAuthenticationResponse.new(authentication_status: authentication_status,
                                             enrollment_status: enrollment_status,
                                             authentication_id: authentication_id)
end

.namesObject

A mapping from model property names to API property names.



27
28
29
30
31
32
33
# File 'lib/paypal_server_sdk/models/three_d_secure_card_authentication_response.rb', line 27

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['authentication_status'] = 'authentication_status'
  @_hash['enrollment_status'] = 'enrollment_status'
  @_hash['authentication_id'] = 'authentication_id'
  @_hash
end

.nullablesObject

An array for nullable fields



45
46
47
# File 'lib/paypal_server_sdk/models/three_d_secure_card_authentication_response.rb', line 45

def self.nullables
  []
end

.optionalsObject

An array for optional fields



36
37
38
39
40
41
42
# File 'lib/paypal_server_sdk/models/three_d_secure_card_authentication_response.rb', line 36

def self.optionals
  %w[
    authentication_status
    enrollment_status
    authentication_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



82
83
84
85
86
87
# File 'lib/paypal_server_sdk/models/three_d_secure_card_authentication_response.rb', line 82

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} authentication_status: #{@authentication_status.inspect},"\
  " enrollment_status: #{@enrollment_status.inspect}, authentication_id:"\
  " #{@authentication_id.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



75
76
77
78
79
# File 'lib/paypal_server_sdk/models/three_d_secure_card_authentication_response.rb', line 75

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} authentication_status: #{@authentication_status}, enrollment_status:"\
  " #{@enrollment_status}, authentication_id: #{@authentication_id}>"
end