Bitrix API

Service

Class Service

Table of Contents

Constants

ANSWER_ERROR_NO_CODE  = '002'
ANSWER_ERROR_NO_EXT_ID  = '003'
ANSWER_ERROR_NO_PAYLOAD  = '004'
ANSWER_ERROR_NO_SEC_CODE  = '005'
ANSWER_ERROR_SYSTEM  = '001'
ANSWER_ERROR_WRONG_SEC_CODE  = '006'

Methods

__construct()  : mixed
Service constructor.
checkSecurityCode()  : bool
Check security code.
create()  : static
Create instance.
getErrorCollection()  : ErrorCollection
Get error collection.
handle()  : $this
Handle web hook.
listen()  : void
Listen web hooks.
register()  : bool
Register web hook.
registerForm()  : mixed
remove()  : bool
Remove web hook.
unregisterForm()  : mixed

Constants

ANSWER_ERROR_NO_CODE

public mixed ANSWER_ERROR_NO_CODE = '002'

ANSWER_ERROR_NO_EXT_ID

public mixed ANSWER_ERROR_NO_EXT_ID = '003'

ANSWER_ERROR_NO_PAYLOAD

public mixed ANSWER_ERROR_NO_PAYLOAD = '004'

ANSWER_ERROR_NO_SEC_CODE

public mixed ANSWER_ERROR_NO_SEC_CODE = '005'

ANSWER_ERROR_SYSTEM

public mixed ANSWER_ERROR_SYSTEM = '001'

ANSWER_ERROR_WRONG_SEC_CODE

public mixed ANSWER_ERROR_WRONG_SEC_CODE = '006'

Methods

__construct()

Service constructor.

public __construct(string $type, string $externalId) : mixed
Parameters
$type : string

Type.

$externalId : string

External ID.

checkSecurityCode()

Check security code.

public checkSecurityCode(string $securityCode) : bool
Parameters
$securityCode : string

Code.

Return values
bool

create()

Create instance.

public static create(string $type, string $externalId) : static
Parameters
$type : string

Type.

$externalId : string

External ID.

Return values
static

getErrorCollection()

Get error collection.

public getErrorCollection() : ErrorCollection
Return values
ErrorCollection

handle()

Handle web hook.

public handle(Batch $payload) : $this
Parameters
$payload : Batch

Payload instance.

Return values
$this

listen()

Listen web hooks.

public static listen() : void

register()

Register web hook.

public register([array<string|int, mixed> $parameters = [] ]) : bool
Parameters
$parameters : array<string|int, mixed> = []

Parameters.

Return values
bool

registerForm()

public static registerForm(mixed $formId) : mixed
Parameters
$formId : mixed

remove()

Remove web hook.

public remove() : bool
Return values
bool

unregisterForm()

public static unregisterForm(mixed $formId) : mixed
Parameters
$formId : mixed

        
On this page

Search results