Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1307ab81356642fb1bf890524815d5cb6997a34d
ffe4efab9b5dec59fea6b69a94f4b024fa7cf992
72 changes: 72 additions & 0 deletions stripe/events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,30 @@
V2CoreHealthWebhookLatencyResolvedEvent as V2CoreHealthWebhookLatencyResolvedEvent,
V2CoreHealthWebhookLatencyResolvedEventNotification as V2CoreHealthWebhookLatencyResolvedEventNotification,
)
from stripe.events._v2_iam_api_key_created_event import (
V2IamApiKeyCreatedEvent as V2IamApiKeyCreatedEvent,
V2IamApiKeyCreatedEventNotification as V2IamApiKeyCreatedEventNotification,
)
from stripe.events._v2_iam_api_key_default_secret_revealed_event import (
V2IamApiKeyDefaultSecretRevealedEvent as V2IamApiKeyDefaultSecretRevealedEvent,
V2IamApiKeyDefaultSecretRevealedEventNotification as V2IamApiKeyDefaultSecretRevealedEventNotification,
)
from stripe.events._v2_iam_api_key_expired_event import (
V2IamApiKeyExpiredEvent as V2IamApiKeyExpiredEvent,
V2IamApiKeyExpiredEventNotification as V2IamApiKeyExpiredEventNotification,
)
from stripe.events._v2_iam_api_key_permissions_updated_event import (
V2IamApiKeyPermissionsUpdatedEvent as V2IamApiKeyPermissionsUpdatedEvent,
V2IamApiKeyPermissionsUpdatedEventNotification as V2IamApiKeyPermissionsUpdatedEventNotification,
)
from stripe.events._v2_iam_api_key_rotated_event import (
V2IamApiKeyRotatedEvent as V2IamApiKeyRotatedEvent,
V2IamApiKeyRotatedEventNotification as V2IamApiKeyRotatedEventNotification,
)
from stripe.events._v2_iam_api_key_updated_event import (
V2IamApiKeyUpdatedEvent as V2IamApiKeyUpdatedEvent,
V2IamApiKeyUpdatedEventNotification as V2IamApiKeyUpdatedEventNotification,
)
from stripe.events._v2_money_management_adjustment_created_event import (
V2MoneyManagementAdjustmentCreatedEvent as V2MoneyManagementAdjustmentCreatedEvent,
V2MoneyManagementAdjustmentCreatedEventNotification as V2MoneyManagementAdjustmentCreatedEventNotification,
Expand Down Expand Up @@ -1213,6 +1237,54 @@
"stripe.events._v2_core_health_webhook_latency_resolved_event",
False,
),
"V2IamApiKeyCreatedEvent": (
"stripe.events._v2_iam_api_key_created_event",
False,
),
"V2IamApiKeyCreatedEventNotification": (
"stripe.events._v2_iam_api_key_created_event",
False,
),
"V2IamApiKeyDefaultSecretRevealedEvent": (
"stripe.events._v2_iam_api_key_default_secret_revealed_event",
False,
),
"V2IamApiKeyDefaultSecretRevealedEventNotification": (
"stripe.events._v2_iam_api_key_default_secret_revealed_event",
False,
),
"V2IamApiKeyExpiredEvent": (
"stripe.events._v2_iam_api_key_expired_event",
False,
),
"V2IamApiKeyExpiredEventNotification": (
"stripe.events._v2_iam_api_key_expired_event",
False,
),
"V2IamApiKeyPermissionsUpdatedEvent": (
"stripe.events._v2_iam_api_key_permissions_updated_event",
False,
),
"V2IamApiKeyPermissionsUpdatedEventNotification": (
"stripe.events._v2_iam_api_key_permissions_updated_event",
False,
),
"V2IamApiKeyRotatedEvent": (
"stripe.events._v2_iam_api_key_rotated_event",
False,
),
"V2IamApiKeyRotatedEventNotification": (
"stripe.events._v2_iam_api_key_rotated_event",
False,
),
"V2IamApiKeyUpdatedEvent": (
"stripe.events._v2_iam_api_key_updated_event",
False,
),
"V2IamApiKeyUpdatedEventNotification": (
"stripe.events._v2_iam_api_key_updated_event",
False,
),
"V2MoneyManagementAdjustmentCreatedEvent": (
"stripe.events._v2_money_management_adjustment_created_event",
False,
Expand Down
72 changes: 72 additions & 0 deletions stripe/events/_event_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,24 @@
from stripe.events._v2_core_health_webhook_latency_resolved_event import (
V2CoreHealthWebhookLatencyResolvedEventNotification,
)
from stripe.events._v2_iam_api_key_created_event import (
V2IamApiKeyCreatedEventNotification,
)
from stripe.events._v2_iam_api_key_default_secret_revealed_event import (
V2IamApiKeyDefaultSecretRevealedEventNotification,
)
from stripe.events._v2_iam_api_key_expired_event import (
V2IamApiKeyExpiredEventNotification,
)
from stripe.events._v2_iam_api_key_permissions_updated_event import (
V2IamApiKeyPermissionsUpdatedEventNotification,
)
from stripe.events._v2_iam_api_key_rotated_event import (
V2IamApiKeyRotatedEventNotification,
)
from stripe.events._v2_iam_api_key_updated_event import (
V2IamApiKeyUpdatedEventNotification,
)
from stripe.events._v2_money_management_adjustment_created_event import (
V2MoneyManagementAdjustmentCreatedEventNotification,
)
Expand Down Expand Up @@ -741,6 +759,30 @@
"stripe.events._v2_core_health_webhook_latency_resolved_event",
"V2CoreHealthWebhookLatencyResolvedEvent",
),
"v2.iam.api_key.created": (
"stripe.events._v2_iam_api_key_created_event",
"V2IamApiKeyCreatedEvent",
),
"v2.iam.api_key.default_secret_revealed": (
"stripe.events._v2_iam_api_key_default_secret_revealed_event",
"V2IamApiKeyDefaultSecretRevealedEvent",
),
"v2.iam.api_key.expired": (
"stripe.events._v2_iam_api_key_expired_event",
"V2IamApiKeyExpiredEvent",
),
"v2.iam.api_key.permissions_updated": (
"stripe.events._v2_iam_api_key_permissions_updated_event",
"V2IamApiKeyPermissionsUpdatedEvent",
),
"v2.iam.api_key.rotated": (
"stripe.events._v2_iam_api_key_rotated_event",
"V2IamApiKeyRotatedEvent",
),
"v2.iam.api_key.updated": (
"stripe.events._v2_iam_api_key_updated_event",
"V2IamApiKeyUpdatedEvent",
),
"v2.money_management.adjustment.created": (
"stripe.events._v2_money_management_adjustment_created_event",
"V2MoneyManagementAdjustmentCreatedEvent",
Expand Down Expand Up @@ -1288,6 +1330,30 @@ def get_v2_event_class(type_: str):
"stripe.events._v2_core_health_webhook_latency_resolved_event",
"V2CoreHealthWebhookLatencyResolvedEventNotification",
),
"v2.iam.api_key.created": (
"stripe.events._v2_iam_api_key_created_event",
"V2IamApiKeyCreatedEventNotification",
),
"v2.iam.api_key.default_secret_revealed": (
"stripe.events._v2_iam_api_key_default_secret_revealed_event",
"V2IamApiKeyDefaultSecretRevealedEventNotification",
),
"v2.iam.api_key.expired": (
"stripe.events._v2_iam_api_key_expired_event",
"V2IamApiKeyExpiredEventNotification",
),
"v2.iam.api_key.permissions_updated": (
"stripe.events._v2_iam_api_key_permissions_updated_event",
"V2IamApiKeyPermissionsUpdatedEventNotification",
),
"v2.iam.api_key.rotated": (
"stripe.events._v2_iam_api_key_rotated_event",
"V2IamApiKeyRotatedEventNotification",
),
"v2.iam.api_key.updated": (
"stripe.events._v2_iam_api_key_updated_event",
"V2IamApiKeyUpdatedEventNotification",
),
"v2.money_management.adjustment.created": (
"stripe.events._v2_money_management_adjustment_created_event",
"V2MoneyManagementAdjustmentCreatedEventNotification",
Expand Down Expand Up @@ -1586,6 +1652,12 @@ def get_v2_event_notification_class(type_: str):
"V2CoreHealthTrafficVolumeDropResolvedEventNotification",
"V2CoreHealthWebhookLatencyFiringEventNotification",
"V2CoreHealthWebhookLatencyResolvedEventNotification",
"V2IamApiKeyCreatedEventNotification",
"V2IamApiKeyDefaultSecretRevealedEventNotification",
"V2IamApiKeyExpiredEventNotification",
"V2IamApiKeyPermissionsUpdatedEventNotification",
"V2IamApiKeyRotatedEventNotification",
"V2IamApiKeyUpdatedEventNotification",
"V2MoneyManagementAdjustmentCreatedEventNotification",
"V2MoneyManagementFinancialAccountCreatedEventNotification",
"V2MoneyManagementFinancialAccountUpdatedEventNotification",
Expand Down
29 changes: 29 additions & 0 deletions stripe/events/_v2_iam_api_key_created_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
from stripe.v2.core._event import Event, EventNotification
from typing import cast
from typing_extensions import Literal, override


class V2IamApiKeyCreatedEventNotification(EventNotification):
LOOKUP_TYPE = "v2.iam.api_key.created"
type: Literal["v2.iam.api_key.created"]

@override
def fetch_event(self) -> "V2IamApiKeyCreatedEvent":
return cast(
"V2IamApiKeyCreatedEvent",
super().fetch_event(),
)

@override
async def fetch_event_async(self) -> "V2IamApiKeyCreatedEvent":
return cast(
"V2IamApiKeyCreatedEvent",
await super().fetch_event_async(),
)


class V2IamApiKeyCreatedEvent(Event):
LOOKUP_TYPE = "v2.iam.api_key.created"
type: Literal["v2.iam.api_key.created"]
31 changes: 31 additions & 0 deletions stripe/events/_v2_iam_api_key_default_secret_revealed_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
from stripe.v2.core._event import Event, EventNotification
from typing import cast
from typing_extensions import Literal, override


class V2IamApiKeyDefaultSecretRevealedEventNotification(EventNotification):
LOOKUP_TYPE = "v2.iam.api_key.default_secret_revealed"
type: Literal["v2.iam.api_key.default_secret_revealed"]

@override
def fetch_event(self) -> "V2IamApiKeyDefaultSecretRevealedEvent":
return cast(
"V2IamApiKeyDefaultSecretRevealedEvent",
super().fetch_event(),
)

@override
async def fetch_event_async(
self,
) -> "V2IamApiKeyDefaultSecretRevealedEvent":
return cast(
"V2IamApiKeyDefaultSecretRevealedEvent",
await super().fetch_event_async(),
)


class V2IamApiKeyDefaultSecretRevealedEvent(Event):
LOOKUP_TYPE = "v2.iam.api_key.default_secret_revealed"
type: Literal["v2.iam.api_key.default_secret_revealed"]
29 changes: 29 additions & 0 deletions stripe/events/_v2_iam_api_key_expired_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
from stripe.v2.core._event import Event, EventNotification
from typing import cast
from typing_extensions import Literal, override


class V2IamApiKeyExpiredEventNotification(EventNotification):
LOOKUP_TYPE = "v2.iam.api_key.expired"
type: Literal["v2.iam.api_key.expired"]

@override
def fetch_event(self) -> "V2IamApiKeyExpiredEvent":
return cast(
"V2IamApiKeyExpiredEvent",
super().fetch_event(),
)

@override
async def fetch_event_async(self) -> "V2IamApiKeyExpiredEvent":
return cast(
"V2IamApiKeyExpiredEvent",
await super().fetch_event_async(),
)


class V2IamApiKeyExpiredEvent(Event):
LOOKUP_TYPE = "v2.iam.api_key.expired"
type: Literal["v2.iam.api_key.expired"]
29 changes: 29 additions & 0 deletions stripe/events/_v2_iam_api_key_permissions_updated_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
from stripe.v2.core._event import Event, EventNotification
from typing import cast
from typing_extensions import Literal, override


class V2IamApiKeyPermissionsUpdatedEventNotification(EventNotification):
LOOKUP_TYPE = "v2.iam.api_key.permissions_updated"
type: Literal["v2.iam.api_key.permissions_updated"]

@override
def fetch_event(self) -> "V2IamApiKeyPermissionsUpdatedEvent":
return cast(
"V2IamApiKeyPermissionsUpdatedEvent",
super().fetch_event(),
)

@override
async def fetch_event_async(self) -> "V2IamApiKeyPermissionsUpdatedEvent":
return cast(
"V2IamApiKeyPermissionsUpdatedEvent",
await super().fetch_event_async(),
)


class V2IamApiKeyPermissionsUpdatedEvent(Event):
LOOKUP_TYPE = "v2.iam.api_key.permissions_updated"
type: Literal["v2.iam.api_key.permissions_updated"]
70 changes: 70 additions & 0 deletions stripe/events/_v2_iam_api_key_rotated_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
from stripe._api_mode import ApiMode
from stripe._stripe_object import StripeObject
from stripe._stripe_response import StripeResponse
from stripe.v2.core._event import Event, EventNotification
from typing import Any, Dict, Optional, cast
from typing_extensions import Literal, TYPE_CHECKING, override

if TYPE_CHECKING:
from stripe._api_requestor import _APIRequestor


class V2IamApiKeyRotatedEventNotification(EventNotification):
LOOKUP_TYPE = "v2.iam.api_key.rotated"
type: Literal["v2.iam.api_key.rotated"]

@override
def fetch_event(self) -> "V2IamApiKeyRotatedEvent":
return cast(
"V2IamApiKeyRotatedEvent",
super().fetch_event(),
)

@override
async def fetch_event_async(self) -> "V2IamApiKeyRotatedEvent":
return cast(
"V2IamApiKeyRotatedEvent",
await super().fetch_event_async(),
)


class V2IamApiKeyRotatedEvent(Event):
LOOKUP_TYPE = "v2.iam.api_key.rotated"
type: Literal["v2.iam.api_key.rotated"]

class V2IamApiKeyRotatedEventData(StripeObject):
new_api_key: str
"""
ID of the new key that was created due to rotation.
"""

data: V2IamApiKeyRotatedEventData
"""
Data for the v2.iam.api_key.rotated event
"""

@classmethod
def _construct_from(
cls,
*,
values: Dict[str, Any],
last_response: Optional[StripeResponse] = None,
requestor: "_APIRequestor",
api_mode: ApiMode,
) -> "V2IamApiKeyRotatedEvent":
evt = super()._construct_from(
values=values,
last_response=last_response,
requestor=requestor,
api_mode=api_mode,
)
if hasattr(evt, "data"):
evt.data = V2IamApiKeyRotatedEvent.V2IamApiKeyRotatedEventData._construct_from(
values=evt.data,
last_response=last_response,
requestor=requestor,
api_mode=api_mode,
)
return evt
Loading