@classmethod
def get_counterparty_by_name(cls, name, cp_type='Sender'):
    """
        Method for fetching info about counterparty by name.

        :example:
            ``Counterparty.get_counterparties(name='Талісман', cp_type='Recipient')``
        :param name:
            name of the desired counterparty
        :type name:
            str or unicode
        :param cp_type:
            type of the counterparty: can be either `Sender` or `Recipient` (`Sender` used as default)
        :type cp_type:
            str or unicode
        :return:
            dictionary with info about counterparty
        :rtype:
            dict
        """
    return cls.send(method='getCounterparties', method_props={
        'CounterpartyProperty': cp_type, 'FindByString': name})
