RecurringTemplate

 Methods

Construct a new template

__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

Create an invoice for this template

createInvoice() : \Moneybird\Invoice

Deletes a the template (or sets inactive)

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 all invoices of this template

getInvoices(\Moneybird\Invoice_Service $service, string $filter) : \Moneybird\Invoice_Array

access public

Parameters

$filter

string

Returns

Updates or inserts the template

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

Parameters

Exceptions

\Moneybird\NotValidException

Returns

\Moneybird\self

Copy info from contact to template

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

Create disclosedAttributes array

_initDisclosedAttributes() 
Inherited

inherited_from \Moneybird\Domainmodel_Abstract::_initDisclosedAttributes()

Initialize vars

_initVars() 

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

extract(array $values, Array $filter) 
Inherited

access protected
inherited_from \Moneybird\Domainmodel_Abstract::extract()

Parameters

$values

Array

$filter

Array

Initialize

init() 
Inherited

inherited_from \Moneybird\Domainmodel_Abstract::init()

Adopt the data from $self

reload(\Moneybird\Domainmodel_Abstract $self) : \Moneybird\self
Inherited

inherited_from \Moneybird\Domainmodel_Abstract::reload()

Parameters

Returns

\Moneybird\self

Returns an array representation of this object

selfToArray(array $filter) : array
Inherited

access protected
inherited_from \Moneybird\Domainmodel_Abstract::selfToArray()

Parameters

$filter

Returns

array

Set details

setDetailsAttr(\Moneybird\RecurringTemplate_Detail_Array $value) 

Set frecuency type

setFrequencyTypeAttr(int $value) 

Parameters

$value

int

Exceptions

\Moneybird\Exception

Set Id

setIdAttr(int $value) 

Parameters

$value

int

Exceptions

\Moneybird\InvalidIdException

Validate object

validate() : bool

Returns

bool

 Properties

 

Available frequency types

$frequencyTypes : Array

static
 

Array containing attributes to disclose

$_discloseAttr : array
Inherited

access protected
inherited_from \Moneybird\Domainmodel_Abstract::$$_discloseAttr
 

Disclosure

$_disclosure : \Moneybird\Disclosure
Inherited

access protected
inherited_from \Moneybird\Domainmodel_Abstract::$$_disclosure
 

Array of attributes that can't be modified

$_readonlyAttr : Array

 

Array of attributes that are required

$_requiredAttr : Array

 

$active

$active 

 

$contactId

$contactId 

 

$createdAt

$createdAt 

 

$currency

$currency 

 

$details

$details 

 

$discount

$discount 

 

$frequency

$frequency 

 

$frequencyType

$frequencyType 

 

$id

$id 

 

$invoiceProfileId

$invoiceProfileId 

 

$lastDate

$lastDate 

 

$nextDate

$nextDate 

 

$numberOfOccurences

$numberOfOccurences 

 

$occurences

$occurences 

 

$sendInvoice

$sendInvoice 

 

$startDate

$startDate 

 

$templateId

$templateId 

 

$totalPriceExclTax

$totalPriceExclTax 

 

$totalPriceInclTax

$totalPriceInclTax 

 

$updatedAt

$updatedAt 

 Constants

 

Send frequency

FREQUENCY_6MONTHS 

const FREQUENCY_6MONTHS Send every 6 months
 

Send frequency

FREQUENCY_MONTH 

const FREQUENCY_MONTH Send every month
 

Send frequency

FREQUENCY_QUARTER 

const FREQUENCY_QUARTER Send every quarter
 

Send frequency

FREQUENCY_WEEKLY 

const FREQUENCY_WEEKLY Send every week
 

Send frequency

FREQUENCY_YEAR 

const FREQUENCY_YEAR Send every year