class Beaver::OptedOutMethods

OptedOutMethods Model.

Attributes

countries[RW]

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

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

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

  # Extract variables from the hash.
  countries = CountriesOptedOutMethods.from_hash(hash['countries']) if
    hash['countries']

  # Create object from extracted values.
  OptedOutMethods.new(countries)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/opted_out_methods.rb, line 14
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['countries'] = 'countries'
  @_hash
end
new(countries = nil) click to toggle source
# File lib/beaver/models/opted_out_methods.rb, line 20
def initialize(countries = nil)
  @countries = countries
end