class Beaver::BusinessName

BusinessName Model.

Attributes

name[RW]

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

name_type[RW]

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

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

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

  # Extract variables from the hash.
  name = hash['name']
  name_type = hash['name_type']

  # Create object from extracted values.
  BusinessName.new(name,
                   name_type)
end
names() click to toggle source

A mapping from model property names to API property names.

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