Completed
Push — master ( eece8c...a3a436 )
by Mr
02:11
created

Webhook::allowed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Bookeo\Models;
4
5
use Bookeo\Model;
6
7
/**
8
 * Class Webhook
9
 *
10
 * @codeCoverageIgnore
11
 * @package Bookeo\Models
12
 */
13
class Webhook extends Model
14
{
15
    /**
16
     * List of allowed fields
17
     *
18
     * @return array
19
     */
20
    public function allowed(): array
21
    {
22
        return [
23
            'id'            => 'string', // The id of the resource.
24
            'url'           => 'string', // The URL that Bookeo will request when an event triggers the webhook. The protocol must be https,
25
            'domain'        => 'string', // What type of object this webhook applies to = ['bookings' or 'seatblocks' or 'resourceblocks' or 'customers' or 'payments'],
26
            'type'          => 'string', // What type of operation triggers this webhook = ['created' or 'updated' or 'deleted'],
27
            'blockedTime'   => 'string:datetime', // If this field is present, it indicates that the webhook was blocked at this time. The blockedReason will indicate the reason for the block. Typically, a webhook gets blocked when too many consecutive notifications are dropped due to repeat conection errors. Once a webhook is blocked, no more notifications will be sent to it. Your application will need to fix the cause of the block, and then create a new webhook. [read-only],
28
            'blockedReason' => 'string', // The reason why the webhook was blocked. [read-only]
29
        ];
30
    }
31
}
32