Class: PaypalServerSdk::AssuranceDetails

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

Overview

Information about cardholder possession validation and cardholder identification and verifications (ID&V).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(account_verified: false, card_holder_authenticated: false) ⇒ AssuranceDetails

Returns a new instance of AssuranceDetails.



47
48
49
50
51
52
53
# File 'lib/paypal_server_sdk/models/assurance_details.rb', line 47

def initialize(account_verified: false, card_holder_authenticated: false)
  @account_verified =  unless  == SKIP
  unless card_holder_authenticated == SKIP
    @card_holder_authenticated =
      card_holder_authenticated
  end
end

Instance Attribute Details

#account_verifiedTrueClass | FalseClass

If true, indicates that Cardholder possession validation has been performed on returned payment credential.

Returns:

  • (TrueClass | FalseClass)


16
17
18
# File 'lib/paypal_server_sdk/models/assurance_details.rb', line 16

def 
  @account_verified
end

#card_holder_authenticatedTrueClass | FalseClass

If true, indicates that identification and verifications (ID&V) was performed on the returned payment credential.If false, the same risk-based authentication can be performed as you would for card transactions. This risk-based authentication can include, but not limited to, step-up with 3D Secure protocol if applicable.

Returns:

  • (TrueClass | FalseClass)


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

def card_holder_authenticated
  @card_holder_authenticated
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



56
57
58
59
60
61
62
63
64
65
66
# File 'lib/paypal_server_sdk/models/assurance_details.rb', line 56

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash['account_verified'] ||= false
  card_holder_authenticated = hash['card_holder_authenticated'] ||= false

  # Create object from extracted values.
  AssuranceDetails.new(account_verified: ,
                       card_holder_authenticated: card_holder_authenticated)
end

.namesObject

A mapping from model property names to API property names.



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

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

.nullablesObject

An array for nullable fields



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

def self.nullables
  []
end

.optionalsObject

An array for optional fields



35
36
37
38
39
40
# File 'lib/paypal_server_sdk/models/assurance_details.rb', line 35

def self.optionals
  %w[
    account_verified
    card_holder_authenticated
  ]
end