class Beaver::CA
CA
Model.
Attributes
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/ca.rb, line 25 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. social_insurance_number = hash['social_insurance_number'] # Create object from extracted values. CA.new(social_insurance_number) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/ca.rb, line 14 def self.names @_hash = {} if @_hash.nil? @_hash['social_insurance_number'] = 'social_insurance_number' @_hash end
new(social_insurance_number = nil)
click to toggle source
# File lib/beaver/models/ca.rb, line 20 def initialize(social_insurance_number = nil) @social_insurance_number = social_insurance_number end