# 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

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

    RESOURCE_CLASS = resources.MandatePdf
    RESOURCE_NAME = 'mandate_pdfs'

    def create(self, params=None):
        """Create a mandate PDF.

        Generates a PDF mandate and returns its temporary URL.
        
       
        Customer and bank account details can be left blank (for a blank
        mandate), provided manually, or inferred from the ID of an existing
        [mandate](#core-endpoints-mandates).
        
        To generate a PDF
        mandate in a foreign language, set your `Accept-Language` header to the
        relevant [ISO
        639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes#Partial_ISO_639_table)
        language code. Supported languages are Dutch, English, French, German,
        Italian, Portuguese and Spanish.

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

        Returns:
          MandatePdf
        """
        path = '/mandate_pdfs'
        response = self._perform_request('POST', path, params)
        return self._resource_for(response)

