Class: SixSaferpay::ThreeDs

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authenticated:, liability_shift:, xid:, verification_value: nil) ⇒ ThreeDs

Returns a new instance of ThreeDs.



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/six_saferpay/models/three_ds.rb', line 6

def initialize(authenticated:,
               liability_shift:,
               xid:,
               verification_value: nil
              )

  @authenticated = authenticated
  @liability_shift = liability_shift
  @xid = xid
  @verification_value = verification_value
end

Instance Attribute Details

#authenticatedObject

Returns the value of attribute authenticated.



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

def authenticated
  @authenticated
end

#liability_shiftObject

Returns the value of attribute liability_shift.



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

def liability_shift
  @liability_shift
end

#verification_valueObject

Returns the value of attribute verification_value.



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

def verification_value
  @verification_value
end

#xidObject

Returns the value of attribute xid.



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

def xid
  @xid
end

Instance Method Details

#to_hashObject Also known as: to_h



18
19
20
21
22
23
24
25
# File 'lib/six_saferpay/models/three_ds.rb', line 18

def to_hash
  hash = Hash.new
  hash.merge!(authenticated: @authenticated) if !@authenticated.nil?
  hash.merge!(liability_shift: @liability_shift) if !@liability_shift.nil?
  hash.merge!(xid: @xid) if @xid
  hash.merge!(verification_value: @verification_value) if @verification_value
  hash
end