Estimate

 Methods

Construct a new estimate

__construct(array $data, \Moneybird\Contact $contact) 

Parameters

$data

array

Proxy to disclose method

__get(String $key) : mixed
Inherited

inherited_from \Moneybird\Domainmodel_Abstract::__get()

Parameters

$key

String

Returns

mixed

Magic set method Do not allow set

__set(string $name, mixed $value) 
Inherited

inherited_from \Moneybird\Domainmodel_Abstract::__set()

Parameters

$name

string

$value

mixed

Exceptions

\Moneybird\Domainmodel_Exception

Deletes an estimate

delete(\Moneybird\Service $service) 

Parameters

Discloses all values of the object that should be visible in the view layer.

disclose(mixed $key) : mixed
Inherited

access public
inherited_from \Moneybird\Domainmodel_Abstract::disclose()

Parameters

$key

mixed

Returns

mixed

Return the objects id or null

getId() : int
Inherited

inherited_from \Moneybird\Domainmodel_Abstract::getId()

Returns

int

Get the raw PDF content

getPdf(\Moneybird\Service $service) : string

Parameters

Exceptions

\Moneybird\InvalidStateException

Returns

string

Mark the estimate as sent

markAsSent(\Moneybird\Estimate_Service $service) : \Moneybird\self

Parameters

Returns

\Moneybird\self

Updates or inserts an estimate

save(\Moneybird\Service $service) : \Moneybird\self

Parameters

Exceptions

\Moneybird\NotValidException

Returns

\Moneybird\self

Send the estimate

send(\Moneybird\Service $service, string $method, \Moneybird\type $email, \Moneybird\type $message) : \Moneybird\self

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

\Moneybird\self

Copy info from contact to estimate

setContact(\Moneybird\Contact $contact) : \Moneybird\self

access public

Parameters

Returns

\Moneybird\self

Sets data

setData(array $data) 
Inherited

inherited_from \Moneybird\Domainmodel_Abstract::setData()

Parameters

$data

array

Get array representation of Subject

toArray() : Array
Inherited

inherited_from \Moneybird\Mapper_Mapable::toArray()

Returns

Array

 Properties