-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathsubscriptionlocked.py
More file actions
39 lines (32 loc) · 1.12 KB
/
subscriptionlocked.py
File metadata and controls
39 lines (32 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from dataclasses import dataclass, field
import httpx
from polar_sdk.models import PolarError
from polar_sdk.types import BaseModel
from polar_sdk.utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import Literal, Optional
from typing_extensions import Annotated
class SubscriptionLockedData(BaseModel):
detail: str
ERROR: Annotated[
Annotated[
Literal["SubscriptionLocked"],
AfterValidator(validate_const("SubscriptionLocked")),
],
pydantic.Field(alias="error"),
] = "SubscriptionLocked"
@dataclass(unsafe_hash=True)
class SubscriptionLocked(PolarError):
data: SubscriptionLockedData = field(hash=False)
def __init__(
self,
data: SubscriptionLockedData,
raw_response: httpx.Response,
body: Optional[str] = None,
):
message = body or raw_response.text
super().__init__(message, raw_response, body)
object.__setattr__(self, "data", data)