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