class Beaver::Document
Document
Model.
Attributes
create_time[RW]
TODO: Write general description for this method @return [Integer]
id[RW]
TODO: Write general description for this method @return [String]
owner[RW]
TODO: Write general description for this method @return [OwnerApplications]
path[RW]
TODO: Write general description for this method @return [String]
reject_reason[RW]
TODO: Write general description for this method @return [RejectReason]
resource[RW]
TODO: Write general description for this method @return [String]
status[RW]
TODO: Write general description for this method @return [Status8Enum]
type[RW]
TODO: Write general description for this method @return [Type15Enum]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/document.rb, line 74 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. create_time = hash['create_time'] id = hash['id'] owner = OwnerApplications.from_hash(hash['owner']) if hash['owner'] reject_reason = RejectReason.from_hash(hash['reject_reason']) if hash['reject_reason'] resource = hash['resource'] status = hash['status'] type = hash['type'] path = hash['path'] # Create object from extracted values. Document.new(create_time, id, owner, reject_reason, resource, status, type, path) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/document.rb, line 42 def self.names @_hash = {} if @_hash.nil? @_hash['create_time'] = 'create_time' @_hash['id'] = 'id' @_hash['owner'] = 'owner' @_hash['path'] = 'path' @_hash['reject_reason'] = 'reject_reason' @_hash['resource'] = 'resource' @_hash['status'] = 'status' @_hash['type'] = 'type' @_hash end
new(create_time = nil, id = nil, owner = nil, reject_reason = nil, resource = nil, status = nil, type = nil, path = nil)
click to toggle source
# File lib/beaver/models/document.rb, line 55 def initialize(create_time = nil, id = nil, owner = nil, reject_reason = nil, resource = nil, status = nil, type = nil, path = nil) @create_time = create_time @id = id @owner = owner @path = path @reject_reason = reject_reason @resource = resource @status = status @type = type end