Coverage for functions \ flipdare \ generated \ shared \ stripe \ stripe_account_type.py: 100%
0 statements
« prev ^ index » next coverage.py v7.13.0, created at 2026-05-08 12:22 +1000
« prev ^ index » next coverage.py v7.13.0, created at 2026-05-08 12:22 +1000
1#!/usr/bin/env python
2#
3# Copyright (c) 2026 Flipdare Pty Ltd. All rights reserved.
4#
5# This file is part of Flipdare's proprietary software and contains
6# confidential and copyrighted material. Unauthorised copying,
7# modification, distribution, or use of this file is strictly
8# prohibited without prior written permission from Flipdare Pty Ltd.
9#
10# This software includes third-party components licensed under MIT,
11# BSD, and Apache 2.0 licences. See THIRD_PARTY_NOTICES for details.
12#
13# NOTE: THIS FILE IS AUTO GENERATED. DO NOT EDIT.
14#
15# Generated by codegen_models.py
16#
17# Modify 'codegen_models.py'
18# and re-run the script above to update.
19#
21# pragma: no cover
22from enum import StrEnum
25class StripeAccountType(StrEnum):
26 """Type of Stripe connected account."""
28 EXPRESS = "express"
29 STANDARD = "standard"
31 # ---- Convenience predicates -----------------------------------------
33 @classmethod
34 def from_string(cls, value: str) -> "StripeAccountType":
35 """Converts a string to a StripeAccountType enum member."""
36 try:
37 if value.lower() == "full":
38 # for v2. dashboard = full equivalent to standard account type.
39 return cls.STANDARD
41 return cls(value)
42 except ValueError as err:
43 raise ValueError(f"Invalid StripeAccountType: {value}") from err
45 @property
46 def is_express(self) -> bool:
47 return self == StripeAccountType.EXPRESS
49 @property
50 def is_standard(self) -> bool:
51 return self == StripeAccountType.STANDARD