Package net.amcintosh.freshbooks.models
Class Project
java.lang.Object
java.util.AbstractMap<String,Object>
com.google.api.client.util.GenericData
com.google.api.client.json.GenericJson
net.amcintosh.freshbooks.models.Project
- All Implemented Interfaces:
Cloneable
,Map<String,
,Object> ConvertibleContent
Projects in FreshBooks are used to track business projects and related information
such as hourly rate, service(s) being offered, projected end date...etc
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
Billing statuses for a project, computed from invoice totals that have been sent for that project.static enum
Method of calculating billing for a projectstatic class
static class
static enum
Billing types for projectsNested 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 TypeMethodDescriptionboolean
Whether the project is active or not.The amount that has been invoiced for this project.If the project has been billed or not.Get the method by which the project is billed.int
Get time budgeted for the project in seconds.long
Get the id of the client this project is for.boolean
If the project has been completed and is archived.Return the objects values as a Map suitable to sending to FreshBooks in a POST or PUT request.Get the creation time of the project.Get the description of project.Date of projected completion.String percentage markup to be applied to expenses fo this project.For projects that are of project type "fixed_price" this is the price for the project.getGroup()
The project group contains the identity details of all the members of the project and any pending invitations to the project.long
getId()
Get the unique identifier of this project within this business.boolean
Clarifies that the project is internal to the business and has no client (client is the company).int
The time logged against the project in seconds.long
The project type.getRate()
The hourly rate for project_rate hourly projects.long
The services that work in this project can be logged against and will appear on invoices when the project is billed for.getTitle()
The project titleGet the time of last modification to the project.void
setActive
(boolean active) Set whether the project is active or not.void
setBillingMethod
(Project.ProjectBillingMethod billingMethod) Set the method by which the project is billed.void
setBudget
(int budget) Set time budgeted for the project.void
setClientId
(long clientId) Set the id of the client the project is for.void
setComplete
(boolean complete) Marks the project as completed and archived.void
setDescription
(String description) Set the description of project.void
setDueDate
(LocalDate dueDate) Date of projected completion.void
setExpenseMarkup
(String expenseMarkup) String percentage markup to be applied to expenses fo this project.void
setFixedPrice
(BigDecimal fixedPrice) For projects that are of project type "fixed_price" this is the price for the project.void
setInternal
(boolean internal) Sets that the project is internal to the business and has no client (client is the company).void
setProjectManagerId
(Long projectManagerId) void
setProjectType
(Project.ProjectType projectType) The project type.void
setRate
(BigDecimal rate) The hourly rate for project_rate hourly projects.void
setRetainerId
(long retainerId) void
The project titleMethods 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
-
Project
public Project()
-
-
Method Details
-
getId
public long getId()Get the unique identifier of this project within this business.- Returns:
- Project id
-
getActive
public boolean getActive()Whether the project is active or not.
Note: A resource that is not active is essentially a "soft" delete.- Returns:
- True if active
-
setActive
public void setActive(boolean active) Set whether the project is active or not.
Note: A resource that is not active is essentially a "soft" delete.- Parameters:
active
- active
-
getBilledAmount
The amount that has been invoiced for this project.- Returns:
- The decimal currency amount
-
getBilledStatus
If the project has been billed or not.- Returns:
- Unbilled, Partial, or Billed status
-
getBillingMethod
Get the method by which the project is billed.
Eg. By business hourly rate, team member's rate, different rates by service provided, or a rate for the project.- Returns:
- Billing method
-
setBillingMethod
Set the method by which the project is billed.
Eg. By business hourly rate, team member's rate, different rates by service provided, or a rate for the project.- Parameters:
billingMethod
- Billing method
-
getBudget
public int getBudget()Get time budgeted for the project in seconds.- Returns:
- int of time budget in seconds.
-
setBudget
public void setBudget(int budget) Set time budgeted for the project.- Parameters:
budget
- seconds of time budget
-
getClientId
public long getClientId()Get the id of the client this project is for.- Returns:
- The client id in the business.
-
setClientId
public void setClientId(long clientId) Set the id of the client the project is for.- Parameters:
clientId
- The client id in the business.
-
getComplete
public boolean getComplete()If the project has been completed and is archived.
Archived projects do not return in list results by default.- Returns:
- True if project is completed and archived
-
setComplete
public void setComplete(boolean complete) Marks the project as completed and archived.
Archived projects do not return in list results by default.- Parameters:
complete
-
-
getCreatedAt
Get the creation time of the project.
Note: The API returns this data in UTC.- Returns:
- Create time in UTC
-
getDescription
Get the description of project.- Returns:
-
setDescription
Set the description of project.- Parameters:
description
-
-
getDueDate
Date of projected completion.- Returns:
-
setDueDate
Date of projected completion.- Parameters:
dueDate
-
-
getExpenseMarkup
String percentage markup to be applied to expenses fo this project.- Returns:
-
setExpenseMarkup
String percentage markup to be applied to expenses fo this project.- Parameters:
expenseMarkup
-
-
getFixedPrice
For projects that are of project type "fixed_price" this is the price for the project.- Returns:
- Decimal price for the project.
-
setFixedPrice
For projects that are of project type "fixed_price" this is the price for the project.- Parameters:
fixedPrice
- Decimal price for the project.
-
getGroup
The project group contains the identity details of all the members of the project and any pending invitations to the project.- Returns:
-
getInternal
public boolean getInternal()Clarifies that the project is internal to the business and has no client (client is the company).- Returns:
-
setInternal
public void setInternal(boolean internal) Sets that the project is internal to the business and has no client (client is the company).- Parameters:
internal
-
-
getLoggedDuration
public int getLoggedDuration()The time logged against the project in seconds.- Returns:
-
getProjectManagerId
public long getProjectManagerId() -
setProjectManagerId
-
getProjectType
The project type. Either a fixed price or hourly rate.
The type of hourly rate used is found ingetBillingMethod()
.- Returns:
-
setProjectType
The project type. Either a fixed price or hourly rate.
The type of hourly rate used is set withgetBillingMethod()
.- Parameters:
projectType
-
-
getRate
The hourly rate for project_rate hourly projects.- Returns:
-
setRate
The hourly rate for project_rate hourly projects.- Parameters:
rate
-
-
getRetainerId
public long getRetainerId() -
setRetainerId
public void setRetainerId(long retainerId) -
getServices
The services that work in this project can be logged against and will appear on invoices when the project is billed for.- Returns:
-
getTitle
The project title- Returns:
-
setTitle
The project title- Parameters:
title
-
-
getUpdatedAt
Get the time of last modification to the project.- Returns:
- Updated time in UTC
-
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:
-