Class Task

java.lang.Object
java.util.AbstractMap<String,Object>
com.google.api.client.util.GenericData
com.google.api.client.json.GenericJson
net.amcintosh.freshbooks.models.Task
All Implemented Interfaces:
Cloneable, Map<String,Object>, ConvertibleContent

public class Task extends com.google.api.client.json.GenericJson implements ConvertibleContent
Tasks represent services that your business offers to clients. Tasks are used to keep track of invoicing details of the service such as name and hourly rate.
See Also:
  • Constructor Details

    • Task

      public Task()
  • Method Details

    • getId

      public long getId()
      Get the unique identifier of this task within this business.
      Returns:
      id
    • getName

      public String getName()
      Descriptive name of task.
      Returns:
      name
    • setName

      public void setName(String name)
      Descriptive name of task.
      Parameters:
      name - e.g.:Piloting
    • getDescription

      public String getDescription()
      Descriptive text for task.
      Returns:
      description
    • setDescription

      public void setDescription(String description)
      Descriptive text for task.
      Parameters:
      description - e.g.: Piloting based on expectations of the executive
    • getTaskId

      public long getTaskId()
      Duplicate of id.
      Returns:
      id
    • getRate

      public Money getRate()
      The hourly amount rate charged for task.
      Returns:
      rate
    • setRate

      public void setRate(Money rate)
      The hourly amount rate charged for task.
      Parameters:
      rate - The hourly amount rate
    • isBillable

      public boolean isBillable()
      Whether this task billable.
      Returns:
      boolean if task is billable.
    • getTax1

      public long getTax1()
      Id of the first tax to apply to this task.
      Returns:
    • setTax1

      public void setTax1(long tax1)
      Id of the first tax to apply to this task.
      Parameters:
      tax1 -
    • getTax2

      public long getTax2()
      Id of the second tax to apply to this task.
      Returns:
    • setTax2

      public void setTax2(long tax2)
      Id of the second tax to apply to this task.
      Parameters:
      tax2 -
    • setBillable

      public void setBillable(boolean billable)
      Whether this task billable.
      Parameters:
      billable - True if billable
    • getUpdated

      public ZonedDateTime getUpdated()
      Get the time of last modification. Note: The API returns this data in "US/Eastern", but it is converted to UTC.
      Returns:
      Updated time in UTC
    • getVisState

      public VisState getVisState()
      Get the visibility state: active, deleted, or archived
      Returns:
      Enum of the visibility state.
      See Also:
    • setVisState

      public void setVisState(VisState visState)
      Set the visibility state of the item.
      Parameters:
      visState - VisState value
      See Also:
    • getContent

      public Map<String,Object> getContent()
      Description copied from interface: ConvertibleContent
      Return the objects values as a Map suitable to sending to FreshBooks in a POST or PUT request.
      Specified by:
      getContent in interface ConvertibleContent
      Returns: