Estimate

 Methods

Construct a new estimate

__construct(array $data, \Moneybird\Contact $contact, bool $isDirty) 
Inherited

inherited_from \Moneybird\Estimate::__construct()

Parameters

$data

array

$isDirty

bool

new data is dirty, defaults to true

Proxy to disclose method

__get(String $key) : mixed
Inherited

inherited_from \Moneybird\Domainmodel\AbstractModel::__get()
inherited_from \Moneybird\Estimate::__get()

Parameters

$key

String

Returns

mixed

Magic set method Do not allow set

__set(string $name, mixed $value) 
Inherited

inherited_from \Moneybird\Domainmodel\AbstractModel::__set()
inherited_from \Moneybird\Estimate::__set()

Parameters

$name

string

$value

mixed

Exceptions

\Moneybird\Domainmodel\Exception

Deletes an estimate

delete(\Moneybird\Service $service) 
Inherited

inherited_from \Moneybird\Estimate::delete()

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\AbstractModel::disclose()
inherited_from \Moneybird\Estimate::disclose()

Parameters

$key

mixed

Returns

mixed

Returns an array representation of this object's dirty attributes

getDirtyAttributes() : array
Inherited

access public
inherited_from \Moneybird\Domainmodel\AbstractModel::getDirtyAttributes()
inherited_from \Moneybird\Estimate::getDirtyAttributes()

Returns

array

Return the objects id or null

getId() : int
Inherited

inherited_from \Moneybird\Domainmodel\AbstractModel::getId()
inherited_from \Moneybird\Estimate::getId()

Returns

int

Get the raw PDF content

getPdf(\Moneybird\Service $service) : string
Inherited

inherited_from \Moneybird\Estimate::getPdf()

Parameters

Exceptions

\Moneybird\InvalidStateException

Returns

string

Returns true if the object contains any dirty attributes

isDirty() : bool
Inherited

access public
inherited_from \Moneybird\Domainmodel\AbstractModel::isDirty()
inherited_from \Moneybird\Estimate::isDirty()

Returns

bool

Mark the estimate as sent

markAsSent(\Moneybird\Estimate\Service $service) : \Moneybird\self
Inherited

inherited_from \Moneybird\Estimate::markAsSent()

Parameters

Returns

\Moneybird\self

Updates or inserts an estimate

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

inherited_from \Moneybird\Estimate::save()

Parameters

Exceptions

\Moneybird\NotValidException

Returns

\Moneybird\self

Send the estimate

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

inherited_from \Moneybird\Estimate::send()

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, bool $isDirty) : \Moneybird\self
Inherited

access public
inherited_from \Moneybird\Estimate::setContact()

Parameters

$isDirty

bool

new data is dirty, defaults to true

Returns

\Moneybird\self

Sets data

setData(array $data, bool $isDirty) 
Inherited

inherited_from \Moneybird\Domainmodel\AbstractModel::setData()
inherited_from \Moneybird\Estimate::setData()

Parameters

$data

array

$isDirty

bool

new data is dirty, defaults to true

Get array representation of Subject

toArray() : Array
Inherited

inherited_from \Moneybird\Mapper\Mapable::toArray()
inherited_from \Moneybird\Estimate::toArray()

Returns

Array

Create disclosedAttributes array

_initDisclosedAttributes() 
Inherited

inherited_from \Moneybird\Domainmodel\AbstractModel::_initDisclosedAttributes()
inherited_from \Moneybird\Estimate::_initDisclosedAttributes()

Initialize vars

_initVars() 
Inherited

inherited_from \Moneybird\Estimate::_initVars()

Copy the object

copy(array $filter) : \Moneybird\Domainmodel\self
Inherited

inherited_from \Moneybird\Domainmodel\AbstractModel::copy()
inherited_from \Moneybird\Estimate::copy()

Parameters

$filter

Array

Attributes not to copy

Returns

\Moneybird\Domainmodel\self

Extract will take an array and try to automatically map the array values to properties in this object

extract(array $values, Array $filter, bool $isDirty) 
Inherited

access protected
inherited_from \Moneybird\Domainmodel\AbstractModel::extract()
inherited_from \Moneybird\Estimate::extract()

Parameters

$values

Array

$filter

Array

$isDirty

bool

new data is dirty, defaults to true

Initialize

init() 
Inherited

inherited_from \Moneybird\Domainmodel\AbstractModel::init()
inherited_from \Moneybird\Estimate::init()

Adopt the data from $self

reload(\Moneybird\Domainmodel\AbstractModel $self) : \Moneybird\Domainmodel\self
Inherited

inherited_from \Moneybird\Domainmodel\AbstractModel::reload()
inherited_from \Moneybird\Estimate::reload()

Parameters

Returns

\Moneybird\Domainmodel\self

Returns an array representation of this object

selfToArray(array $filter) : array
Inherited

access protected
inherited_from \Moneybird\Domainmodel\AbstractModel::selfToArray()
inherited_from \Moneybird\Estimate::selfToArray()

Parameters

$filter

Returns

array

Set dirty state to clean

setClean(string $attr) : \Moneybird\Domainmodel\self
Inherited

inherited_from \Moneybird\Domainmodel\AbstractModel::setClean()
inherited_from \Moneybird\Estimate::setClean()

Parameters

$attr

string

Name of attribute, if null (default) set all attribures clean

Returns

\Moneybird\Domainmodel\self

Set details

setDetailsAttr(\Moneybird\Estimate\Detail\ArrayObject $value, bool $isDirty) 
Inherited

inherited_from \Moneybird\Estimate::setDetailsAttr()

Parameters

$isDirty

bool

new value is dirty, defaults to true

Set dirty state to dirty

setDirty(string $attr) : \Moneybird\Domainmodel\self
Inherited

inherited_from \Moneybird\Domainmodel\AbstractModel::setDirty()
inherited_from \Moneybird\Estimate::setDirty()

Parameters

$attr

string

Name of attribute, if null (default) set all attribures dirty

Returns

\Moneybird\Domainmodel\self

Set dirty state based on bool

setDirtyState(bool $isDirty, string $attr) : \Moneybird\Domainmodel\self
Inherited

inherited_from \Moneybird\Domainmodel\AbstractModel::setDirtyState()
inherited_from \Moneybird\Estimate::setDirtyState()

Parameters

$isDirty

bool

$attr

string

Name of attribute, if null (default) change state of all attribures

Returns

\Moneybird\Domainmodel\self

Set history

setHistoryAttr(\Moneybird\Estimate\History\ArrayObject $value, bool $isDirty) 
Inherited

inherited_from \Moneybird\Estimate::setHistoryAttr()

Parameters

$isDirty

bool

new value is dirty, defaults to true

Set Id

setIdAttr(int $value) 
Inherited

inherited_from \Moneybird\Estimate::setIdAttr()

Parameters

$value

int

Exceptions

\Moneybird\InvalidIdException

Set url

setUrlAttr(string $value) 
Inherited

inherited_from \Moneybird\Estimate::setUrlAttr()

Parameters

$value

string

Validate object

validate() : bool
Inherited

inherited_from \Moneybird\Estimate::validate()

Returns

bool

 Properties

 

Array of attributes that are dirty

$_dirtyAttr : Array
Inherited

inherited_from \Moneybird\Domainmodel\AbstractModel::$$_dirtyAttr
inherited_from \Moneybird\Estimate::$$_dirtyAttr
 

Array containing attributes to disclose

$_discloseAttr : array
Inherited

access protected
inherited_from \Moneybird\Domainmodel\AbstractModel::$$_discloseAttr
inherited_from \Moneybird\Estimate::$$_discloseAttr
 

Disclosure

$_disclosure : \Moneybird\Disclosure
Inherited

access protected
inherited_from \Moneybird\Domainmodel\AbstractModel::$$_disclosure
inherited_from \Moneybird\Estimate::$$_disclosure
 

Array of attributes that can't be modified

$_readonlyAttr : Array
Inherited

inherited_from \Moneybird\Estimate::$$_readonlyAttr
 

Array of attributes that are required

$_requiredAttr : Array
Inherited

inherited_from \Moneybird\Estimate::$$_requiredAttr
 

$address1

$address1 
Inherited

inherited_from \Moneybird\Estimate::$$address1
 

$address2

$address2 
Inherited

inherited_from \Moneybird\Estimate::$$address2
 

$attention

$attention 
Inherited

inherited_from \Moneybird\Estimate::$$attention
 

$city

$city 
Inherited

inherited_from \Moneybird\Estimate::$$city
 

$companyName

$companyName 
Inherited

inherited_from \Moneybird\Estimate::$$companyName
 

$conceptId

$conceptId 
Inherited

