Skip to content

Better interface for Event class. #2433

Open
@taylorchasewhite

Description

My team and I are getting started with the stripe documentation/API in the .NET environment, and really would like to see a better way to interact with various event types.

For instance, it would be great to have an interface that allows you to access CustomerId without casting for/checking against the different types of events. You could add other properties that are commonly on events to an IStripeEvent interface as well.

For reference, the use case I am attempting to accomplish here is to track "important" events like a payment method being deleted, and taking some automatic application action like emailing our client's customer rep, or flagging the customer in the database, etc.

There are a variety of events that we might want to do this with, and it would be nice to access common properties like "CustomerId" without needing to explicitly cast to and access the customer in each type.


Secondly, it would be nice to be able to have an enum indicating the different event types, rather than (or in addition to) string constants provided from the Events class (though this is probably better split off as a separate issue).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions