dolibarr  7.0.0-beta
Public Member Functions | List of all members
SupplierInvoices Class Reference
+ Inheritance diagram for SupplierInvoices:
+ Collaboration diagram for SupplierInvoices:

Public Member Functions

 __construct ()
 Constructor.
 
 get ($id)
 Get properties of a supplier invoice object. More...
 
 post ($request_data=NULL)
 Create supplier invoice object. More...
 
 put ($id, $request_data=NULL)
 Update supplier invoice. More...
 
 delete ($id)
 Delete supplier invoice. More...
 
 validate ($id, $idwarehouse=0, $notrigger=0)
 Validate an order. More...
 
 _cleanObjectDatas ($object)
 Clean sensible object datas. More...
 
 _validate ($data)
 Validate fields before create or update object. More...
 
- Public Member Functions inherited from DolibarrApi
 __construct ($db, $cachedir='', $refreshCache=false)
 Constructor. More...
 
 _cleanObjectDatas ($object)
 Executed method when API is called without parameter. More...
 
 _checkFilters ($sqlfilters)
 Return if a $sqlfilters parameter is valid. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DolibarrApi
static _checkAccessToResource ($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid')
 Check user access to a resource. More...
 
static _forge_criteria_callback ($matches)
 Function to forge a SQL criteria. More...
 

Detailed Description

Definition at line 29 of file api_supplier_invoices.class.php.

Member Function Documentation

SupplierInvoices::_cleanObjectDatas (   $object)

Clean sensible object datas.

Parameters
Object$objectObject to clean
Returns
array Array of cleaned object properties

Definition at line 335 of file api_supplier_invoices.class.php.

Referenced by get().

SupplierInvoices::_validate (   $data)

Validate fields before create or update object.

Parameters
array$dataDatas to validate
Returns
array
Exceptions
RestException

Definition at line 356 of file api_supplier_invoices.class.php.

Referenced by post().

SupplierInvoices::delete (   $id)

Delete supplier invoice.

Parameters
int$idSupplier invoice ID
Returns
type

Definition at line 253 of file api_supplier_invoices.class.php.

References DolibarrApi\_checkAccessToResource().

SupplierInvoices::get (   $id)

Get properties of a supplier invoice object.

Return an array with supplier invoice information

Parameters
int$idID of supplier invoice
Returns
array|mixed data without useless information
Exceptions
RestException

Definition at line 64 of file api_supplier_invoices.class.php.

References DolibarrApi\_checkAccessToResource(), and _cleanObjectDatas().

SupplierInvoices::post (   $request_data = NULL)

Create supplier invoice object.

Parameters
array$request_dataRequest datas
Returns
int ID of supplier invoice

Definition at line 185 of file api_supplier_invoices.class.php.

References _validate(), and dol_now().

SupplierInvoices::put (   $id,
  $request_data = NULL 
)

Update supplier invoice.

Parameters
int$idId of supplier invoice to update
array$request_dataDatas
Returns
int

Definition at line 221 of file api_supplier_invoices.class.php.

References DolibarrApi\_checkAccessToResource().

SupplierInvoices::validate (   $id,
  $idwarehouse = 0,
  $notrigger = 0 
)

Validate an order.

Parameters
int$idOrder ID
int$idwarehouseWarehouse ID
int$notrigger1=Does not execute triggers, 0= execute triggers

POST {id}/validate

Returns
array FIXME An error 403 is returned if the request has an empty body. Error message: "Forbidden: Content type `text/plain` is not supported." Workaround: send this in the body { "idwarehouse": 0, "notrigger": 0 }

Definition at line 299 of file api_supplier_invoices.class.php.

References DolibarrApi\_checkAccessToResource().


The documentation for this class was generated from the following file: