update spec

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2022-06-14 09:19:43 -07:00
parent e97a042552
commit 82f3361603
8 changed files with 6401 additions and 5792 deletions

View File

@ -47,6 +47,7 @@ from .payment_intent import PaymentIntent
from .payment_method import PaymentMethod
from .payment_method_card_checks import PaymentMethodCardChecks
from .payment_method_type import PaymentMethodType
from .phone_number import PhoneNumber
from .pong import Pong
from .session import Session
from .status_code import StatusCode

View File

@ -3,6 +3,7 @@ from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..models.address import Address
from ..models.phone_number import PhoneNumber
from ..types import UNSET, Unset
T = TypeVar("T", bound="BillingInfo")
@ -13,7 +14,7 @@ class BillingInfo:
""" """
address: Union[Unset, Address] = UNSET
name: Union[Unset, str] = UNSET
phone: Union[Unset, str] = UNSET
phone: Union[Unset, PhoneNumber] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -22,7 +23,9 @@ class BillingInfo:
if not isinstance(self.address, Unset):
address = self.address.value
name = self.name
phone = self.phone
phone: Union[Unset, str] = UNSET
if not isinstance(self.phone, Unset):
phone = self.phone.value
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
@ -48,7 +51,12 @@ class BillingInfo:
name = d.pop("name", UNSET)
phone = d.pop("phone", UNSET)
_phone = d.pop("phone", UNSET)
phone: Union[Unset, PhoneNumber]
if isinstance(_phone, Unset):
phone = UNSET
else:
phone = PhoneNumber(_phone)
billing_info = cls(
address=address,

View File

@ -6,6 +6,7 @@ from dateutil.parser import isoparse
from ..models.address import Address
from ..models.currency import Currency
from ..models.phone_number import PhoneNumber
from ..types import UNSET, Unset
T = TypeVar("T", bound="Customer")

View File

@ -4,6 +4,7 @@ from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from dateutil.parser import isoparse
from ..models.phone_number import PhoneNumber
from ..types import UNSET, Unset
T = TypeVar("T", bound="ExtendedUser")
@ -24,7 +25,7 @@ class ExtendedUser:
last_name: Union[Unset, str] = UNSET
mailchimp_id: Union[Unset, str] = UNSET
name: Union[Unset, str] = UNSET
phone: Union[Unset, str] = UNSET
phone: Union[Unset, PhoneNumber] = UNSET
stripe_id: Union[Unset, str] = UNSET
updated_at: Union[Unset, datetime.datetime] = UNSET
zendesk_id: Union[Unset, str] = UNSET
@ -48,7 +49,9 @@ class ExtendedUser:
last_name = self.last_name
mailchimp_id = self.mailchimp_id
name = self.name
phone = self.phone
phone: Union[Unset, str] = UNSET
if not isinstance(self.phone, Unset):
phone = self.phone.value
stripe_id = self.stripe_id
updated_at: Union[Unset, str] = UNSET
if not isinstance(self.updated_at, Unset):
@ -130,7 +133,12 @@ class ExtendedUser:
name = d.pop("name", UNSET)
phone = d.pop("phone", UNSET)
_phone = d.pop("phone", UNSET)
phone: Union[Unset, PhoneNumber]
if isinstance(_phone, Unset):
phone = UNSET
else:
phone = PhoneNumber(_phone)
stripe_id = d.pop("stripe_id", UNSET)

View File

@ -0,0 +1,4 @@
class PhoneNumber(str):
def __str__(self) -> str:
return self

View File

@ -2,6 +2,7 @@ from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..models.phone_number import PhoneNumber
from ..types import UNSET, Unset
T = TypeVar("T", bound="UpdateUser")
@ -15,7 +16,7 @@ class UpdateUser:
first_name: Union[Unset, str] = UNSET
github: Union[Unset, str] = UNSET
last_name: Union[Unset, str] = UNSET
phone: Union[Unset, str] = UNSET
phone: Union[Unset, PhoneNumber] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -25,7 +26,9 @@ class UpdateUser:
first_name = self.first_name
github = self.github
last_name = self.last_name
phone = self.phone
phone: Union[Unset, str] = UNSET
if not isinstance(self.phone, Unset):
phone = self.phone.value
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
@ -58,7 +61,12 @@ class UpdateUser:
last_name = d.pop("last_name", UNSET)
phone = d.pop("phone", UNSET)
_phone = d.pop("phone", UNSET)
phone: Union[Unset, PhoneNumber]
if isinstance(_phone, Unset):
phone = UNSET
else:
phone = PhoneNumber(_phone)
update_user = cls(
company=company,

View File

@ -4,6 +4,7 @@ from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from dateutil.parser import isoparse
from ..models.phone_number import PhoneNumber
from ..types import UNSET, Unset
T = TypeVar("T", bound="User")
@ -23,7 +24,7 @@ class User:
image: Union[Unset, str] = UNSET
last_name: Union[Unset, str] = UNSET
name: Union[Unset, str] = UNSET
phone: Union[Unset, str] = UNSET
phone: Union[Unset, PhoneNumber] = UNSET
updated_at: Union[Unset, datetime.datetime] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -44,7 +45,9 @@ class User:
image = self.image
last_name = self.last_name
name = self.name
phone = self.phone
phone: Union[Unset, str] = UNSET
if not isinstance(self.phone, Unset):
phone = self.phone.value
updated_at: Union[Unset, str] = UNSET
if not isinstance(self.updated_at, Unset):
updated_at = self.updated_at.isoformat()
@ -116,7 +119,12 @@ class User:
name = d.pop("name", UNSET)
phone = d.pop("phone", UNSET)
_phone = d.pop("phone", UNSET)
phone: Union[Unset, PhoneNumber]
if isinstance(_phone, Unset):
phone = UNSET
else:
phone = PhoneNumber(_phone)
_updated_at = d.pop("updated_at", UNSET)
updated_at: Union[Unset, datetime.datetime]

1431
spec.json

File diff suppressed because it is too large Load Diff