Class: DataDomeResponse
- Inherits:
-
Object
- Object
- DataDomeResponse
- Defined in:
- lib/model/api/response.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#event_id ⇒ Object
Returns the value of attribute event_id.
-
#score ⇒ Object
Returns the value of attribute score.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, score: nil, event_id: nil) ⇒ DataDomeResponse
constructor
A new instance of DataDomeResponse.
- #to_json(options = {}) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(status:, score: nil, event_id: nil) ⇒ DataDomeResponse
Returns a new instance of DataDomeResponse.
28 29 30 31 32 33 |
# File 'lib/model/api/response.rb', line 28 def initialize(status:, score:nil, event_id:nil) @action = DataDomeResponseAction::ALLOW @status = status @score = score @event_id = event_id end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
26 27 28 |
# File 'lib/model/api/response.rb', line 26 def action @action end |
#event_id ⇒ Object
Returns the value of attribute event_id.
26 27 28 |
# File 'lib/model/api/response.rb', line 26 def event_id @event_id end |
#score ⇒ Object
Returns the value of attribute score.
26 27 28 |
# File 'lib/model/api/response.rb', line 26 def score @score end |
#status ⇒ Object
Returns the value of attribute status.
26 27 28 |
# File 'lib/model/api/response.rb', line 26 def status @status end |
Instance Method Details
#to_json(options = {}) ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/model/api/response.rb', line 39 def to_json( = {}) { action: @action, score: @score, status: @status, event_id: @event_id, }.to_json end |
#to_s ⇒ Object
35 36 37 |
# File 'lib/model/api/response.rb', line 35 def to_s "DataDomeResponse: action=#{@action}, score=#{@score}, status=#{@status}, event_id=#{@event_id}" end |