Class: AutotaskRuby::AccountToDo

Inherits:
Object
  • Object
show all
Includes:
Entity, Query
Defined in:
lib/autotask_ruby/account_to_do.rb

Overview

Represents the Autotask AccountToDo entity

Constant Summary collapse

FIELDS =
%i[id AccountID ContactID ActivityDescription StartDateTime EndDateTime
            AssignedToResourceID CreateDateTime LastModifiedDate ActionType].freeze
         .each do |field|
  attr_accessor :"#{field.to_s.underscore}"
end

Constants included from Constants

Constants::AUTOTASK_TIME_FORMAT

Instance Method Summary collapse

Methods included from Query

#find, #query

Methods included from Entity

#build, #create, #field_set, #fields_to_xml, #format_field_to_xml, included, #initialize, #to_bool, #to_date_time, #update

Methods included from Association

#belongs_to, #has_many, #has_one

Instance Method Details

#actionObject



24
25
26
# File 'lib/autotask_ruby/account_to_do.rb', line 24

def action
  find('ActionType', action_type)
end

#contactObject



20
21
22
# File 'lib/autotask_ruby/account_to_do.rb', line 20

def contact
  find('Contact', contact_id)
end

#post_initializeObject



15
16
17
18
# File 'lib/autotask_ruby/account_to_do.rb', line 15

def post_initialize
  belongs_to :resource
  belongs_to :account
end