# give/4.16.9/src/PaymentGateways/PayPalCommerce/Models/WebhookConfig.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.9. 74 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.9/code/src/PaymentGateways/PayPalCommerce/Models/WebhookConfig.php
- Raw: https://pluginprobe.com/plugins/give/4.16.9/raw/src/PaymentGateways/PayPalCommerce/Models/WebhookConfig.php
- Modified: 2021-11-23T23:55:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.9/code/src/PaymentGateways/PayPalCommerce/Models/WebhookConfig.php#L10-L20`.

```php
<?php

namespace Give\PaymentGateways\PayPalCommerce\Models;

class WebhookConfig
{
    /**
     * @since 2.9.0
     *
     * @var string
     */
    public $id;

    /**
     * @since 2.9.0
     *
     * @var string
     */
    public $returnUrl;

    /**
     * @since 2.9.0
     *
     * @var string[]
     */
    public $events;

    /**
     * WebhookConfig constructor.
     *
     * @since 2.9.0
     *
     * @param string   $id
     * @param string   $returnUrl
     * @param string[] $events
     */
    public function __construct($id, $returnUrl, $events)
    {
        $this->id = $id;
        $this->returnUrl = $returnUrl;
        $this->events = $events;
    }

    /**
     * Generates an instance from serialized data
     *
     * @since 2.9.0
     *
     * @param array $data
     *
     * @return WebhookConfig
     */
    public static function fromArray(array $data)
    {
        return new self($data['id'], $data['returnUrl'], $data['events']);
    }

    /**
     * Generates an array for serialization
     *
     * @since 2.9.0
     *
     * @return array
     */
    public function toArray()
    {
        return [
            'id' => $this->id,
            'returnUrl' => $this->returnUrl,
            'events' => $this->events,
        ];
    }
}

```
