Package net.amcintosh.freshbooks.models
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
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn the objects values as a Map suitable to sending to FreshBooks in a POST or PUT request.Descriptive text for task.long
getId()
Get the unique identifier of this task within this business.getName()
Descriptive name of task.getRate()
The hourly amount rate charged for task.long
Duplicate of id.long
getTax1()
Id of the first tax to apply to this task.long
getTax2()
Id of the second tax to apply to this task.Get the time of last modification.Get the visibility state: active, deleted, or archivedboolean
Whether this task billable.void
setBillable
(boolean billable) Whether this task billable.void
setDescription
(String description) Descriptive text for task.void
Descriptive name of task.void
The hourly amount rate charged for task.void
setTax1
(long tax1) Id of the first tax to apply to this task.void
setTax2
(long tax2) Id of the second tax to apply to this task.void
setVisState
(VisState visState) Set the visibility state of the item.Methods inherited from class com.google.api.client.json.GenericJson
clone, getFactory, set, setFactory, toPrettyString, toString
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
Task
public Task()
-
-
Method Details
-
getId
public long getId()Get the unique identifier of this task within this business.- Returns:
- id
-
getName
Descriptive name of task.- Returns:
- name
-
setName
Descriptive name of task.- Parameters:
name
- e.g.:Piloting
-
getDescription
Descriptive text for task.- Returns:
- description
-
setDescription
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
The hourly amount rate charged for task.- Returns:
- rate
-
setRate
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
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
Get the visibility state: active, deleted, or archived- Returns:
- Enum of the visibility state.
- See Also:
-
setVisState
Set the visibility state of the item.- Parameters:
visState
- VisState value- See Also:
-
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 interfaceConvertibleContent
- Returns:
-