class Ravelin::ThreeDSecure
Attributes
attempted[RW]
end_time[RW]
start_time[RW]
success[RW]
timed_out[RW]
Public Instance Methods
serializable_hash()
click to toggle source
# File lib/ravelin/three_d_secure.rb, line 9 def serializable_hash hash = { 'attempted' => boolean(attempted), 'success' => boolean(success), 'timedOut' => boolean(timed_out) } hash['startTime'] = timestamp(start_time) if valid?(start_time) hash['endTime'] = timestamp(end_time) if valid?(end_time) hash end
Private Instance Methods
boolean(bool)
click to toggle source
# File lib/ravelin/three_d_secure.rb, line 22 def boolean(bool) bool || false end
timestamp(time)
click to toggle source
# File lib/ravelin/three_d_secure.rb, line 26 def timestamp(time) time.to_i end
valid?(time)
click to toggle source
# File lib/ravelin/three_d_secure.rb, line 30 def valid?(time) timestamp(time) >= 100 end