Coverage for functions \ flipdare \ generated \ shared \ stripe \ stripe_onboard_code.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
23from enum import StrEnum
26class StripeOnboardCode(StrEnum):
27 """Onboard webhook return code."""
29 # Declared here so type-checkers know these attributes exist.
30 # They are populated per-member inside __new__.
31 _display_title: str
32 _message: str
33 _show_support_msg: bool
35 def __new__(
36 cls,
37 code: str,
38 display_title: str | None = None,
39 message: str | None = None,
40 show_support_msg: bool | None = None,
41 ) -> "StripeOnboardCode":
42 obj = str.__new__(cls, code)
43 obj._value_ = code
44 # Only set attributes if they are provided (during member definition)
45 if display_title is not None:
46 obj._display_title = display_title
47 if message is not None:
48 obj._message = message
49 if show_support_msg is not None:
50 obj._show_support_msg = show_support_msg
51 return obj
53 # ---- Members --------------------------------------------------------
54 # fmt: off
55 REFRESH_ERROR = ("REFRESH_ERROR", "Refresh Error", "Try going home and re-opening the Payments page to start the onboarding process again.", False)
56 RETURN_ERROR = ("RETURN_ERROR", "Unknown Stripe Error", "Try going home and re-opening the Payments page to start the onboarding process again.", True)
57 USER_MISSING = ("USER_MISSING", "User Not Found", "We could not find your user account.\nTry going home and re-opening the Payments page to check if your onboarding was successful.", True)
58 INVALID_SETTINGS = ("INVALID_SETTINGS", "Invalid Settings", "We could not verify your Stripe settings.\nTry going home and re-opening the Payments page to reload.", True)
59 STRIPE_CLOSED = ("STRIPE_CLOSED", "Stripe Closed Account", "Stripe has disabled/closed your account.\nTry contacting Stripe support for more information.", True)
60 STRIPE_ERROR = ("STRIPE_ERROR", "Stripe Error", "We encountered an error while processing your onboarding.\nTry going home and re-opening the Payments page to reload.", True)
61 INCOMPLETE = ("INCOMPLETE", "Onboarding Not Complete", "We could not verify that you completed the onboarding process.\nTry going home and re-opening the Payments page to reload.", True)
62 STRIPE_MORE_INFO = ("STRIPE_MORE_INFO", "More Info Required", "Your account has been setup.\nTo start accepting payments, you need to provide Stripe some additional information.\nIf you dont need to provide additional information, try Signing Out/In to the app.\nThere is a \'dashboard\' button below for quick access to the Stripe Dashboard.", True)
63 OK = ("OK", "Onboarding Complete", "Cha Ching! Onboarding complete.", False)
64 # fmt: on
65 # ---- Properties -----------------------------------------------------
66 @property
67 def display_title(self) -> str:
68 return self._display_title
70 @property
71 def message(self) -> str:
72 return self._message
74 @property
75 def show_support_msg(self) -> bool:
76 return self._show_support_msg