Documentation

BexioBills extends BexioAPI
in package
Uses tBexioObject, tBexioV4Api

Represent the enpoint Bills

Tags
link
https://docs.bexio.com/#tag/Bills

Table of Contents

Constants

type  = 'purchase/bills'

Properties

$className  : string
$ctx  : BexioCTX
$endpoint  : string
$ownerid  : int|null
$query  : string
$search_fields  : mixed
$userid  : int|null

Methods

__construct()  : mixed
Create withing the given context.
delete()  : bool
Delete an item in the collection.
get()  : BXObject
Get an item from the collection
getIdName()  : string
Get ID name for version 4 of the API.
getType()  : string
Get the current type.
list()  : array<string|int, mixed>
List request for version 4 of the API.
new()  : BXObject
Create a new BXObject.
newQuery()  : BXQuery
Create new query for version 4 of the API.
search()  : array<string|int, mixed>
Search request for version 4 of the API.
set()  : BXObject|false
Set an item in the collection
setCurrentOwner()  : void
Set current owner id.
setCurrentUser()  : void
Set current user id.
setStatus()  : BXObject
update()  : BXObject|false
[!!!] Update an item in the collection

Constants

type

public mixed type = 'purchase/bills'

Properties

$className

protected string $className = 'BizCuit\\BXObject\\Bills'

$endpoint

protected string $endpoint

$ownerid

protected int|null $ownerid = null

$query

protected string $query = 'BizCuit\\BXQuery\\Bills'

$search_fields

protected mixed $search_fields = ['firstname_suffix', 'lastname_company', 'vendor_ref', 'currency_code', 'document_no', 'title']

$userid

protected int|null $userid = null

Methods

__construct()

Create withing the given context.

public __construct(BexioCTX $ctx) : mixed
Parameters
$ctx : BexioCTX

The context in which the API will work.

delete()

Delete an item in the collection.

public delete(int|string|BXObject $id) : bool
APIYes
Parameters
$id : int|string|BXObject

The id or the object to delete.

Return values
bool

True on success, false otherwise.

get()

Get an item from the collection

public get(int|string|BXObject $id[, array<string|int, mixed> $options = [] ]) : BXObject
APIYes
Parameters
$id : int|string|BXObject

The id or the object to get.

$options : array<string|int, mixed> = []

Options that can be passed as query string.

Return values
BXObject

The item as a BXObject.

getType()

Get the current type.

public getType() : string

The current type correspond to an endpoint in the upstream API.

Return values
string

The type name

list()

List request for version 4 of the API.

public list(int $offset, int $limit) : array<string|int, mixed>
Parameters
$offset : int
$limit : int
Tags
see
tBexioCollection::list()
Return values
array<string|int, mixed>

Search request for version 4 of the API.

public search(BXQuery $query[, int $offset = 0 ][, int $limit = 100 ]) : array<string|int, mixed>
Parameters
$query : BXQuery
$offset : int = 0
$limit : int = 100
Tags
see
tBexioCollection::search()
Return values
array<string|int, mixed>

set()

Set an item in the collection

public set(BXObject $content) : BXObject|false
APIYes

Setting an item would create the item if it don't have an ID or overwrite the item if it has an ID.

Parameters
$content : BXObject

The object to be set.

Return values
BXObject|false

The item is returned as stored in collection or false in case of error

setCurrentOwner()

Set current owner id.

public setCurrentOwner(int $ownerid) : void

Some items, at creation, need a user id and/or an owner id. This set the owner.

Parameters
$ownerid : int

The id of the owner for all creation from now on.

setCurrentUser()

Set current user id.

public setCurrentUser(int $userid) : void

Some items, at creation, need a user id and/or an owner id. Setting this here allows to automatically add this to the item. If only user is set, when owner is needed it would be set to user.

Parameters
$userid : int

The id of the user for all creation from now on.

update()

[!!!] Update an item in the collection

public update(BXObject $content) : BXObject|false
APIYes

This should update property of an item. But the upstream API is buggy here, so no way to know what UPDATE does.

Parameters
$content : BXObject

The object to be set.

Return values
BXObject|false

The item is returned as stored in collection or false in case of error


        
On this page

Search results