Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3/**
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; under version 2
7 * of the License (non-upgradable).
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 *
18 * Copyright (c) 2019 (original work) Open Assessment Technologies SA;
19 */
20
21namespace oat\tao\model\webhooks\log;
22
23use oat\tao\model\webhooks\task\WebhookTaskContext;
24
25interface WebhookEventLogInterface
26{
27    public const SERVICE_ID = 'tao/webhookEventLog';
28
29    /**
30     * @param WebhookTaskContext $webhookTaskContext
31     * @param string|null $networkError
32     */
33    public function storeNetworkErrorLog(WebhookTaskContext $webhookTaskContext, $networkError = null);
34
35    /**
36     * @param WebhookTaskContext $webhookTaskContext
37     * @param int $actualHttpStatusCode
38     * @param string|null $responseBody
39     */
40    public function storeInvalidHttpStatusLog(
41        WebhookTaskContext $webhookTaskContext,
42        $actualHttpStatusCode,
43        $responseBody = null
44    );
45
46    /**
47     * @param WebhookTaskContext $webhookTaskContext
48     * @param string|null $responseBody
49     */
50    public function storeInvalidBodyFormat(WebhookTaskContext $webhookTaskContext, $responseBody = null);
51
52    /**
53     * @param WebhookTaskContext $webhookTaskContext
54     * @param string $responseBody
55     * @param string|null $actualAcknowledgement
56     */
57    public function storeInvalidAcknowledgementLog(
58        WebhookTaskContext $webhookTaskContext,
59        $responseBody,
60        $actualAcknowledgement = null
61    );
62
63    /**
64     * @param WebhookTaskContext $webhookTaskContext
65     * @param string $responseBody
66     * @param string $acknowledgement
67     */
68    public function storeSuccessfulLog(WebhookTaskContext $webhookTaskContext, $responseBody, $acknowledgement);
69
70    /**
71     * @param WebhookTaskContext $webhookTaskContext
72     * @param string|null $internalError
73     */
74    public function storeInternalErrorLog(WebhookTaskContext $webhookTaskContext, $internalError = null);
75}