Class: Signature4VerificationResult
- Inherits:
-
Object
- Object
- Signature4VerificationResult
- Defined in:
- lib/ruby-common/v4/Signature4VerificationResult.rb
Instance Attribute Summary collapse
-
#expired ⇒ Object
Returns the value of attribute expired.
-
#ip_address ⇒ Object
Returns the value of attribute ip_address.
-
#request_time ⇒ Object
Returns the value of attribute request_time.
-
#score ⇒ Object
Returns the value of attribute score.
-
#signature_time ⇒ Object
Returns the value of attribute signature_time.
-
#verdict ⇒ Object
Returns the value of attribute verdict.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(score:, verdict:, ip_address:, request_time:, signature_time:, expired: false) ⇒ Signature4VerificationResult
constructor
A new instance of Signature4VerificationResult.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(score:, verdict:, ip_address:, request_time:, signature_time:, expired: false) ⇒ Signature4VerificationResult
Returns a new instance of Signature4VerificationResult.
5 6 7 8 9 10 11 12 13 |
# File 'lib/ruby-common/v4/Signature4VerificationResult.rb', line 5 def initialize(score:, verdict:, ip_address:, request_time:, signature_time:, expired: false) @score = score @verdict = verdict @ip_address = ip_address @request_time = request_time @signature_time = signature_time @expired = expired end |
Instance Attribute Details
#expired ⇒ Object
Returns the value of attribute expired.
2 3 4 |
# File 'lib/ruby-common/v4/Signature4VerificationResult.rb', line 2 def expired @expired end |
#ip_address ⇒ Object
Returns the value of attribute ip_address.
2 3 4 |
# File 'lib/ruby-common/v4/Signature4VerificationResult.rb', line 2 def ip_address @ip_address end |
#request_time ⇒ Object
Returns the value of attribute request_time.
2 3 4 |
# File 'lib/ruby-common/v4/Signature4VerificationResult.rb', line 2 def request_time @request_time end |
#score ⇒ Object
Returns the value of attribute score.
2 3 4 |
# File 'lib/ruby-common/v4/Signature4VerificationResult.rb', line 2 def score @score end |
#signature_time ⇒ Object
Returns the value of attribute signature_time.
2 3 4 |
# File 'lib/ruby-common/v4/Signature4VerificationResult.rb', line 2 def signature_time @signature_time end |
#verdict ⇒ Object
Returns the value of attribute verdict.
2 3 4 |
# File 'lib/ruby-common/v4/Signature4VerificationResult.rb', line 2 def verdict @verdict end |
Class Method Details
.is_expired ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ruby-common/v4/Signature4VerificationResult.rb', line 15 def self.is_expired() new( score: nil, verdict: nil, ip_address: nil, request_time: nil, signature_time: nil, expired: true ) end |
Instance Method Details
#to_h ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ruby-common/v4/Signature4VerificationResult.rb', line 26 def to_h { score: @score, verdict: @verdict, ip_address: @ip_address, request_time: @request_time, signature_time: @signature_time, expired: @expired } end |
#to_s ⇒ Object
37 38 39 |
# File 'lib/ruby-common/v4/Signature4VerificationResult.rb', line 37 def to_s "ValidationResult(score: #{@score}, verdict: #{@verdict}, ip_address: #{@ip_address}, request_time: #{@request_time}, signature_time: #{@signature_time}, expired: #{@expired})" end |