Project
extends DataTransferObject
in package
implements
DataModel
Projects in FreshBooks are used to track business projects and related information such as hourly rate, service(s) being offered, projected end date...etc
Tags
Table of Contents
Interfaces
Constants
- RESPONSE_FIELD = 'project'
Properties
- $active : bool
- $billedAmount : Decimal
- $billedStatus : string
- $billingMethod : string
- $budget : int
- $clientId : int
- $complete : bool
- $createdAt : DateTimeImmutable
- $description : string
- $dueDate : DateTime
- $expenseMarkup : string
- $fixedPrice : Decimal
- $group : ProjectGroup|null
- $id : int
- $internal : bool
- $loggedDuration : int
- $projectManagerId : int|null
- $projectType : string
- $rate : Decimal
- $retainerId : int|null
- $services : array<string|int, mixed>
- $title : int
- $updatedAt : DateTimeImmutable
Methods
- getContent() : array<string|int, mixed>
- Get the data as an array to POST or PUT to FreshBooks, removing any read-only fields.
Constants
RESPONSE_FIELD
public
mixed
RESPONSE_FIELD
= 'project'
Properties
$active
public
bool
$active
Whether the project is active or not.
$billedAmount
public
Decimal
$billedAmount
The amount that has been invoiced for this project.
$billedStatus
public
string
$billedStatus
Billing statuses for a project, computed from invoice totals that have been sent for that project.
Values are:
- billed: Invoice is created and in no other state
- partially_billed: Invoice is saved in draft status
- unbilled: Invoice has been sent
Tags
$billingMethod
public
string
$billingMethod
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.
$budget
public
int
$budget
Time budgeted for the project in seconds.
$clientId
public
int
$clientId
The id of the client this project is for.
$complete
public
bool
$complete
If the project has been completed and is archived.
Archived projects do not return in list results by default.
$createdAt
public
DateTimeImmutable
$createdAt
The creation time of the project.
$description
public
string
$description
The description of the project.
$dueDate
public
DateTime
$dueDate
Date the payment was made.
The API returns this in YYYY-MM-DD format. It is converted to a DateTime.
$expenseMarkup
public
string
$expenseMarkup
String percentage markup to be applied to expenses fo this project.
$fixedPrice
public
Decimal
$fixedPrice
For projects that are of type "fixed_price" this is the price for the project.
$group
public
ProjectGroup|null
$group
$id
public
int
$id
The unique identifier of this project within this business.
$internal
public
bool
$internal
Clarifies that the project is internal to the business and has no client (client is the company).
$loggedDuration
public
int
$loggedDuration
The time logged against the project in seconds.
$projectManagerId
public
int|null
$projectManagerId
$projectType
public
string
$projectType
The project type. Either a fixed price or hourly rate.
The type of hourly rate used is set with getBillingMethod()
.
$rate
public
Decimal
$rate
The hourly rate for project_rate hourly projects.
$retainerId
public
int|null
$retainerId
$services
public
array<string|int, mixed>
$services
The services that work in this project can be logged against and will appear on invoices when the project is billed for.
$title
public
int
$title
The project title
$updatedAt
public
DateTimeImmutable
$updatedAt
The time of last modification to the project.
Methods
getContent()
Get the data as an array to POST or PUT to FreshBooks, removing any read-only fields.
public
getContent() : array<string|int, mixed>