Class: SixSaferpay::FraudFree

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, liability_shift:, score:, investigation_points: nil, error_message: nil) ⇒ FraudFree

Returns a new instance of FraudFree.



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

def initialize(id: ,
               liability_shift: ,
               score: ,
               investigation_points: nil,
               error_message: nil
              )
  @id = id
  @liability_shift = liability_shift
  @score = score
  @investigation_points = investigation_points
  @error_message = error_message
end

Instance Attribute Details

#error_messageObject

Returns the value of attribute error_message.



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

def error_message
  @error_message
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#investigation_pointsObject

Returns the value of attribute investigation_points.



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

def investigation_points
  @investigation_points
end

#liability_shiftObject

Returns the value of attribute liability_shift.



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

def liability_shift
  @liability_shift
end

#scoreObject

Returns the value of attribute score.



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

def score
  @score
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/fraud_free.rb', line 24

def to_hash
  hash = Hash.new
  hash.merge!(id: @id) if @id
  hash.merge!(liability_shift: @liability_shift) if !@liability_shift.nil?
  hash.merge!(score: @score) if @score
  hash.merge!(investigation_points: @investigation_points) if @investigation_points
  hash.merge!(error_message: @error_message) if @error_message
  hash
end