# pepipost_gem
#
# This file was automatically generated by APIMATIC v2.0
# ( https://apimatic.io ).

module PepipostGem
  # Settings Model.
  class Settings < BaseModel
    # TODO: Write general description for this method
    # @return [Integer]
    attr_accessor :footer

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

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

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

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

    # A mapping from model property names to API property names.
    def self.names
      @_hash = {} if @_hash.nil?
      @_hash['footer'] = 'footer'
      @_hash['clicktrack'] = 'clicktrack'
      @_hash['opentrack'] = 'opentrack'
      @_hash['unsubscribe'] = 'unsubscribe'
      @_hash['bcc'] = 'bcc'
      @_hash
    end

    def initialize(footer = nil,
                   clicktrack = nil,
                   opentrack = nil,
                   unsubscribe = nil,
                   bcc = nil)
      @footer = footer
      @clicktrack = clicktrack
      @opentrack = opentrack
      @unsubscribe = unsubscribe
      @bcc = bcc
    end

    # Creates an instance of the object from a hash.
    def self.from_hash(hash)
      return nil unless hash

      # Extract variables from the hash.
      footer = hash['footer']
      clicktrack = hash['clicktrack']
      opentrack = hash['opentrack']
      unsubscribe = hash['unsubscribe']
      bcc = hash['bcc']

      # Create object from extracted values.
      Settings.new(footer,
                   clicktrack,
                   opentrack,
                   unsubscribe,
                   bcc)
    end
  end
end
