class Beaver::EntityCountryInfo

EntityCountryInfo Model.

Attributes

ca[RW]

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

gb[RW]

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

us[RW]

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

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

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

  # Extract variables from the hash.
  ca = CA4.from_hash(hash['CA']) if hash['CA']
  gb = GB.from_hash(hash['GB']) if hash['GB']
  us = US4.from_hash(hash['US']) if hash['US']

  # Create object from extracted values.
  EntityCountryInfo.new(ca,
                        gb,
                        us)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/entity_country_info.rb, line 22
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['ca'] = 'CA'
  @_hash['gb'] = 'GB'
  @_hash['us'] = 'US'
  @_hash
end
new(ca = nil, gb = nil, us = nil) click to toggle source
# File lib/beaver/models/entity_country_info.rb, line 30
def initialize(ca = nil,
               gb = nil,
               us = nil)
  @ca = ca
  @gb = gb
  @us = us
end