Beispiel #1
0
            'passive'

        Returns:
            str: The BIC type.
        """
        if self.location_code[1] == '0':
            return 'testing'
        elif self.location_code[1] == '1':
            return 'passive'
        elif self.location_code[1] == '2':
            return 'reverse billing'
        else:
            return 'default'

    bank_code = property(partial(Base._get_component, start=0, end=4),
                         doc="str: The bank-code part of the BIC.")
    country_code = property(partial(Base._get_component, start=4, end=6),
                            doc="str: The ISO 3166 alpha2 country-code.")
    location_code = property(partial(Base._get_component, start=6, end=8),
                             doc="str: The location code of the BIC.")
    branch_code = property(
        partial(Base._get_component, start=8, end=11),
        doc="str or None: The branch-code part of the BIC (if available)")


registry.build_index('bank', 'bic', key='bic', accumulate=True)
registry.build_index('bank',
                     'bank_code',
                     key=('country_code', 'bank_code'),
                     primary=True)
Beispiel #2
0
        This can be one of 'testing', 'passive', 'reverse billing' or 'default'

        Returns:
            str: The BIC type.
        """
        if self.location_code[1] == '0':
            return 'testing'
        elif self.location_code[1] == '1':
            return 'passive'
        elif self.location_code[1] == '2':
            return 'reverse billing'
        else:
            return 'default'

    bank_code = property(partial(Base._get_component, start=0, end=4),
                         doc="str: The bank-code part of the BIC.")
    country_code = property(partial(Base._get_component, start=4, end=6),
                            doc="str: The ISO 3166 alpha2 country-code.")
    location_code = property(partial(Base._get_component, start=6, end=8),
                             doc="str: The location code of the BIC.")
    branch_code = property(
        partial(Base._get_component, start=8, end=11),
        doc="str or None: The branch-code part of the BIC (if available)")


registry.build_index('bank', 'bic', 'bic')
registry.build_index('bank',
                     'bank_code', ('country_code', 'bank_code'),
                     primary=True)
Beispiel #3
0
    @property
    def type(self):
        """Indicates the type of BIC.

        This can be one of 'testing', 'passive', 'reverse billing' or 'default'

        Returns:
            str: The BIC type.
        """
        if self.location_code[1] == '0':
            return 'testing'
        elif self.location_code[1] == '1':
            return 'passive'
        elif self.location_code[1] == '2':
            return 'reverse billing'
        else:
            return 'default'

    bank_code = property(partial(Base._get_component, start=0, end=4),
                         doc="str: The bank-code part of the BIC.")
    country_code = property(partial(Base._get_component, start=4, end=6),
                            doc="str: The ISO 3166 alpha2 country-code.")
    location_code = property(partial(Base._get_component, start=6, end=8),
                             doc="str: The location code of the BIC.")
    branch_code = property(partial(Base._get_component, start=8, end=11),
                           doc="str or None: The branch-code part of the BIC (if available)")


registry.build_index('bank', 'bic', 'bic')
registry.build_index('bank', 'bank_code', ('country_code', 'bank_code'), primary=True)
Beispiel #4
0
        Returns:
            str: The BIC type.
        """
        if self.location_code[1] == "0":
            return "testing"
        elif self.location_code[1] == "1":
            return "passive"
        elif self.location_code[1] == "2":
            return "reverse billing"
        else:
            return "default"

    bank_code = property(partial(Base._get_component, start=0, end=4),
                         doc="str: The bank-code part of the BIC.")
    country_code = property(partial(Base._get_component, start=4, end=6),
                            doc="str: The ISO 3166 alpha2 country-code.")
    location_code = property(partial(Base._get_component, start=6, end=8),
                             doc="str: The location code of the BIC.")
    branch_code = property(
        partial(Base._get_component, start=8, end=11),
        doc="str or None: The branch-code part of the BIC (if available)",
    )


registry.build_index("bank", "bic", key="bic", accumulate=True)
registry.build_index("bank",
                     "bank_code",
                     key=("country_code", "bank_code"),
                     primary=True)
Beispiel #5
0
        """str: The BIC separated in the blocks bank-, country- and location-code."""
        formatted = ' '.join([self.bank_code, self.country_code, self.location_code])
        if self.branch_code:
            formatted += ' ' + self.branch_code
        return formatted

    @property
    def country_bank_code(self):
        """str or None: The country specific bank-code associated to the BIC."""
        entry = registry.get('bic').get(self.compact)
        if entry:
            return entry.get('bank_code')

    @property
    def exists(self):
        """bool: Indicates if the BIC is available in Schwifty's registry."""
        return bool(registry.get('bic').get(self.compact))

    bank_code = property(partial(Base._get_component, start=0, end=4),
                         doc='str: The bank-code part of the BIC.')
    branch_code = property(partial(Base._get_component, start=8, end=11),
                           doc='str or None: The branch-code part of the BIC (if available)')
    country_code = property(partial(Base._get_component, start=4, end=6),
                            doc='str: The ISO 3166 alpha2 country-code.')
    location_code = property(partial(Base._get_component, start=6, end=8),
                             doc='str: The location code of the BIC.')


registry.build_index('bank', 'bic', 'bic')
registry.build_index('bank', 'bank_code', ('country_code', 'bank_code'))