# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

from . import base_service
from .. import resources
from ..paginator import Paginator
from .. import errors

class VerificationDetailsService(base_service.BaseService):
    """Service class that provides access to the verification_details
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.VerificationDetail
    RESOURCE_NAME = 'verification_details'


    def create(self,params=None, headers=None):
        """Create a verification detail.

        Verification details represent any information needed by GoCardless to
        verify a creditor.
        Currently, only UK-based companies are supported.
        In other words, to submit verification details for a creditor, their
        creditor_type must be company and their country_code must be GB.

        Args:
              params (dict, optional): Request body.

        Returns:
              VerificationDetail
        """
        path = '/verification_details'
        
        if params is not None:
            params = {self._envelope_key(): params}

        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=True)
        return self._resource_for(response)
  
