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

public class Project extends com.google.api.client.json.GenericJson implements 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:
  • 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

      public BigDecimal getBilledAmount()
      The amount that has been invoiced for this project.
      Returns:
      The decimal currency amount
    • getBilledStatus

      public Project.ProjectBilledStatus getBilledStatus()
      If the project has been billed or not.
      Returns:
      Unbilled, Partial, or Billed status
    • getBillingMethod

      public Project.ProjectBillingMethod 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

      public void setBillingMethod(Project.ProjectBillingMethod billingMethod)
      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

      public ZonedDateTime getCreatedAt()
      Get the creation time of the project.

      Note: The API returns this data in UTC.
      Returns:
      Create time in UTC
    • getDescription

      public String getDescription()
      Get the description of project.
      Returns:
    • setDescription

      public void setDescription(String description)
      Set the description of project.
      Parameters:
      description -
    • getDueDate

      public LocalDate getDueDate()
      Date of projected completion.
      Returns:
    • setDueDate

      public void setDueDate(LocalDate dueDate)
      Date of projected completion.
      Parameters:
      dueDate -
    • getExpenseMarkup

      public String getExpenseMarkup()
      String percentage markup to be applied to expenses fo this project.
      Returns:
    • setExpenseMarkup

      public void setExpenseMarkup(String expenseMarkup)
      String percentage markup to be applied to expenses fo this project.
      Parameters:
      expenseMarkup -
    • getFixedPrice

      public BigDecimal getFixedPrice()
      For projects that are of project type "fixed_price" this is the price for the project.
      Returns:
      Decimal price for the project.
    • setFixedPrice

      public void setFixedPrice(BigDecimal fixedPrice)
      For projects that are of project type "fixed_price" this is the price for the project.
      Parameters:
      fixedPrice - Decimal price for the project.
    • getGroup

      public Project.ProjectGroup 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

      public void setProjectManagerId(Long projectManagerId)
    • getProjectType

      public Project.ProjectType getProjectType()
      The project type. Either a fixed price or hourly rate.

      The type of hourly rate used is found in getBillingMethod().
      Returns:
    • setProjectType

      public void setProjectType(Project.ProjectType projectType)
      The project type. Either a fixed price or hourly rate.

      The type of hourly rate used is set with getBillingMethod().
      Parameters:
      projectType -
    • getRate

      public BigDecimal getRate()
      The hourly rate for project_rate hourly projects.
      Returns:
    • setRate

      public void setRate(BigDecimal rate)
      The hourly rate for project_rate hourly projects.
      Parameters:
      rate -
    • getRetainerId

      public long getRetainerId()
    • setRetainerId

      public void setRetainerId(long retainerId)
    • getServices

      public List<Service> 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

      public String getTitle()
      The project title
      Returns:
    • setTitle

      public void setTitle(String title)
      The project title
      Parameters:
      title -
    • getUpdatedAt

      public ZonedDateTime getUpdatedAt()
      Get the time of last modification to the project.
      Returns:
      Updated time in UTC
    • 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: