~sircmpwn/names.sr.ht

4befa4e5942b52045dc9ef9bcd3473389db71d61 — Drew DeVault 1 year, 9 months ago f718603
Add tables for remaining TLDs with special reqs
1 files changed, 147 insertions(+), 0 deletions(-)

M names/types/gtld_specific.py
M names/types/gtld_specific.py => names/types/gtld_specific.py +147 -0
@@ 861,3 861,150 @@ class TravelExtraData(Base, ExtraDataMixin):
    The Unique Identifying Number that proves the registrant is a participant
    in the travel and tourism industry
    """

### .uk
class UkRegistrantType(enum.Enum):
    CRC = "CRC"
    """UK Corporation by Royal Charter"""
    FCORP = "FCORP"
    """Non-UK Corporation"""
    FIND = "FIND"
    """Foreign Individual"""
    FOTHER = "FOTHER"
    """Non-UK Entity that does not fit another category"""
    GOV = "GOV"
    """UK Government Body"""
    IND = "IND"
    """Individual"""
    IP = "IP"
    """UK Industrial/Provident Registered Company"""
    LLP = "LLP"
    """UK Limited Liability Partnership"""
    LTD = "LTD"
    """UK Limited Company"""
    OTHER = "OTHER"
    """UK Entity that does not fit another category"""
    PLC = "PLC"
    """UK Public Limited Company"""
    PTNR = "PTNR"
    """UK Partnership"""
    RCHAR = "RCHAR"
    """UK Registered Charity"""
    SCH = "SCH"
    """UK School"""
    STAT = "STAT"
    """UK Statutory Body"""
    STRA = "STRA"
    """UK Sole Trader"""

    def requires_registration_number():
        return [
            UkRegistrantType.LTD,
            UkRegistrantType.PLC,
            UkRegistrantType.LLP,
            UkRegistrantType.IP,
            UkRegistrantType.SCH,
            UkRegistrantType.RCHAR,
        ]

    def requires_trading_name():
        return [
            UkRegistrantType.LTD,
            UkRegistrantType.PLC,
            UkRegistrantType.LLP,
            UkRegistrantType.IP,
            UkRegistrantType.RCHAR,
            UkRegistrantType.FCORP,
            UkRegistrantType.OTHER,
            UkRegistrantType.FOTHER,
            UkRegistrantType.STRA,
        ]

class UkExtraData(Base,
        ExtraDataMixin,
        RegistrationNumberMixin):
    __tablename__ = "extra_data_uk"

    registrant_type = sa.Column(sau.ChoiceType(
        UkRegistrantType, impl=sa.Unicode), nullable=False)
    """Registrant type"""

    trading_name = sa.Column(sa.Unicode)
    """The trading name of the organization."""

### .us
class UsAppPurpose(enum.Enum):
    """A description of the domain's application purpose"""
    for_profit_business = "P1"
    """Business use for profit"""
    non_profit_organization = "P2"
    """
    Non-profit business, club, association, religious organization, and so on
    """
    personal_use = "P3"
    """Personal use"""
    education = "P4"
    """Education purposes"""
    government = "P5"
    """Government purposes"""

class UsNexusCategory(enum.Enum):
    """A description of the domain's nexus category"""
    us_citizen = "C11"
    """A citizen of the U.S. or any of its territories."""
    permanent_resident = "C12"
    """A permanent resident of the U.S. or any of its territories."""
    incorporated_organization = "C21"
    """An organization incorporated within the U.S."""
    regularly_active_entity = "C31"
    """An entity that regularly engages in lawful activities in the U.S."""
    domestic_office_entity = "C32"
    """An entity that has an office or other facility in the U.S."""

class UsExtraData(Base, ExtraDataMixin):
    __tablename__ = "extra_data_us"

    app_purpose = sa.Column(sau.ChoiceType(
        UsAppPurpose, impl=sa.Unicode), nullable=False)
    """A description of the domain's application purpose"""

    category = sa.Column(sau.ChoiceType(
        UsNexusCategory, impl=sa.Unicode), nullable=False)
    """A description of the domain's nexus category"""

    validator = sa.Column(sau.CountryType) # required for C31 or C32
    """The domain owner's country of citizenship."""

### .xxx
class XxxExtraData(Base, ExtraDataMixin):
    """
    .XXX domains are available to those within the adult entertainment industry
    who are members of the Sponsored Community (SC).
    """
    __tablename__ = "extra_data_xxx"

    icm_membership_id = sa.Column(sa.Unicode)
    """
    The ID number that was provided when the registrant successfully completed
    the XXX Sponsored Community validation process. If this value is not
    submitted with the domain registration, the registry will contact the
    registrant with instructions on how to become a member of the Sponsored
    Community.

    If you submit this value, you do not need to fill in the remaining fields.
    """

    ipr_email = sa.Column(sa.Unicode)
    """
    The email address to which all communications from the registry will be
    addressed.
    """

    ipr_name = sa.Column(sa.Unicode)
    """
    The name (in the format "firstname lastname") to which all communications
    from the registry will be addressed.
    """

    ipr_non_resolver = sa.Column(sa.Boolean)
    """If selected, this domain will not resolve. You probably don't want this."""