Invoice service

 Methods

Constructor

__construct(\Moneybird\ApiConnector $connector) 

Parameters

Deletes an invoice

delete(\Moneybird\Invoice $invoice) : \Moneybird\self

Parameters

Returns

\Moneybird\self

Get all invoices

getAll(string | integer $filter, \Moneybird\Invoice_Subject $parent) : \Moneybird\Invoice_Array

Parameters

$filter

stringinteger

Filter name or id (advanced filters)

Exceptions

\Moneybird\InvalidFilterException

Returns

Get invoice by id

getById(int $id) : \Moneybird\Invoice

Parameters

$id

int

Returns

Get invoices by id (max 100)

getByIds(array $ids) : \Moneybird\Invoice_Array

Parameters

$ids

Array

Returns

Get invoice by invoice number

getByInvoiceId(string $invoiceId) : \Moneybird\Invoice

Parameters

$invoiceId

string

Returns

Get the invoice of which a state change notification has been received

getByPushMessage() : \Moneybird\Invoice

When the invoice state changes in Moneybird, your application can be notified Use this method to validate the request and retreive the invoice

access public

Exceptions

\Moneybird\InvalidRequestException

Returns

Get the raw PDF content

getPdf(\Moneybird\Invoice $invoice) : string

Parameters

Returns

string

Get invoices sync status

getSyncList() : \Moneybird\Invoice_Array

Register a payment for the invoice

registerPayment(\Moneybird\Invoice $invoice, \Moneybird\Invoice_Payment $payment) : \Moneybird\Invoice

Send a reminder.

remind(\Moneybird\Invoice $invoice, string $method, \Moneybird\type $email, \Moneybird\type $message) : \Moneybird\Invoice

Returns the updated invoice

Parameters

$method

string

Send method (email|hand|post); default: email

$email

\Moneybird\type

Address to send to; default: contact e-mail

$message

\Moneybird\type

Returns

Updates or inserts an invoice

save(\Moneybird\Invoice $invoice) : \Moneybird\Invoice

Parameters

Returns

Send the invoice.

send(\Moneybird\Invoice $invoice, string $method, \Moneybird\type $email, \Moneybird\type $message) : \Moneybird\Invoice

Returns the updated invoice

Parameters

$method

string

Send method (email|hand|post); default: email

$email

\Moneybird\type

Address to send to; default: contact e-mail

$message

\Moneybird\type

Returns

Build an envelope to send the invoice or reminder with

buildEnvelope(string $method, \Moneybird\type $email, \Moneybird\type $message) : \Moneybird\Invoice_Envelope

access protected

Parameters

$method

string

Send method (email|hand|post); default: email

$email

\Moneybird\type

Address to send to; default: contact e-mail

$message

\Moneybird\type

Returns

 Properties

 

ApiConnector object

$connector : \Moneybird\ApiConnector