You are here

StripeWebhookEvent.php in Stripe 8

Same filename and directory in other branches
  1. 2.x src/Event/StripeWebhookEvent.php

File

src/Event/StripeWebhookEvent.php
View source
<?php

namespace Drupal\stripe\Event;

use Stripe\Event as StripeEvent;
use Symfony\Component\EventDispatcher\Event;

/**
 * Wraps a stripe event for webhook.
 */
class StripeWebhookEvent extends Event {

  /**
   * Stripe API event object.
   *
   * @var \Stripe\Event
   */
  protected $event;

  /**
   * Constructs a Stripe Webhook Event object.
   *
   * @param \Stripe\Event $event
   *   Stripe API event object object.
   */
  public function __construct(StripeEvent $event) {
    $this->event = $event;
  }

  /**
   * Gets Stripe API event object.
   *
   * @return \Stripe\Event
   *   The Stripe API event object
   */
  public function getEvent() {
    return $this->event;
  }

}

Classes

Namesort descending Description
StripeWebhookEvent Wraps a stripe event for webhook.