class Beaver::TermsOfService

TermsOfService Model.

Attributes

acceptance_time[RW]

TODO: Write general description for this method @return [Integer]

original_ip[RW]

TODO: Write general description for this method @return [String]

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

# File lib/beaver/models/terms_of_service.rb, line 32
def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  acceptance_time = hash['acceptance_time']
  original_ip = hash['original_ip']

  # Create object from extracted values.
  TermsOfService.new(acceptance_time,
                     original_ip)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/terms_of_service.rb, line 18
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['acceptance_time'] = 'acceptance_time'
  @_hash['original_ip'] = 'original_ip'
  @_hash
end
new(acceptance_time = nil, original_ip = nil) click to toggle source
# File lib/beaver/models/terms_of_service.rb, line 25
def initialize(acceptance_time = nil,
               original_ip = nil)
  @acceptance_time = acceptance_time
  @original_ip = original_ip
end