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

module GeniusReferrals
  class AdvocateForm < BaseModel
    # The advocate's wrapper
    # @return [Advocate]
    attr_accessor :advocate

    # A mapping from model property names to API property names
    def self.names
      if @hash.nil?
        @hash = {}
        @hash["advocate"] = "advocate"
      end
      @hash
    end

    def initialize(advocate = nil)
      @advocate = advocate
    end

    # Creates an instance of the object from a hash
    def self.from_hash(hash)
      if hash == nil
        nil
      else
        # Extract variables from the hash
        advocate = Advocate.from_hash(hash["advocate"]) if hash["advocate"]

        # Create object from extracted values
        AdvocateForm.new(advocate)
      end
    end
  end
end
