Skip to content

Commit

Permalink
Release 1.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Feb 26, 2024
1 parent 8dd6cc0 commit 21574de
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "flagright"
version = "1.4.4"
version = "1.4.5"
description = ""
readme = "README.md"
authors = []
Expand Down
2 changes: 2 additions & 0 deletions src/flagright/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
WalletDetails,
WalletPaymentMethod,
WebhookEvent,
WebhookEventBase,
WebhookEventBaseTriggeredBy,
WebhookEventData,
WebhookEventType,
Expand Down Expand Up @@ -322,6 +323,7 @@
"WalletDetails",
"WalletPaymentMethod",
"WebhookEvent",
"WebhookEventBase",
"WebhookEventBaseTriggeredBy",
"WebhookEventData",
"WebhookEventType",
Expand Down
2 changes: 1 addition & 1 deletion src/flagright/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
"X-Fern-SDK-Version": "1.4.4",
"X-Fern-SDK-Version": "1.4.5",
}
headers["x-api-key"] = self.api_key
return headers
Expand Down
2 changes: 2 additions & 0 deletions src/flagright/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
from .wallet_details import WalletDetails
from .wallet_payment_method import WalletPaymentMethod
from .webhook_event import WebhookEvent
from .webhook_event_base import WebhookEventBase
from .webhook_event_base_triggered_by import WebhookEventBaseTriggeredBy
from .webhook_event_data import WebhookEventData
from .webhook_event_type import WebhookEventType
Expand Down Expand Up @@ -305,6 +306,7 @@
"WalletDetails",
"WalletPaymentMethod",
"WebhookEvent",
"WebhookEventBase",
"WebhookEventBaseTriggeredBy",
"WebhookEventData",
"WebhookEventType",
Expand Down
5 changes: 2 additions & 3 deletions src/flagright/types/webhook_event.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import datetime as dt
import typing

from ..core.datetime_utils import serialize_datetime
from .webhook_event_base import WebhookEventBase
from .webhook_event_data import WebhookEventData
from .webhook_event_type import WebhookEventType


class WebhookEvent(WebhookEvent):
class WebhookEvent(WebhookEventBase):
type: WebhookEventType
data: WebhookEventData

Expand Down
37 changes: 37 additions & 0 deletions src/flagright/types/webhook_event_base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ..core.datetime_utils import serialize_datetime
from .webhook_event_base_triggered_by import WebhookEventBaseTriggeredBy

try:
import pydantic.v1 as pydantic # type: ignore
except ImportError:
import pydantic # type: ignore


class WebhookEventBase(pydantic.BaseModel):
id: str = pydantic.Field(description="Unique identifier for the event")
triggered_by: WebhookEventBaseTriggeredBy = pydantic.Field(
alias="triggeredBy", description="Event triggered by a user or system"
)
created_timestamp: float = pydantic.Field(
alias="createdTimestamp",
description="Time at which the event was created. Measured in ms since the Unix epoch.",
)

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().json(**kwargs_with_defaults)

def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().dict(**kwargs_with_defaults)

class Config:
frozen = True
smart_union = True
allow_population_by_field_name = True
json_encoders = {dt.datetime: serialize_datetime}

0 comments on commit 21574de

Please sign in to comment.