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

Public Member Functions

 __construct ()
 Constructor.
 
 get ($id)
 Get properties of a supplier order object. More...
 
 post ($request_data=NULL)
 Create supplier order object. More...
 
 put ($id, $request_data=NULL)
 Update supplier order. More...
 
 delete ($id)
 Delete supplier order. 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_orders.class.php.

Member Function Documentation

SupplierOrders::_cleanObjectDatas (   $object)

Clean sensible object datas.

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

Definition at line 339 of file api_supplier_orders.class.php.

Referenced by get().

SupplierOrders::_validate (   $data)

Validate fields before create or update object.

Parameters
array$dataDatas to validate
Returns
array
Exceptions
RestException

Definition at line 360 of file api_supplier_orders.class.php.

Referenced by post().

SupplierOrders::delete (   $id)

Delete supplier order.

Parameters
int$idSupplier order ID
Returns
type

Definition at line 257 of file api_supplier_orders.class.php.

References DolibarrApi\_checkAccessToResource().

SupplierOrders::get (   $id)

Get properties of a supplier order object.

Return an array with supplier order information

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

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

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

SupplierOrders::post (   $request_data = NULL)

Create supplier order object.

Parameters
array$request_dataRequest datas
Returns
int ID of supplier order

Definition at line 189 of file api_supplier_orders.class.php.

References _validate(), and dol_now().

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

Update supplier order.

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

Definition at line 225 of file api_supplier_orders.class.php.

References DolibarrApi\_checkAccessToResource().

SupplierOrders::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 303 of file api_supplier_orders.class.php.

References DolibarrApi\_checkAccessToResource().


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