class MoesifApi::EventResponseModel
Attributes
body[RW]
Response body @return [Object]
headers[RW]
Key/Value map of response headers @return [Object]
ip_address[RW]
IP Address from the response, such as the server IP Address @return [String]
status[RW]
HTTP Status code such as 200 @return [Integer]
time[RW]
Time when response received @return [DateTime]
transfer_encoding[RW]
Transfer Encoding of body if other than JSON @return [String]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash
# File lib/moesif_api/models/event_response_model.rb, line 59 def self.from_hash(hash) if hash == nil nil else # Extract variables from the hash time = DateTime.iso8601(hash["time"]) if hash["time"] status = hash["status"] headers = hash["headers"] body = hash["body"] ip_address = hash["ip_address"] transfer_encoding = hash["transfer_encoding"] # Create object from extracted values EventResponseModel.new(time, status, headers, body, ip_address, transfer_encoding) end end
names()
click to toggle source
A mapping from model property names to API property names
# File lib/moesif_api/models/event_response_model.rb, line 31 def self.names if @hash.nil? @hash = {} @hash["time"] = "time" @hash["status"] = "status" @hash["headers"] = "headers" @hash["body"] = "body" @hash["ip_address"] = "ip_address" @hash["transfer_encoding"] = "transfer_encoding" end @hash end
new(time = nil, status = nil, headers = nil, body = nil, ip_address = nil, transfer_encoding = nil)
click to toggle source
# File lib/moesif_api/models/event_response_model.rb, line 44 def initialize(time = nil, status = nil, headers = nil, body = nil, ip_address = nil, transfer_encoding = nil) @time = time @status = status @headers = headers @body = body @ip_address = ip_address @transfer_encoding = transfer_encoding end