inherited_from \Moneybird\Estimate::$$conceptId
 

$contactId

$contactId 
Inherited

inherited_from \Moneybird\Estimate::$$contactId
 

$country

$country 
Inherited

inherited_from \Moneybird\Estimate::$$country
 

$createdAt

$createdAt 
Inherited

inherited_from \Moneybird\Estimate::$$createdAt
 

$currency

$currency 
Inherited

inherited_from \Moneybird\Estimate::$$currency
 

$customerId

$customerId 
Inherited

inherited_from \Moneybird\Estimate::$$customerId
 

$daysOpen

$daysOpen 
Inherited

inherited_from \Moneybird\Estimate::$$daysOpen
 

$details

$details 
Inherited

inherited_from \Moneybird\Estimate::$$details
 

$discount

$discount 
Inherited

inherited_from \Moneybird\Estimate::$$discount
 

$dueDateInterval

$dueDateInterval 
Inherited

inherited_from \Moneybird\Estimate::$$dueDateInterval
 

$estimateDate

$estimateDate 
Inherited

inherited_from \Moneybird\Estimate::$$estimateDate
 

$estimateHash

$estimateHash 
Inherited

inherited_from \Moneybird\Estimate::$$estimateHash
 

$estimateId

$estimateId 
Inherited

inherited_from \Moneybird\Estimate::$$estimateId
 

$exchangeRate

$exchangeRate 
Inherited

inherited_from \Moneybird\Estimate::$$exchangeRate
 

$firstname

$firstname 
Inherited

inherited_from \Moneybird\Estimate::$$firstname
 

$history

$history 
Inherited

inherited_from \Moneybird\Estimate::$$history
 

$id

$id 
Inherited

inherited_from \Moneybird\Estimate::$$id
 

$invoiceProfileId

$invoiceProfileId 
Inherited

inherited_from \Moneybird\Estimate::$$invoiceProfileId
 

$invoiceProfileVersionId

$invoiceProfileVersionId 
Inherited

inherited_from \Moneybird\Estimate::$$invoiceProfileVersionId
 

$language

$language 
Inherited

inherited_from \Moneybird\Estimate::$$language
 

$lastname

$lastname 
Inherited

inherited_from \Moneybird\Estimate::$$lastname
 

$pdfUrl

$pdfUrl 
Inherited

inherited_from \Moneybird\Estimate::$$pdfUrl
 

$poNumber

$poNumber 
Inherited

inherited_from \Moneybird\Estimate::$$poNumber
 

$postText

$postText 
Inherited

inherited_from \Moneybird\Estimate::$$postText
 

$preText

$preText 
Inherited

inherited_from \Moneybird\Estimate::$$preText
 

$pricesAreInclTax

$pricesAreInclTax 
Inherited

inherited_from \Moneybird\Estimate::$$pricesAreInclTax
 

$revision

$revision 
Inherited

inherited_from \Moneybird\Estimate::$$revision
 

$sendMethod

$sendMethod 
Inherited

inherited_from \Moneybird\Estimate::$$sendMethod
 

$showCustomerId

$showCustomerId 
Inherited

inherited_from \Moneybird\Estimate::$$showCustomerId
 

$showTax

$showTax 
Inherited

inherited_from \Moneybird\Estimate::$$showTax
 

$signOnline

$signOnline 
Inherited

inherited_from \Moneybird\Estimate::$$signOnline
 

$state

$state 
Inherited

inherited_from \Moneybird\Estimate::$$state
 

$totalPriceExclTax

$totalPriceExclTax 
Inherited

inherited_from \Moneybird\Estimate::$$totalPriceExclTax
 

$totalPriceExclTaxBase

$totalPriceExclTaxBase 
Inherited

inherited_from \Moneybird\Estimate::$$totalPriceExclTaxBase
 

$totalPriceInclTax

$totalPriceInclTax 
Inherited

inherited_from \Moneybird\Estimate::$$totalPriceInclTax
 

$totalPriceInclTaxBase

$totalPriceInclTaxBase 
Inherited

inherited_from \Moneybird\Estimate::$$totalPriceInclTaxBase
 

$updatedAt

$updatedAt 
Inherited

inherited_from \Moneybird\Estimate::$$updatedAt
 

$url

$url 
Inherited

inherited_from \Moneybird\Estimate::$$url
 

$zipcode

$zipcode 
Inherited

inherited_from \Moneybird\Estimate::$$zipcode