vendor/stripe/stripe-php/lib/Event.php line 56

Open in your IDE?
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe;
  4. /**
  5.  * Events are our way of letting you know when something interesting happens in
  6.  * your account. When an interesting event occurs, we create a new
  7.  * <code>Event</code> object. For example, when a charge succeeds, we create a
  8.  * <code>charge.succeeded</code> event; and when an invoice payment attempt fails,
  9.  * we create an <code>invoice.payment_failed</code> event. Note that many API
  10.  * requests may cause multiple events to be created. For example, if you create a
  11.  * new subscription for a customer, you will receive both a
  12.  * <code>customer.subscription.created</code> event and a
  13.  * <code>charge.succeeded</code> event.
  14.  *
  15.  * Events occur when the state of another API resource changes. The state of that
  16.  * resource at the time of the change is embedded in the event's data field. For
  17.  * example, a <code>charge.succeeded</code> event will contain a charge, and an
  18.  * <code>invoice.payment_failed</code> event will contain an invoice.
  19.  *
  20.  * As with other API resources, you can use endpoints to retrieve an <a
  21.  * href="https://stripe.com/docs/api#retrieve_event">individual event</a> or a <a
  22.  * href="https://stripe.com/docs/api#list_events">list of events</a> from the API.
  23.  * We also have a separate <a
  24.  * href="http://en.wikipedia.org/wiki/Webhook">webhooks</a> system for sending the
  25.  * <code>Event</code> objects directly to an endpoint on your server. Webhooks are
  26.  * managed in your <a href="https://dashboard.stripe.com/account/webhooks">account
  27.  * settings</a>, and our <a href="https://stripe.com/docs/webhooks">Using
  28.  * Webhooks</a> guide will help you get set up.
  29.  *
  30.  * When using <a href="https://stripe.com/docs/connect">Connect</a>, you can also
  31.  * receive notifications of events that occur in connected accounts. For these
  32.  * events, there will be an additional <code>account</code> attribute in the
  33.  * received <code>Event</code> object.
  34.  *
  35.  * <strong>NOTE:</strong> Right now, access to events through the <a
  36.  * href="https://stripe.com/docs/api#retrieve_event">Retrieve Event API</a> is
  37.  * guaranteed only for 30 days.
  38.  *
  39.  * This class includes constants for the possible string representations of
  40.  * event types. See https://stripe.com/docs/api#event_types for more details.
  41.  *
  42.  * @property string $id Unique identifier for the object.
  43.  * @property string $object String representing the object's type. Objects of the same type share the same value.
  44.  * @property string $account The connected account that originated the event.
  45.  * @property null|string $api_version The Stripe API version used to render <code>data</code>. <em>Note: This property is populated only for events on or after October 31, 2014</em>.
  46.  * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
  47.  * @property \Stripe\StripeObject $data
  48.  * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
  49.  * @property int $pending_webhooks Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified.
  50.  * @property null|\Stripe\StripeObject $request Information on the API request that instigated the event.
  51.  * @property string $type Description of the event (e.g., <code>invoice.created</code> or <code>charge.refunded</code>).
  52.  */
  53. class Event extends ApiResource
  54. {
  55.     const OBJECT_NAME 'event';
  56.     use ApiOperations\All;
  57.     use ApiOperations\Retrieve;
  58.     const ACCOUNT_APPLICATION_AUTHORIZED 'account.application.authorized';
  59.     const ACCOUNT_APPLICATION_DEAUTHORIZED 'account.application.deauthorized';
  60.     const ACCOUNT_EXTERNAL_ACCOUNT_CREATED 'account.external_account.created';
  61.     const ACCOUNT_EXTERNAL_ACCOUNT_DELETED 'account.external_account.deleted';
  62.     const ACCOUNT_EXTERNAL_ACCOUNT_UPDATED 'account.external_account.updated';
  63.     const ACCOUNT_UPDATED 'account.updated';
  64.     const APPLICATION_FEE_CREATED 'application_fee.created';
  65.     const APPLICATION_FEE_REFUND_UPDATED 'application_fee.refund.updated';
  66.     const APPLICATION_FEE_REFUNDED 'application_fee.refunded';
  67.     const BALANCE_AVAILABLE 'balance.available';
  68.     const BILLING_PORTAL_CONFIGURATION_CREATED 'billing_portal.configuration.created';
  69.     const BILLING_PORTAL_CONFIGURATION_UPDATED 'billing_portal.configuration.updated';
  70.     const CAPABILITY_UPDATED 'capability.updated';
  71.     const CASH_BALANCE_FUNDS_AVAILABLE 'cash_balance.funds_available';
  72.     const CHARGE_CAPTURED 'charge.captured';
  73.     const CHARGE_DISPUTE_CLOSED 'charge.dispute.closed';
  74.     const CHARGE_DISPUTE_CREATED 'charge.dispute.created';
  75.     const CHARGE_DISPUTE_FUNDS_REINSTATED 'charge.dispute.funds_reinstated';
  76.     const CHARGE_DISPUTE_FUNDS_WITHDRAWN 'charge.dispute.funds_withdrawn';
  77.     const CHARGE_DISPUTE_UPDATED 'charge.dispute.updated';
  78.     const CHARGE_EXPIRED 'charge.expired';
  79.     const CHARGE_FAILED 'charge.failed';
  80.     const CHARGE_PENDING 'charge.pending';
  81.     const CHARGE_REFUND_UPDATED 'charge.refund.updated';
  82.     const CHARGE_REFUNDED 'charge.refunded';
  83.     const CHARGE_SUCCEEDED 'charge.succeeded';
  84.     const CHARGE_UPDATED 'charge.updated';
  85.     const CHECKOUT_SESSION_ASYNC_PAYMENT_FAILED 'checkout.session.async_payment_failed';
  86.     const CHECKOUT_SESSION_ASYNC_PAYMENT_SUCCEEDED 'checkout.session.async_payment_succeeded';
  87.     const CHECKOUT_SESSION_COMPLETED 'checkout.session.completed';
  88.     const CHECKOUT_SESSION_EXPIRED 'checkout.session.expired';
  89.     const COUPON_CREATED 'coupon.created';
  90.     const COUPON_DELETED 'coupon.deleted';
  91.     const COUPON_UPDATED 'coupon.updated';
  92.     const CREDIT_NOTE_CREATED 'credit_note.created';
  93.     const CREDIT_NOTE_UPDATED 'credit_note.updated';
  94.     const CREDIT_NOTE_VOIDED 'credit_note.voided';
  95.     const CUSTOMER_CREATED 'customer.created';
  96.     const CUSTOMER_DELETED 'customer.deleted';
  97.     const CUSTOMER_DISCOUNT_CREATED 'customer.discount.created';
  98.     const CUSTOMER_DISCOUNT_DELETED 'customer.discount.deleted';
  99.     const CUSTOMER_DISCOUNT_UPDATED 'customer.discount.updated';
  100.     const CUSTOMER_SOURCE_CREATED 'customer.source.created';
  101.     const CUSTOMER_SOURCE_DELETED 'customer.source.deleted';
  102.     const CUSTOMER_SOURCE_EXPIRING 'customer.source.expiring';
  103.     const CUSTOMER_SOURCE_UPDATED 'customer.source.updated';
  104.     const CUSTOMER_SUBSCRIPTION_CREATED 'customer.subscription.created';
  105.     const CUSTOMER_SUBSCRIPTION_DELETED 'customer.subscription.deleted';
  106.     const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_APPLIED 'customer.subscription.pending_update_applied';
  107.     const CUSTOMER_SUBSCRIPTION_PENDING_UPDATE_EXPIRED 'customer.subscription.pending_update_expired';
  108.     const CUSTOMER_SUBSCRIPTION_TRIAL_WILL_END 'customer.subscription.trial_will_end';
  109.     const CUSTOMER_SUBSCRIPTION_UPDATED 'customer.subscription.updated';
  110.     const CUSTOMER_TAX_ID_CREATED 'customer.tax_id.created';
  111.     const CUSTOMER_TAX_ID_DELETED 'customer.tax_id.deleted';
  112.     const CUSTOMER_TAX_ID_UPDATED 'customer.tax_id.updated';
  113.     const CUSTOMER_UPDATED 'customer.updated';
  114.     const FILE_CREATED 'file.created';
  115.     const IDENTITY_VERIFICATION_SESSION_CANCELED 'identity.verification_session.canceled';
  116.     const IDENTITY_VERIFICATION_SESSION_CREATED 'identity.verification_session.created';
  117.     const IDENTITY_VERIFICATION_SESSION_PROCESSING 'identity.verification_session.processing';
  118.     const IDENTITY_VERIFICATION_SESSION_REDACTED 'identity.verification_session.redacted';
  119.     const IDENTITY_VERIFICATION_SESSION_REQUIRES_INPUT 'identity.verification_session.requires_input';
  120.     const IDENTITY_VERIFICATION_SESSION_VERIFIED 'identity.verification_session.verified';
  121.     const INVOICE_CREATED 'invoice.created';
  122.     const INVOICE_DELETED 'invoice.deleted';
  123.     const INVOICE_FINALIZATION_FAILED 'invoice.finalization_failed';
  124.     const INVOICE_FINALIZED 'invoice.finalized';
  125.     const INVOICE_MARKED_UNCOLLECTIBLE 'invoice.marked_uncollectible';
  126.     const INVOICE_PAID 'invoice.paid';
  127.     const INVOICE_PAYMENT_ACTION_REQUIRED 'invoice.payment_action_required';
  128.     const INVOICE_PAYMENT_FAILED 'invoice.payment_failed';
  129.     const INVOICE_PAYMENT_SUCCEEDED 'invoice.payment_succeeded';
  130.     const INVOICE_SENT 'invoice.sent';
  131.     const INVOICE_UPCOMING 'invoice.upcoming';
  132.     const INVOICE_UPDATED 'invoice.updated';
  133.     const INVOICE_VOIDED 'invoice.voided';
  134.     const INVOICEITEM_CREATED 'invoiceitem.created';
  135.     const INVOICEITEM_DELETED 'invoiceitem.deleted';
  136.     const INVOICEITEM_UPDATED 'invoiceitem.updated';
  137.     const ISSUER_FRAUD_RECORD_CREATED 'issuer_fraud_record.created';
  138.     const ISSUING_AUTHORIZATION_CREATED 'issuing_authorization.created';
  139.     const ISSUING_AUTHORIZATION_REQUEST 'issuing_authorization.request';
  140.     const ISSUING_AUTHORIZATION_UPDATED 'issuing_authorization.updated';
  141.     const ISSUING_CARD_CREATED 'issuing_card.created';
  142.     const ISSUING_CARD_UPDATED 'issuing_card.updated';
  143.     const ISSUING_CARDHOLDER_CREATED 'issuing_cardholder.created';
  144.     const ISSUING_CARDHOLDER_UPDATED 'issuing_cardholder.updated';
  145.     const ISSUING_DISPUTE_CLOSED 'issuing_dispute.closed';
  146.     const ISSUING_DISPUTE_CREATED 'issuing_dispute.created';
  147.     const ISSUING_DISPUTE_FUNDS_REINSTATED 'issuing_dispute.funds_reinstated';
  148.     const ISSUING_DISPUTE_SUBMITTED 'issuing_dispute.submitted';
  149.     const ISSUING_DISPUTE_UPDATED 'issuing_dispute.updated';
  150.     const ISSUING_TRANSACTION_CREATED 'issuing_transaction.created';
  151.     const ISSUING_TRANSACTION_UPDATED 'issuing_transaction.updated';
  152.     const MANDATE_UPDATED 'mandate.updated';
  153.     const ORDER_CREATED 'order.created';
  154.     const ORDER_PAYMENT_FAILED 'order.payment_failed';
  155.     const ORDER_PAYMENT_SUCCEEDED 'order.payment_succeeded';
  156.     const ORDER_UPDATED 'order.updated';
  157.     const ORDER_RETURN_CREATED 'order_return.created';
  158.     const PAYMENT_INTENT_AMOUNT_CAPTURABLE_UPDATED 'payment_intent.amount_capturable_updated';
  159.     const PAYMENT_INTENT_CANCELED 'payment_intent.canceled';
  160.     const PAYMENT_INTENT_CREATED 'payment_intent.created';
  161.     const PAYMENT_INTENT_PARTIALLY_FUNDED 'payment_intent.partially_funded';
  162.     const PAYMENT_INTENT_PAYMENT_FAILED 'payment_intent.payment_failed';
  163.     const PAYMENT_INTENT_PROCESSING 'payment_intent.processing';
  164.     const PAYMENT_INTENT_REQUIRES_ACTION 'payment_intent.requires_action';
  165.     const PAYMENT_INTENT_SUCCEEDED 'payment_intent.succeeded';
  166.     const PAYMENT_LINK_CREATED 'payment_link.created';
  167.     const PAYMENT_LINK_UPDATED 'payment_link.updated';
  168.     const PAYMENT_METHOD_ATTACHED 'payment_method.attached';
  169.     const PAYMENT_METHOD_AUTOMATICALLY_UPDATED 'payment_method.automatically_updated';
  170.     const PAYMENT_METHOD_CARD_AUTOMATICALLY_UPDATED 'payment_method.card_automatically_updated';
  171.     const PAYMENT_METHOD_DETACHED 'payment_method.detached';
  172.     const PAYMENT_METHOD_UPDATED 'payment_method.updated';
  173.     const PAYOUT_CANCELED 'payout.canceled';
  174.     const PAYOUT_CREATED 'payout.created';
  175.     const PAYOUT_FAILED 'payout.failed';
  176.     const PAYOUT_PAID 'payout.paid';
  177.     const PAYOUT_UPDATED 'payout.updated';
  178.     const PERSON_CREATED 'person.created';
  179.     const PERSON_DELETED 'person.deleted';
  180.     const PERSON_UPDATED 'person.updated';
  181.     const PING 'ping';
  182.     const PLAN_CREATED 'plan.created';
  183.     const PLAN_DELETED 'plan.deleted';
  184.     const PLAN_UPDATED 'plan.updated';
  185.     const PRICE_CREATED 'price.created';
  186.     const PRICE_DELETED 'price.deleted';
  187.     const PRICE_UPDATED 'price.updated';
  188.     const PRODUCT_CREATED 'product.created';
  189.     const PRODUCT_DELETED 'product.deleted';
  190.     const PRODUCT_UPDATED 'product.updated';
  191.     const PROMOTION_CODE_CREATED 'promotion_code.created';
  192.     const PROMOTION_CODE_DELETED 'promotion_code.deleted';
  193.     const PROMOTION_CODE_UPDATED 'promotion_code.updated';
  194.     const QUOTE_ACCEPTED 'quote.accepted';
  195.     const QUOTE_CANCELED 'quote.canceled';
  196.     const QUOTE_CREATED 'quote.created';
  197.     const QUOTE_FINALIZED 'quote.finalized';
  198.     const RADAR_EARLY_FRAUD_WARNING_CREATED 'radar.early_fraud_warning.created';
  199.     const RADAR_EARLY_FRAUD_WARNING_UPDATED 'radar.early_fraud_warning.updated';
  200.     const RECIPIENT_CREATED 'recipient.created';
  201.     const RECIPIENT_DELETED 'recipient.deleted';
  202.     const RECIPIENT_UPDATED 'recipient.updated';
  203.     const REPORTING_REPORT_RUN_FAILED 'reporting.report_run.failed';
  204.     const REPORTING_REPORT_RUN_SUCCEEDED 'reporting.report_run.succeeded';
  205.     const REPORTING_REPORT_TYPE_UPDATED 'reporting.report_type.updated';
  206.     const REVIEW_CLOSED 'review.closed';
  207.     const REVIEW_OPENED 'review.opened';
  208.     const SETUP_INTENT_CANCELED 'setup_intent.canceled';
  209.     const SETUP_INTENT_CREATED 'setup_intent.created';
  210.     const SETUP_INTENT_REQUIRES_ACTION 'setup_intent.requires_action';
  211.     const SETUP_INTENT_SETUP_FAILED 'setup_intent.setup_failed';
  212.     const SETUP_INTENT_SUCCEEDED 'setup_intent.succeeded';
  213.     const SIGMA_SCHEDULED_QUERY_RUN_CREATED 'sigma.scheduled_query_run.created';
  214.     const SKU_CREATED 'sku.created';
  215.     const SKU_DELETED 'sku.deleted';
  216.     const SKU_UPDATED 'sku.updated';
  217.     const SOURCE_CANCELED 'source.canceled';
  218.     const SOURCE_CHARGEABLE 'source.chargeable';
  219.     const SOURCE_FAILED 'source.failed';
  220.     const SOURCE_MANDATE_NOTIFICATION 'source.mandate_notification';
  221.     const SOURCE_REFUND_ATTRIBUTES_REQUIRED 'source.refund_attributes_required';
  222.     const SOURCE_TRANSACTION_CREATED 'source.transaction.created';
  223.     const SOURCE_TRANSACTION_UPDATED 'source.transaction.updated';
  224.     const SUBSCRIPTION_SCHEDULE_ABORTED 'subscription_schedule.aborted';
  225.     const SUBSCRIPTION_SCHEDULE_CANCELED 'subscription_schedule.canceled';
  226.     const SUBSCRIPTION_SCHEDULE_COMPLETED 'subscription_schedule.completed';
  227.     const SUBSCRIPTION_SCHEDULE_CREATED 'subscription_schedule.created';
  228.     const SUBSCRIPTION_SCHEDULE_EXPIRING 'subscription_schedule.expiring';
  229.     const SUBSCRIPTION_SCHEDULE_RELEASED 'subscription_schedule.released';
  230.     const SUBSCRIPTION_SCHEDULE_UPDATED 'subscription_schedule.updated';
  231.     const TAX_RATE_CREATED 'tax_rate.created';
  232.     const TAX_RATE_UPDATED 'tax_rate.updated';
  233.     const TERMINAL_READER_ACTION_FAILED 'terminal.reader.action_failed';
  234.     const TERMINAL_READER_ACTION_SUCCEEDED 'terminal.reader.action_succeeded';
  235.     const TEST_HELPERS_TEST_CLOCK_ADVANCING 'test_helpers.test_clock.advancing';
  236.     const TEST_HELPERS_TEST_CLOCK_CREATED 'test_helpers.test_clock.created';
  237.     const TEST_HELPERS_TEST_CLOCK_DELETED 'test_helpers.test_clock.deleted';
  238.     const TEST_HELPERS_TEST_CLOCK_INTERNAL_FAILURE 'test_helpers.test_clock.internal_failure';
  239.     const TEST_HELPERS_TEST_CLOCK_READY 'test_helpers.test_clock.ready';
  240.     const TOPUP_CANCELED 'topup.canceled';
  241.     const TOPUP_CREATED 'topup.created';
  242.     const TOPUP_FAILED 'topup.failed';
  243.     const TOPUP_REVERSED 'topup.reversed';
  244.     const TOPUP_SUCCEEDED 'topup.succeeded';
  245.     const TRANSFER_CREATED 'transfer.created';
  246.     const TRANSFER_FAILED 'transfer.failed';
  247.     const TRANSFER_PAID 'transfer.paid';
  248.     const TRANSFER_REVERSED 'transfer.reversed';
  249.     const TRANSFER_UPDATED 'transfer.updated';
  250. }