class ZeusSdk::V1::Role
Attributes
created_at[RW]
id[RW]
name[RW]
raw[RW]
updated_at[RW]
Public Class Methods
new(raw)
click to toggle source
# File lib/zeus_sdk/v1/models/auth/role.rb, line 5 def initialize(raw) return if raw.blank? self.raw = raw self.id = raw["id"] self.name = raw["name"] if raw.has_key?("name") self.created_at = raw["created_at"] if raw.has_key?("created_at") self.updated_at = raw["updated_at"] if raw.has_key?("updated_at") end
Public Instance Methods
as_json(options={})
click to toggle source
# File lib/zeus_sdk/v1/models/auth/role.rb, line 14 def as_json(options={}) { id: self.id, name: self.name, created_at: self.created_at, updated_at: self.updated_at } end
to_json(options={})
click to toggle source
# File lib/zeus_sdk/v1/models/auth/role.rb, line 23 def to_json(options={}) self.as_json(options).to_json end