Class: DataDomeResponseSuccess
- Inherits:
-
DataDomeResponse
- Object
- DataDomeResponse
- DataDomeResponseSuccess
- Defined in:
- lib/model/api/response.rb
Instance Attribute Summary collapse
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#reasons ⇒ Object
readonly
Returns the value of attribute reasons.
Attributes inherited from DataDomeResponse
#action, #event_id, #score, #status
Instance Method Summary collapse
-
#initialize(status:, score:, event_id:, reasons:, ip:, location:) ⇒ DataDomeResponseSuccess
constructor
A new instance of DataDomeResponseSuccess.
- #to_json(options = {}) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(status:, score:, event_id:, reasons:, ip:, location:) ⇒ DataDomeResponseSuccess
Returns a new instance of DataDomeResponseSuccess.
52 53 54 55 56 57 |
# File 'lib/model/api/response.rb', line 52 def initialize(status:, score:, event_id:, reasons:, ip:, location:) super(status: status, score: score, event_id: event_id) @reasons = reasons @ip = ip @location = location end |
Instance Attribute Details
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
50 51 52 |
# File 'lib/model/api/response.rb', line 50 def ip @ip end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
50 51 52 |
# File 'lib/model/api/response.rb', line 50 def location @location end |
#reasons ⇒ Object (readonly)
Returns the value of attribute reasons.
50 51 52 |
# File 'lib/model/api/response.rb', line 50 def reasons @reasons end |
Instance Method Details
#to_json(options = {}) ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/model/api/response.rb', line 63 def to_json( = {}) { action: @action, score: @score, status: @status, event_id: @event_id, reasons: @reasons, ip: @ip, location: @location, }.to_json end |
#to_s ⇒ Object
59 60 61 |
# File 'lib/model/api/response.rb', line 59 def to_s "DataDomeResponseSuccess: action=#{@action}, score=#{@score}, status=#{@status}, event_id=#{@event_id}, reasons=#{@reasons}, ip=#{@ip}, location=#{@location}" end |