Class: SixSaferpay::Authentication

Inherits:
Object
  • Object
show all
Defined in:
lib/six_saferpay/models/authentication.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result: nil, message: nil, xid: nil, exemption: nil, three_ds_challenge: nil) ⇒ Authentication

ATTENTION: This is in some case mandatory



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/six_saferpay/models/authentication.rb', line 12

def initialize(result: nil, # ATTENTION: This is in some case mandatory
               message: nil, # ATTENTION: This is in some case mandatory
               xid: nil,
               exemption: nil,
               three_ds_challenge: nil)
  @result = result
  @message = message
  @xid = xid
  @exemption = exemption
  @three_ds_challenge = three_ds_challenge
end

Instance Attribute Details

#exemptionObject

Returns the value of attribute exemption.



4
5
6
# File 'lib/six_saferpay/models/authentication.rb', line 4

def exemption
  @exemption
end

#messageObject

Returns the value of attribute message.



4
5
6
# File 'lib/six_saferpay/models/authentication.rb', line 4

def message
  @message
end

#resultObject

Returns the value of attribute result.



4
5
6
# File 'lib/six_saferpay/models/authentication.rb', line 4

def result
  @result
end

#three_ds_challengeObject

Returns the value of attribute three_ds_challenge.



4
5
6
# File 'lib/six_saferpay/models/authentication.rb', line 4

def three_ds_challenge
  @three_ds_challenge
end

#xidObject

Returns the value of attribute xid.



4
5
6
# File 'lib/six_saferpay/models/authentication.rb', line 4

def xid
  @xid
end

Instance Method Details

#to_hashObject Also known as: to_h



24
25
26
27
28
29
30
31
32
# File 'lib/six_saferpay/models/authentication.rb', line 24

def to_hash
  hash = Hash.new
  hash.merge!(result: @result) if @result
  hash.merge!(message: @message) if @message
  hash.merge!(xid: @xid) if @xid
  hash.merge!(exemption: @exemption) if @exemption
  hash.merge!(three_ds_challenge: @three_ds_challenge) if @three_ds_challenge
  hash
end