Menu

## Webhook extends AbstractApiObject
in package

Webhook.php : 30

Webhook class allows you to subscribe to certain events.

##### Tags

category

  Class

author

  Daniel Muenter info@msltns.com

version
  0.0.1
since
  0.0.1
license

  GPL 3 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

### Table of Contents

$id : id
$required : required
$event_types : array<string|int, mixed>
$url : string
__construct() : void
  Webhook constructor.
get_event_types() : array<string|int, mixed>
  Getter method for event_types.
get_id() : string|null
  Getter method for id.
get_required_fields() : array<string|int, mixed>
  Getter method for id.
get_url() : string
  Getter method for url.
set_event_types() : void
  Setter method for event_types.
set_id() : void
  Setter method for id.
set_url() : void
  Setter method for url.
to_array() : array<string|int, mixed>
  Getter method for parameter array.
to_string() : string
  Getter method for string representation.

### Properties

#### $id

AbstractApiObject.php : 30
`protected id $id`

#### $required

AbstractApiObject.php : 35
`protected required $required`

#### $event_types

Webhook.php : 40
`private array<string|int, mixed> $event_types`

#### $url

Webhook.php : 35
`private string $url`

### Methods

#### __construct()

Webhook.php : 50

Webhook constructor.

`public __construct(string $url[, array<string|int, mixed> $event_types = [EventType::ALL] ]) : void`

##### Parameters

$url : string
$event_types : array<string|int, mixed> = [EventType::ALL]

##### Tags

throws
  ApiException

##### Return values

void —

#### get_event_types()

Webhook.php : 90

Getter method for event_types.

`public get_event_types() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

The event_types.

#### get_id()

AbstractApiObject.php : 47

Getter method for id.

`public get_id() : string|null`

##### Return values

string|null —

The id.

#### get_required_fields()

AbstractApiObject.php : 64

Getter method for id.

`public get_required_fields() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

The id.

#### get_url()

Webhook.php : 69

Getter method for url.

`public get_url() : string`

##### Return values

string —

The url.

#### set_event_types()

Webhook.php : 100

Setter method for event_types.

`public set_event_types(array<string|int, mixed> $event_types) : void`

##### Parameters

$event_types : array<string|int, mixed>

  The event_types to set.

##### Tags

throws
  ApiException

##### Return values

void —

#### set_id()

AbstractApiObject.php : 56

Setter method for id.

`public set_id(string $id) : void`

##### Parameters

$id : string

  The id to set.

##### Return values

void —

#### set_url()

Webhook.php : 79

Setter method for url.

`public set_url(string $url) : void`

##### Parameters

$url : string

  The url to set.

##### Tags

throws
  ApiException

##### Return values

void —

#### to_array()

Webhook.php : 111

Getter method for parameter array.

`public to_array() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

The class object as array.

#### to_string()

AbstractApiObject.php : 86

Getter method for string representation.

`public to_string() : string`

##### Return values

string —

The object as string representation.

## Search results