freshbooks-php-sdk

InvoicePresentation implements DataModel

Invoice Presentations are used to style an invoice including font, colors, and logos.

By default, when a new invoice is created, it automatically uses the presentation style of the most recently created invoice (including logos, colors, and fonts). If you wish to change the style of an invoice via the API, or if the user has not styled their invoices (such as in a brand new account), then you can pass a presentation object as part of the invoice call. Subsequent invoices will use this style until an invoice is created with a new style. If you do not wish for an invoice to use any styles, you can include use_default_presentation: false in the invoice call.

Tags
link
https://www.freshbooks.com/api/invoice_presentation_attachments

Table of Contents

Interfaces

DataModel

Properties

$dateFormat  : string
$imageBannerSrc  : string
$imageLogoSrc  : string
$invoiceId  : int
$themeFontName  : string
$themeLayout  : string
$themePrimaryColor  : string

Methods

__construct()  : mixed
getContent()  : array<string|int, mixed>
Get the data as an array to POST or PUT to FreshBooks, removing any read-only fields.

Properties

$dateFormat

public string $dateFormat

Override business date format for this invoice.

string format of: “mm/dd/yyyy”, “dd/mm/yyyy”, or “yyyy-mm-dd”

$imageBannerSrc

public string $imageBannerSrc

The invoice banner image for "modern" invoices.

“/uploads/images/<JWT_TOKEN_FROM_IMAGE_UPLOAD>”

$imageLogoSrc

public string $imageLogoSrc

The invoice logo image.

“/uploads/images/<JWT_TOKEN_FROM_IMAGE_UPLOAD>”

$invoiceId

public int $invoiceId

The unique identifier of the invoice this presentation applies to.

$themeFontName

public string $themeFontName

Which invoice font is in use.

“modern” or “classic”

$themeLayout

public string $themeLayout

Which invoice template is in use.

“simple, “modern”, or “classic”

$themePrimaryColor

public string $themePrimaryColor

Primary highlight colour for the invoice.

eg. “#345beb”

Methods

__construct()

public __construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
$data : array<string|int, mixed> = []

getContent()

Get the data as an array to POST or PUT to FreshBooks, removing any read-only fields.

public getContent() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results