Skip to content

Commit

Permalink
Fix typing of Stripe.V2.Event (#2193)
Browse files Browse the repository at this point in the history
  • Loading branch information
xavdid-stripe authored Sep 29, 2024
1 parent cb0551d commit cdcd0f6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
30 changes: 14 additions & 16 deletions types/ThinEvent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@
declare module 'stripe' {
namespace Stripe {
namespace Event {
/**
* Object containing the reference to API resource relevant to the event.
*/
interface RelatedObject {
/**
* Object containing the reference to API resource relevant to the event.
* Unique identifier for the object relevant to the event.
*/
related_object: {
/**
* Unique identifier for the object relevant to the event.
*/
id: string;
id: string;

/**
* Type of the object relevant to the event.
*/
type: string;
/**
* Type of the object relevant to the event.
*/
type: string;

/**
* URL to retrieve the resource.
*/
url: string;
};
/**
* URL to retrieve the resource.
*/
url: string;
}
}
/**
Expand All @@ -32,7 +30,7 @@ declare module 'stripe' {
/**
* Object containing the reference to API resource relevant to the event.
*/
related_object: Event.RelatedObject;
related_object: Event.RelatedObject | null;
}
}
}
8 changes: 5 additions & 3 deletions types/V2/Core/EventsResource.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// File generated from our OpenAPI spec

/// <reference path='../EventTypes.d.ts' />

declare module 'stripe' {
namespace Stripe {
namespace V2 {
Expand Down Expand Up @@ -29,19 +31,19 @@ declare module 'stripe' {
id: string,
params?: EventRetrieveParams,
options?: RequestOptions
): Promise<Stripe.Response<Event>>;
): Promise<Stripe.Response<Stripe.V2.Event>>;
retrieve(
id: string,
options?: RequestOptions
): Promise<Stripe.Response<Event>>;
): Promise<Stripe.Response<Stripe.V2.Event>>;

/**
* List events, going back up to 30 days.
*/
list(
params: EventListParams,
options?: RequestOptions
): ApiListPromise<Event>;
): ApiListPromise<Stripe.V2.Event>;
}
}
}
Expand Down

0 comments on commit cdcd0f6

Please sign in to comment.