<commit_before>from .base import Resource
from ..constants.url import URL
import warnings


class VirtualAccount(Resource):
    def __init__(self, client=None):
        super(VirtualAccount, self).__init__(client)
        self.base_url = URL.VIRTUAL_ACCOUNT_URL

    def fetch_all(self, data={}, **kwargs):  # pragma: no cover
        warnings.warn("Will be Deprecated in next release, use all",
                      DeprecationWarning)
        return self.all(data, **kwargs)

    def all(self, data={}, **kwargs):
        """"
        Fetch all Virtual Account entities

        Returns:
            Dictionary of Virtual Account data
        """
        return super(VirtualAccount, self).all(data, **kwargs)

    def fetch(self, virtual_account_id, data={}, **kwargs):
        """"
        Fetch Virtual Account for given Id

        Args:
            virtual_account_id :
                Id for which Virtual Account object has to be retrieved

        Returns:
            Virtual Account dict for given Virtual Account Id
        """
        return super(VirtualAccount, self).fetch(
            virtual_account_id,
            data,
            **kwargs)

    def create(self, data={}, **kwargs):
        """"
        Create Virtual Account from given dict

        Args:
            TODO : FIX this

        Returns:
            TODO: FIX this
        """
        url = self.base_url
        return self.post_url(url, data, **kwargs)

    def close(self, virtual_account_id, data={}, **kwargs):
        """"
        Close Virtual Account from given Id

        Args:
            virtual_account_id :
                Id for which Virtual Account objects has to be Closed
        """
        url = "{}/{}".format(self.base_url, virtual_account_id)
        data['status'] = 'closed'
        return self.patch_url(url, data, **kwargs)

    def payments(self, virtual_account_id, data={}, **kwargs):
        """"
        Fetch Payment for Virtual Account Id

        Args:
            virtual_account_id :
                Id for which Virtual Account objects has to be retrieved

        Returns:
            Payment dict for given Virtual Account Id
        """
        url = "{}/{}/payments".format(self.base_url, virtual_account_id)<commit_msg>fixed doc<commit_after>from .base import Resource
from ..constants.url import URL
import warnings


class VirtualAccount(Resource):
    def __init__(self, client=None):
        super(VirtualAccount, self).__init__(client)
        self.base_url = URL.VIRTUAL_ACCOUNT_URL

    def fetch_all(self, data={}, **kwargs):  # pragma: no cover
        warnings.warn("Will be Deprecated in next release, use all",
                      DeprecationWarning)
        return self.all(data, **kwargs)

    def all(self, data={}, **kwargs):
        """"
        Fetch all Virtual Account entities

        Returns:
            Dictionary of Virtual Account data
        """
        return super(VirtualAccount, self).all(data, **kwargs)

    def fetch(self, virtual_account_id, data={}, **kwargs):
        """"
        Fetch Virtual Account for given Id

        Args:
            virtual_account_id :
                Id for which Virtual Account object has to be retrieved

        Returns:
            Virtual Account dict for given Virtual Account Id
        """
        return super(VirtualAccount, self).fetch(
            virtual_account_id,
            data,
            **kwargs)

    def create(self, data={}, **kwargs):
        """"
        Create Virtual Account from given dict

        Args:
            Param for Creating Virtual Account

        Returns:
            Virtual Account dict
        """
        url = self.base_url
        return self.post_url(url, data, **kwargs)

    def close(self, virtual_account_id, data={}, **kwargs):
        """"
        Close Virtual Account from given Id

        Args:
            virtual_account_id :
                Id for which Virtual Account objects has to be Closed
        """
        url = "{}/{}".format(self.base_url, virtual_account_id)
        data['status'] = 'closed'
        return self.patch_url(url, data, **kwargs)

    def payments(self, virtual_account_id, data={}, **kwargs):
        """"
        Fetch Payment for Virtual Account Id

        Args:
            virtual_account_id :
                Id for which Virtual Account objects has to be retrieved

        Returns:
            Payment dict for given Virtual Account Id
        """
        url = "{}/{}/payments".format(self.base_url, virtual_account_id)
{'fraction_non_alphanumeric': 0.09635359116022099, 'fraction_numerical': 0.0, 'mean_word_length': 2.0033178500331785, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4136494', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1138, 'n_words': 372}