Class: PaypalServerSdk::ThreeDSecureAuthenticationResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/paypal_server_sdk/models/three_d_secure_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

#to_hash, #to_json

Constructor Details

#initialize(authentication_status: SKIP, enrollment_status: SKIP) ⇒ ThreeDSecureAuthenticationResponse

Returns a new instance of ThreeDSecureAuthenticationResponse.



42
43
44
45
# File 'lib/paypal_server_sdk/models/three_d_secure_authentication_response.rb', line 42

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

Instance Attribute Details

#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_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_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.



48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/paypal_server_sdk/models/three_d_secure_authentication_response.rb', line 48

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

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

.namesObject

A mapping from model property names to API property names.



22
23
24
25
26
27
# File 'lib/paypal_server_sdk/models/three_d_secure_authentication_response.rb', line 22

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

.nullablesObject

An array for nullable fields



38
39
40
# File 'lib/paypal_server_sdk/models/three_d_secure_authentication_response.rb', line 38

def self.nullables
  []
end

.optionalsObject

An array for optional fields



30
31
32
33
34
35
# File 'lib/paypal_server_sdk/models/three_d_secure_authentication_response.rb', line 30

def self.optionals
  %w[
    authentication_status
    enrollment_status
  ]
end