ApiCreateDocument
extends ApiController
in package
Table of Contents
Constants
- API_VERSION = 3
- INCIDENT_EXPIRATION_TIME = 600
- IP_LIST = 'api-ip-list'
- MAX_INCIDENT_COUNT = 5
Properties
- $apiKey : ApiKey
- $purchases_model : string
- $request : Request
- $response : Response
- $sales_model : string
- $url : string
Methods
- __construct() : mixed
- getPageData() : array<string|int, mixed>
- run() : void
- createPurchase() : void
- createSale() : void
- db() : DataBase
- getUriParam() : string
- loadModel() : void
- processInvoicePaid() : void
- runResource() : void
- saveLines() : bool
- toBool() : bool
- Convierte un valor a booleano.
Constants
API_VERSION
public
mixed
API_VERSION
= 3
INCIDENT_EXPIRATION_TIME
public
mixed
INCIDENT_EXPIRATION_TIME
= 600
IP_LIST
public
mixed
IP_LIST
= 'api-ip-list'
MAX_INCIDENT_COUNT
public
mixed
MAX_INCIDENT_COUNT
= 5
Properties
$apiKey
protected
ApiKey
$apiKey
$purchases_model
protected
string
$purchases_model
$request
protected
Request
$request
$response
protected
Response
$response
$sales_model
protected
string
$sales_model
$url
protected
string
$url
Methods
__construct()
public
__construct(string $className[, string $url = '' ]) : mixed
Parameters
- $className : string
- $url : string = ''
getPageData()
public
getPageData() : array<string|int, mixed>
Return values
array<string|int, mixed>run()
public
run() : void
createPurchase()
protected
createPurchase() : void
createSale()
protected
createSale() : void
db()
protected
db() : DataBase
Return values
DataBasegetUriParam()
protected
getUriParam(string $num) : string
Parameters
- $num : string
Return values
stringloadModel()
protected
loadModel() : void
processInvoicePaid()
protected
processInvoicePaid(BusinessDocument &$doc) : void
Parameters
- $doc : BusinessDocument
runResource()
protected
runResource() : void
saveLines()
protected
saveLines(BusinessDocument &$documento) : bool
Parameters
- $documento : BusinessDocument
Return values
booltoBool()
Convierte un valor a booleano.
protected
toBool(mixed $value) : bool
Acepta: true, false, 1, 0, "1", "0", "true", "false"
Parameters
- $value : mixed