questi script python che fa:

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

import sys
import platform
try:
    import urllib.parse as urlparse
except ImportError:
    import urlparse
import json

import requests

from . import errors

class ApiClient(object):
    """Client for interacting with a JSON HTTP API, using OAuth2-style auth.

    Args:
      base_url (string): The prefix that's prepended to all request paths.
      access_token (string): Token used in the Authorization header.
    """

    def __init__(self, base_url, access_token):
        self.base_url = base_url
        self.access_token = access_token

    def get(self, path, params=None, headers=None):
        """Perform a GET request, optionally providing query-string params.

        Args:
          path (str): A path that gets appended to ``base_url``.
          params (dict, optional): Dictionary of param names to values.

        Example:
          api_client.get('/users', params={'active': True})

        Returns:
          A requests ``Response`` object.
        """
        response = requests.get(
            self._url_for(path),
            params=params,
            headers=self._headers(headers)
        )
        self._handle_errors(response)
        return response

    def post(self, path, body, headers=None):
        """Perform a POST request, providing a body, which will be JSON-encoded.

        Args:
          path (str): A path that gets appended to ``base_url``.
          body (dict): Dictionary that will be JSON-encoded and sent as the body.

        Example:
          api_client.post('/users', body={'name': 'Billy Jean'})

        Returns:
          A requests ``Response`` object.
        """

        response = requests.post(
            self._url_for(path),
            data=json.dumps(body),
            headers=self._headers(headers)
        )
        self._handle_errors(response)
        return response

    def put(self, path, body, headers=None):
        """Perform a PUT request, providing a body, which will be JSON-encoded.

        Args:
          path (str): A path that gets appended to ``base_url``.
          body (dict): Dictionary that will be JSON-encoded and sent as the body.

        Example:
          api_client.put('/users', body={'name': 'Billy Jean'})

        Returns:
          A requests ``Response`` object.
        """
        response = requests.put(
            self._url_for(path),
            data=json.dumps(body),
            headers=self._headers(headers)
        )
        self._handle_errors(response)
        return response

    def delete(self, path, body, headers=None):
        """Perform a DELETE request, providing a body, which will be JSON-encoded.

        Args:
          path (str): A path that gets appended to ``base_url``.
          body (dict): Dictionary that will be JSON-encoded and sent as the body.

        Example:
          api_client.delete('/users', body={'name': 'Billy Jean'})

        Returns:
          A requests ``Response`` object.
        """
        response = requests.delete(
            self._url_for(path),
            data=json.dumps(body),
            headers=self._headers(headers)
        )
        self._handle_errors(response)
        return response

    def _handle_errors(self, response):
        try:
            response_body = response.json()
        except ValueError:
            msg = 'Malformed response received from server'
            raise errors.MalformedResponseError(msg, response.text)

        if response.status_code < 400:
            return

        error = response.json()['error']
        exception_class = errors.ApiError.exception_for(response.status_code, error['type'], error.get('errors'))
        raise exception_class(error)

    def _url_for(self, path):
        return urlparse.urljoin(self.base_url, path)

    def _headers(self, custom_headers):
        headers = self._default_headers()
        if custom_headers:
          headers.update(custom_headers)
        return headers

    def _default_headers(self):
        return {
            'Accept': 'application/json',
            'Authorization': 'Bearer {0}'.format(self.access_token),
            'Content-Type': 'application/json',
            'GoCardless-Client-Library': 'gocardless-pro-python',
            'GoCardless-Client-Version': '1.32.0',
            'User-Agent': self._user_agent(),
            'GoCardless-Version': '2015-07-06',
        }

    def _user_agent(self):
        python_version = '.'.join(platform.python_version_tuple()[0:2])
        vm_version = '{}.{}.{}-{}{}'.format(*sys.version_info)
        return ' '.join([
            'gocardless-pro-python/1.32.0',
            'python/{0}'.format(python_version),
            '{0}/{1}'.format(platform.python_implementation(), vm_version),
            '{0}/{1}'.format(platform.system(), platform.release()),
            'requests/{0}'.format(requests.__version__),
        ])

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\api_response.py
Nome: api_response.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class ApiResponse(object):
    """Response from the {{ .Config.api_name }} API, providing access
    to the status code, headers, and body.
    """

    def __init__(self, response):
        self._response = response

    @property
    def status_code(self):
        return self._response.status_code

    @property
    def headers(self):
        return self._response.headers

    @property
    def body(self):
        return self._response.json()


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\client.py
Nome: client.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

from . import services
from .api_client import ApiClient

class Client(object):
    """Client for interacting with the GoCardless Pro API.

    Instantiate a client object with your access token and environment, then
    use the resource methods to access the API.

    Args:
      access_token (str): Find or generate this in your GoCardless Pro dashboard
        (https://manage.gocardless.com/organisation/access-tokens).
      environment (str): Either 'sandbox' or 'live'.
      base_url (str): Manually set a base URL. Most people should use
        `environment` instead.
      raise_on_idempotency_conflict (bool): Configure refetching of conflicting resource

    Example:
      client = Client(access_token=ACCESS_TOKEN, environment='sandbox')
      for customer in client.customers.list():
          print '{} {}'.format(customer.family_name, customer.given_name)
    """

    def __init__(self, access_token=None, environment=None, base_url=None, raise_on_idempotency_conflict=False):
        if access_token is None:
            raise ValueError('No access_token provided')

        if environment is None and base_url is None:
            raise ValueError('No environment or base_url specified')

        base_url = base_url or self._environment_url(environment)
        self._api_client = ApiClient(base_url, access_token)
        self._raise_on_idempotency_conflict = raise_on_idempotency_conflict

    @property
    def bank_authorisations(self):
        return services.BankAuthorisationsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def bank_details_lookups(self):
        return services.BankDetailsLookupsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def billing_requests(self):
        return services.BillingRequestsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def billing_request_flows(self):
        return services.BillingRequestFlowsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def billing_request_templates(self):
        return services.BillingRequestTemplatesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def blocks(self):
        return services.BlocksService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def creditors(self):
        return services.CreditorsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def creditor_bank_accounts(self):
        return services.CreditorBankAccountsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def currency_exchange_rates(self):
        return services.CurrencyExchangeRatesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def customers(self):
        return services.CustomersService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def customer_bank_accounts(self):
        return services.CustomerBankAccountsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def customer_notifications(self):
        return services.CustomerNotificationsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def events(self):
        return services.EventsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def instalment_schedules(self):
        return services.InstalmentSchedulesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def institutions(self):
        return services.InstitutionsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def mandates(self):
        return services.MandatesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def mandate_imports(self):
        return services.MandateImportsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def mandate_import_entries(self):
        return services.MandateImportEntriesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def mandate_pdfs(self):
        return services.MandatePdfsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def payer_authorisations(self):
        return services.PayerAuthorisationsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def payments(self):
        return services.PaymentsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def payouts(self):
        return services.PayoutsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def payout_items(self):
        return services.PayoutItemsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def redirect_flows(self):
        return services.RedirectFlowsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def refunds(self):
        return services.RefundsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def scenario_simulators(self):
        return services.ScenarioSimulatorsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def subscriptions(self):
        return services.SubscriptionsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def tax_rates(self):
        return services.TaxRatesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def webhooks(self):
        return services.WebhooksService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    def _environment_url(self, environment):
        environment_urls = { 
            'live': 'https://api.gocardless.com',
            'sandbox': 'https://api-sandbox.gocardless.com',
        }

        if environment not in environment_urls:
            msg = 'Invalid environment "{env}", use one of {env_names}'.format(
                env=environment,
                env_names=', '.join(environment_urls.keys())
            )
            raise ValueError(msg)

        return environment_urls[environment]

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\errors.py
Nome: errors.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

import json


class GoCardlessProError(Exception):
    """Base exception class for gocardless_pro errors."""


class ApiError(GoCardlessProError):
    """Base exception class for GoCardless API errors. API errors will result
    in one of this class' subclasses being raised.
    """

    def __init__(self, error):
        self.error = error

    def __str__(self):
        messages = [error['message'] for error in (self.errors or [])
                    if error['message'] != self.message]
        if messages:
            return '{} ({})'.format(self.message, ', '.join(messages))
        else:
            return self.message

    @property
    def type(self):
        return self.error.get('type')

    @property
    def code(self):
        return self.error.get('code')

    @property
    def errors(self):
        return self.error.get('errors')

    @property
    def documentation_url(self):
        return self.error.get('documentation_url')

    @property
    def message(self):
        return self.error.get('message')

    @property
    def request_id(self):
        return self.error.get('request_id')

    @classmethod
    def _exception_for_status(cls, status):
        if status == 401:
            return AuthenticationError
        elif status == 403:
            return PermissionsError
        elif status == 429:
            return RateLimitError
        else:
            return None

    @classmethod
    def _exception_for_error_type(cls, error_type, errors=[]):
        if error_type == 'validation_failed':
            return ValidationFailedError
        elif error_type == 'invalid_api_usage':
            return InvalidApiUsageError
        elif error_type == 'invalid_state':
            for error in errors:
                if error['reason'] == 'idempotent_creation_conflict':
                    return IdempotentCreationConflictError
            return InvalidStateError
        elif error_type == 'gocardless':
            return GoCardlessInternalError
        else:
            return None


    @classmethod
    def exception_for(cls, status, error_type, errors=[]):
        exception = cls._exception_for_status(status) or cls._exception_for_error_type(error_type, errors)
        if exception is not None:
            return exception
        raise GoCardlessProError('Invalid error type "{}"'.format(error_type))


class ValidationFailedError(ApiError):

    def __str__(self):
        if self.errors and 'field' in self.errors[0]:
            errors = ['{field} {message}'.format(**error) for error in self.errors]
            return '{} ({})'.format(self.message, ', '.join(errors))
        return super(ValidationFailedError, self).__str__()


class IdempotentCreationConflictError(ApiError):

    @property
    def conflicting_resource_id(self):
        for error in self.error['errors']:
            if 'conflicting_resource_id' in error.get('links', {}) and \
                    bool(error['links']['conflicting_resource_id']):  # Neither None nor ""
                return error['links']['conflicting_resource_id']
        else:
            raise ApiError("Idempotent Creation Conflict Error missing conflicting_resource_id")


class InvalidApiUsageError(ApiError):
    pass


class InvalidStateError(ApiError):
    pass


class GoCardlessInternalError(ApiError):
    pass


class AuthenticationError(ApiError):
    pass


class PermissionsError(ApiError):
    pass


class RateLimitError(ApiError):
    pass


class MalformedResponseError(GoCardlessProError):

    def __init__(self, message, response):
        super(MalformedResponseError, self).__init__(message)
        self.response = response


class InvalidSignatureError(GoCardlessProError):
    pass

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\list_response.py
Nome: list_response.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class ListResponse(object):

    def __init__(self, records, api_response):
        self.records = records
        self.api_response = api_response

    @property
    def before(self):
        return self.api_response.body['meta']['cursors']['before']

    @property
    def after(self):
        return self.api_response.body['meta']['cursors']['after']

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\output_unificato.txt
Nome: output_unificato.txt
----------------------------------------
Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\api_client.py
Nome: api_client.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

import sys
import platform
try:
    import urllib.parse as urlparse
except ImportError:
    import urlparse
import json

import requests

from . import errors

class ApiClient(object):
    """Client for interacting with a JSON HTTP API, using OAuth2-style auth.

    Args:
      base_url (string): The prefix that's prepended to all request paths.
      access_token (string): Token used in the Authorization header.
    """

    def __init__(self, base_url, access_token):
        self.base_url = base_url
        self.access_token = access_token

    def get(self, path, params=None, headers=None):
        """Perform a GET request, optionally providing query-string params.

        Args:
          path (str): A path that gets appended to ``base_url``.
          params (dict, optional): Dictionary of param names to values.

        Example:
          api_client.get('/users', params={'active': True})

        Returns:
          A requests ``Response`` object.
        """
        response = requests.get(
            self._url_for(path),
            params=params,
            headers=self._headers(headers)
        )
        self._handle_errors(response)
        return response

    def post(self, path, body, headers=None):
        """Perform a POST request, providing a body, which will be JSON-encoded.

        Args:
          path (str): A path that gets appended to ``base_url``.
          body (dict): Dictionary that will be JSON-encoded and sent as the body.

        Example:
          api_client.post('/users', body={'name': 'Billy Jean'})

        Returns:
          A requests ``Response`` object.
        """

        response = requests.post(
            self._url_for(path),
            data=json.dumps(body),
            headers=self._headers(headers)
        )
        self._handle_errors(response)
        return response

    def put(self, path, body, headers=None):
        """Perform a PUT request, providing a body, which will be JSON-encoded.

        Args:
          path (str): A path that gets appended to ``base_url``.
          body (dict): Dictionary that will be JSON-encoded and sent as the body.

        Example:
          api_client.put('/users', body={'name': 'Billy Jean'})

        Returns:
          A requests ``Response`` object.
        """
        response = requests.put(
            self._url_for(path),
            data=json.dumps(body),
            headers=self._headers(headers)
        )
        self._handle_errors(response)
        return response

    def delete(self, path, body, headers=None):
        """Perform a DELETE request, providing a body, which will be JSON-encoded.

        Args:
          path (str): A path that gets appended to ``base_url``.
          body (dict): Dictionary that will be JSON-encoded and sent as the body.

        Example:
          api_client.delete('/users', body={'name': 'Billy Jean'})

        Returns:
          A requests ``Response`` object.
        """
        response = requests.delete(
            self._url_for(path),
            data=json.dumps(body),
            headers=self._headers(headers)
        )
        self._handle_errors(response)
        return response

    def _handle_errors(self, response):
        try:
            response_body = response.json()
        except ValueError:
            msg = 'Malformed response received from server'
            raise errors.MalformedResponseError(msg, response.text)

        if response.status_code < 400:
            return

        error = response.json()['error']
        exception_class = errors.ApiError.exception_for(response.status_code, error['type'], error.get('errors'))
        raise exception_class(error)

    def _url_for(self, path):
        return urlparse.urljoin(self.base_url, path)

    def _headers(self, custom_headers):
        headers = self._default_headers()
        if custom_headers:
          headers.update(custom_headers)
        return headers

    def _default_headers(self):
        return {
            'Accept': 'application/json',
            'Authorization': 'Bearer {0}'.format(self.access_token),
            'Content-Type': 'application/json',
            'GoCardless-Client-Library': 'gocardless-pro-python',
            'GoCardless-Client-Version': '1.32.0',
            'User-Agent': self._user_agent(),
            'GoCardless-Version': '2015-07-06',
        }

    def _user_agent(self):
        python_version = '.'.join(platform.python_version_tuple()[0:2])
        vm_version = '{}.{}.{}-{}{}'.format(*sys.version_info)
        return ' '.join([
            'gocardless-pro-python/1.32.0',
            'python/{0}'.format(python_version),
            '{0}/{1}'.format(platform.python_implementation(), vm_version),
            '{0}/{1}'.format(platform.system(), platform.release()),
            'requests/{0}'.format(requests.__version__),
        ])

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\api_response.py
Nome: api_response.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class ApiResponse(object):
    """Response from the {{ .Config.api_name }} API, providing access
    to the status code, headers, and body.
    """

    def __init__(self, response):
        self._response = response

    @property
    def status_code(self):
        return self._response.status_code

    @property
    def headers(self):
        return self._response.headers

    @property
    def body(self):
        return self._response.json()


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\client.py
Nome: client.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

from . import services
from .api_client import ApiClient

class Client(object):
    """Client for interacting with the GoCardless Pro API.

    Instantiate a client object with your access token and environment, then
    use the resource methods to access the API.

    Args:
      access_token (str): Find or generate this in your GoCardless Pro dashboard
        (https://manage.gocardless.com/organisation/access-tokens).
      environment (str): Either 'sandbox' or 'live'.
      base_url (str): Manually set a base URL. Most people should use
        `environment` instead.
      raise_on_idempotency_conflict (bool): Configure refetching of conflicting resource

    Example:
      client = Client(access_token=ACCESS_TOKEN, environment='sandbox')
      for customer in client.customers.list():
          print '{} {}'.format(customer.family_name, customer.given_name)
    """

    def __init__(self, access_token=None, environment=None, base_url=None, raise_on_idempotency_conflict=False):
        if access_token is None:
            raise ValueError('No access_token provided')

        if environment is None and base_url is None:
            raise ValueError('No environment or base_url specified')

        base_url = base_url or self._environment_url(environment)
        self._api_client = ApiClient(base_url, access_token)
        self._raise_on_idempotency_conflict = raise_on_idempotency_conflict

    @property
    def bank_authorisations(self):
        return services.BankAuthorisationsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def bank_details_lookups(self):
        return services.BankDetailsLookupsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def billing_requests(self):
        return services.BillingRequestsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def billing_request_flows(self):
        return services.BillingRequestFlowsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def billing_request_templates(self):
        return services.BillingRequestTemplatesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def blocks(self):
        return services.BlocksService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def creditors(self):
        return services.CreditorsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def creditor_bank_accounts(self):
        return services.CreditorBankAccountsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def currency_exchange_rates(self):
        return services.CurrencyExchangeRatesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def customers(self):
        return services.CustomersService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def customer_bank_accounts(self):
        return services.CustomerBankAccountsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def customer_notifications(self):
        return services.CustomerNotificationsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def events(self):
        return services.EventsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def instalment_schedules(self):
        return services.InstalmentSchedulesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def institutions(self):
        return services.InstitutionsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def mandates(self):
        return services.MandatesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def mandate_imports(self):
        return services.MandateImportsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def mandate_import_entries(self):
        return services.MandateImportEntriesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def mandate_pdfs(self):
        return services.MandatePdfsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def payer_authorisations(self):
        return services.PayerAuthorisationsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def payments(self):
        return services.PaymentsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def payouts(self):
        return services.PayoutsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def payout_items(self):
        return services.PayoutItemsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def redirect_flows(self):
        return services.RedirectFlowsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def refunds(self):
        return services.RefundsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def scenario_simulators(self):
        return services.ScenarioSimulatorsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def subscriptions(self):
        return services.SubscriptionsService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def tax_rates(self):
        return services.TaxRatesService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    @property
    def webhooks(self):
        return services.WebhooksService(self._api_client, 3, 0.5, self._raise_on_idempotency_conflict)

    def _environment_url(self, environment):
        environment_urls = { 
            'live': 'https://api.gocardless.com',
            'sandbox': 'https://api-sandbox.gocardless.com',
        }

        if environment not in environment_urls:
            msg = 'Invalid environment "{env}", use one of {env_names}'.format(
                env=environment,
                env_names=', '.join(environment_urls.keys())
            )
            raise ValueError(msg)

        return environment_urls[environment]


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\paginator.py
Nome: paginator.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class Paginator(object):
    """Iterates through all records in a paginated collection, automatically
    loading each page until the last.
    """

    def __init__(self, service, params):
        self._service = service
        self._params = params

    def __iter__(self):
        return self._iterate()

    def _iterate(self):
        page = self._fetch_page(None)
        while True:
            for record in page.records:
                yield record

            if page.after is None:
                break

            page = self._fetch_page(page.after)

    def _fetch_page(self, after):
        params = self._params.copy()
        if after is not None:
            params.update({'after': after})
        return self._service.list(params=params)


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\webhooks.py
Nome: webhooks.py
----------------------------------------
import json
import hmac
import hashlib
import sys

from gocardless_pro.resources.event import Event
from gocardless_pro.errors import InvalidSignatureError

# Python 3+ does not have the basestring type, so we alias it
try:
    basestring
except:
    basestring = str

# Python 3.0 < x < 3.4 does not support handing a mutable bytearray
# to the hmac constructor, so we need to make a record of it ...
SUPPORTS_BYTEARRAY = sys.version_info[0] == 2 or \
  sys.version_info[1] > 3

def parse(body, webhook_secret, signature_header):
    _verify_signature(body, webhook_secret, signature_header)

    events_data = json.loads(to_string(body))
    return [Event(attrs, None) for attrs in events_data['events']]

def _verify_signature(body, key, expected_signature):
    digest = hmac.new(
        to_bytes(key),
        to_bytes(body),
        hashlib.sha256
    ).hexdigest()

    if not hmac.compare_digest(expected_signature, digest):
        raise InvalidSignatureError()

def to_bytes(string):
    if isinstance(string, basestring):
        if SUPPORTS_BYTEARRAY:
            return bytearray(string, 'utf-8')
        return bytes(string, 'utf-8')

    if SUPPORTS_BYTEARRAY:
        return string

    return bytes(string)

def to_string(byte_sequence):
    if isinstance(byte_sequence, bytearray):
        return byte_sequence.decode("utf-8")

    return byte_sequence

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\__init__.py
Nome: __init__.py
----------------------------------------
"""A client library for the GoCardless Pro API."""

from .client import Client

__version__ = '1.32.0'


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\bank_authorisation.py
Nome: bank_authorisation.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class BankAuthorisation(object):
    """A thin wrapper around a bank_authorisation, providing easy access to its
    attributes.

    Example:
      bank_authorisation = client.bank_authorisations.get()
      bank_authorisation.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def authorisation_type(self):
        return self.attributes.get('authorisation_type')
  

    @property
    def authorised_at(self):
        return self.attributes.get('authorised_at')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def expires_at(self):
        return self.attributes.get('expires_at')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def last_visited_at(self):
        return self.attributes.get('last_visited_at')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def redirect_uri(self):
        return self.attributes.get('redirect_uri')
  

    @property
    def url(self):
        return self.attributes.get('url')
  


  

  

  

  

  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def billing_request(self):
            return self.attributes.get('billing_request')
    
        @property
        def institution(self):
            return self.attributes.get('institution')
    
  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\bank_details_lookup.py
Nome: bank_details_lookup.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class BankDetailsLookup(object):
    """A thin wrapper around a bank_details_lookup, providing easy access to its
    attributes.

    Example:
      bank_details_lookup = client.bank_details_lookups.get()
      bank_details_lookup.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def available_debit_schemes(self):
        return self.attributes.get('available_debit_schemes')
  

    @property
    def bank_name(self):
        return self.attributes.get('bank_name')
  

    @property
    def bic(self):
        return self.attributes.get('bic')
  


  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\billing_request.py
Nome: billing_request.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class BillingRequest(object):
    """A thin wrapper around a billing_request, providing easy access to its
    attributes.

    Example:
      billing_request = client.billing_requests.get()
      billing_request.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def actions(self):
        return self.attributes.get('actions')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def fallback_enabled(self):
        return self.attributes.get('fallback_enabled')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def mandate_request(self):
        return self.MandateRequest(self.attributes.get('mandate_request'))
  

    @property
    def metadata(self):
        return self.attributes.get('metadata')
  

    @property
    def payment_request(self):
        return self.PaymentRequest(self.attributes.get('payment_request'))
  

    @property
    def resources(self):
        return self.Resources(self.attributes.get('resources'))
  

    @property
    def status(self):
        return self.attributes.get('status')
  


  

  

  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def bank_authorisation(self):
            return self.attributes.get('bank_authorisation')
    
        @property
        def creditor(self):
            return self.attributes.get('creditor')
    
        @property
        def customer(self):
            return self.attributes.get('customer')
    
        @property
        def customer_bank_account(self):
            return self.attributes.get('customer_bank_account')
    
        @property
        def customer_billing_detail(self):
            return self.attributes.get('customer_billing_detail')
    
        @property
        def mandate_request(self):
            return self.attributes.get('mandate_request')
    
        @property
        def mandate_request_mandate(self):
            return self.attributes.get('mandate_request_mandate')
    
        @property
        def organisation(self):
            return self.attributes.get('organisation')
    
        @property
        def payment_request(self):
            return self.attributes.get('payment_request')
    
        @property
        def payment_request_payment(self):
            return self.attributes.get('payment_request_payment')
    
  

  
    class MandateRequest(object):
        """Wrapper for the response's 'mandate_request' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def currency(self):
            return self.attributes.get('currency')
    
        @property
        def links(self):
            return self.attributes.get('links')
    
        @property
        def metadata(self):
            return self.attributes.get('metadata')
    
        @property
        def scheme(self):
            return self.attributes.get('scheme')
    
        @property
        def verify(self):
            return self.attributes.get('verify')
    
  

  

  
    class PaymentRequest(object):
        """Wrapper for the response's 'payment_request' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def amount(self):
            return self.attributes.get('amount')
    
        @property
        def app_fee(self):
            return self.attributes.get('app_fee')
    
        @property
        def currency(self):
            return self.attributes.get('currency')
    
        @property
        def description(self):
            return self.attributes.get('description')
    
        @property
        def links(self):
            return self.attributes.get('links')
    
        @property
        def metadata(self):
            return self.attributes.get('metadata')
    
        @property
        def scheme(self):
            return self.attributes.get('scheme')
    
  

  
    class Resources(object):
        """Wrapper for the response's 'resources' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def customer(self):
            return self.attributes.get('customer')
    
        @property
        def customer_bank_account(self):
            return self.attributes.get('customer_bank_account')
    
        @property
        def customer_billing_detail(self):
            return self.attributes.get('customer_billing_detail')
    
  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\billing_request_flow.py
Nome: billing_request_flow.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class BillingRequestFlow(object):
    """A thin wrapper around a billing_request_flow, providing easy access to its
    attributes.

    Example:
      billing_request_flow = client.billing_request_flows.get()
      billing_request_flow.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def authorisation_url(self):
        return self.attributes.get('authorisation_url')
  

    @property
    def auto_fulfil(self):
        return self.attributes.get('auto_fulfil')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def exit_uri(self):
        return self.attributes.get('exit_uri')
  

    @property
    def expires_at(self):
        return self.attributes.get('expires_at')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def lock_bank_account(self):
        return self.attributes.get('lock_bank_account')
  

    @property
    def lock_currency(self):
        return self.attributes.get('lock_currency')
  

    @property
    def lock_customer_details(self):
        return self.attributes.get('lock_customer_details')
  

    @property
    def prefilled_bank_account(self):
        return self.PrefilledBankAccount(self.attributes.get('prefilled_bank_account'))
  

    @property
    def prefilled_customer(self):
        return self.PrefilledCustomer(self.attributes.get('prefilled_customer'))
  

    @property
    def redirect_uri(self):
        return self.attributes.get('redirect_uri')
  

    @property
    def session_token(self):
        return self.attributes.get('session_token')
  

    @property
    def show_redirect_buttons(self):
        return self.attributes.get('show_redirect_buttons')
  


  

  

  

  

  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def billing_request(self):
            return self.attributes.get('billing_request')
    
  

  

  

  

  
    class PrefilledBankAccount(object):
        """Wrapper for the response's 'prefilled_bank_account' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def account_type(self):
            return self.attributes.get('account_type')
    
  

  
    class PrefilledCustomer(object):
        """Wrapper for the response's 'prefilled_customer' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def address_line1(self):
            return self.attributes.get('address_line1')
    
        @property
        def address_line2(self):
            return self.attributes.get('address_line2')
    
        @property
        def address_line3(self):
            return self.attributes.get('address_line3')
    
        @property
        def city(self):
            return self.attributes.get('city')
    
        @property
        def company_name(self):
            return self.attributes.get('company_name')
    
        @property
        def country_code(self):
            return self.attributes.get('country_code')
    
        @property
        def danish_identity_number(self):
            return self.attributes.get('danish_identity_number')
    
        @property
        def email(self):
            return self.attributes.get('email')
    
        @property
        def family_name(self):
            return self.attributes.get('family_name')
    
        @property
        def given_name(self):
            return self.attributes.get('given_name')
    
        @property
        def language(self):
            return self.attributes.get('language')
    
        @property
        def postal_code(self):
            return self.attributes.get('postal_code')
    
        @property
        def region(self):
            return self.attributes.get('region')
    
        @property
        def swedish_identity_number(self):
            return self.attributes.get('swedish_identity_number')
    
  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\billing_request_template.py
Nome: billing_request_template.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class BillingRequestTemplate(object):
    """A thin wrapper around a billing_request_template, providing easy access to its
    attributes.

    Example:
      billing_request_template = client.billing_request_templates.get()
      billing_request_template.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def authorisation_url(self):
        return self.attributes.get('authorisation_url')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def mandate_request_currency(self):
        return self.attributes.get('mandate_request_currency')
  

    @property
    def mandate_request_metadata(self):
        return self.attributes.get('mandate_request_metadata')
  

    @property
    def mandate_request_scheme(self):
        return self.attributes.get('mandate_request_scheme')
  

    @property
    def mandate_request_verify(self):
        return self.attributes.get('mandate_request_verify')
  

    @property
    def metadata(self):
        return self.attributes.get('metadata')
  

    @property
    def name(self):
        return self.attributes.get('name')
  

    @property
    def payment_request_amount(self):
        return self.attributes.get('payment_request_amount')
  

    @property
    def payment_request_currency(self):
        return self.attributes.get('payment_request_currency')
  

    @property
    def payment_request_description(self):
        return self.attributes.get('payment_request_description')
  

    @property
    def payment_request_metadata(self):
        return self.attributes.get('payment_request_metadata')
  

    @property
    def payment_request_scheme(self):
        return self.attributes.get('payment_request_scheme')
  

    @property
    def redirect_uri(self):
        return self.attributes.get('redirect_uri')
  

    @property
    def updated_at(self):
        return self.attributes.get('updated_at')
  


  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\block.py
Nome: block.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class Block(object):
    """A thin wrapper around a block, providing easy access to its
    attributes.

    Example:
      block = client.blocks.get()
      block.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def active(self):
        return self.attributes.get('active')
  

    @property
    def block_type(self):
        return self.attributes.get('block_type')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def reason_description(self):
        return self.attributes.get('reason_description')
  

    @property
    def reason_type(self):
        return self.attributes.get('reason_type')
  

    @property
    def resource_reference(self):
        return self.attributes.get('resource_reference')
  

    @property
    def updated_at(self):
        return self.attributes.get('updated_at')
  


  

  

  

  

  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\creditor.py
Nome: creditor.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class Creditor(object):
    """A thin wrapper around a creditor, providing easy access to its
    attributes.

    Example:
      creditor = client.creditors.get()
      creditor.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def address_line1(self):
        return self.attributes.get('address_line1')
  

    @property
    def address_line2(self):
        return self.attributes.get('address_line2')
  

    @property
    def address_line3(self):
        return self.attributes.get('address_line3')
  

    @property
    def can_create_refunds(self):
        return self.attributes.get('can_create_refunds')
  

    @property
    def city(self):
        return self.attributes.get('city')
  

    @property
    def country_code(self):
        return self.attributes.get('country_code')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def custom_payment_pages_enabled(self):
        return self.attributes.get('custom_payment_pages_enabled')
  

    @property
    def fx_payout_currency(self):
        return self.attributes.get('fx_payout_currency')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def logo_url(self):
        return self.attributes.get('logo_url')
  

    @property
    def mandate_imports_enabled(self):
        return self.attributes.get('mandate_imports_enabled')
  

    @property
    def merchant_responsible_for_notifications(self):
        return self.attributes.get('merchant_responsible_for_notifications')
  

    @property
    def name(self):
        return self.attributes.get('name')
  

    @property
    def postal_code(self):
        return self.attributes.get('postal_code')
  

    @property
    def region(self):
        return self.attributes.get('region')
  

    @property
    def scheme_identifiers(self):
        return self.attributes.get('scheme_identifiers')
  

    @property
    def verification_status(self):
        return self.attributes.get('verification_status')
  


  

  

  

  

  

  

  

  

  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def default_aud_payout_account(self):
            return self.attributes.get('default_aud_payout_account')
    
        @property
        def default_cad_payout_account(self):
            return self.attributes.get('default_cad_payout_account')
    
        @property
        def default_dkk_payout_account(self):
            return self.attributes.get('default_dkk_payout_account')
    
        @property
        def default_eur_payout_account(self):
            return self.attributes.get('default_eur_payout_account')
    
        @property
        def default_gbp_payout_account(self):
            return self.attributes.get('default_gbp_payout_account')
    
        @property
        def default_nzd_payout_account(self):
            return self.attributes.get('default_nzd_payout_account')
    
        @property
        def default_sek_payout_account(self):
            return self.attributes.get('default_sek_payout_account')
    
        @property
        def default_usd_payout_account(self):
            return self.attributes.get('default_usd_payout_account')
    
  

  

  

  

  

  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\creditor_bank_account.py
Nome: creditor_bank_account.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class CreditorBankAccount(object):
    """A thin wrapper around a creditor_bank_account, providing easy access to its
    attributes.

    Example:
      creditor_bank_account = client.creditor_bank_accounts.get()
      creditor_bank_account.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def account_holder_name(self):
        return self.attributes.get('account_holder_name')
  

    @property
    def account_number_ending(self):
        return self.attributes.get('account_number_ending')
  

    @property
    def account_type(self):
        return self.attributes.get('account_type')
  

    @property
    def bank_name(self):
        return self.attributes.get('bank_name')
  

    @property
    def country_code(self):
        return self.attributes.get('country_code')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def currency(self):
        return self.attributes.get('currency')
  

    @property
    def enabled(self):
        return self.attributes.get('enabled')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def metadata(self):
        return self.attributes.get('metadata')
  


  

  

  

  

  

  

  

  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def creditor(self):
            return self.attributes.get('creditor')
    
  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\currency_exchange_rate.py
Nome: currency_exchange_rate.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class CurrencyExchangeRate(object):
    """A thin wrapper around a currency_exchange_rate, providing easy access to its
    attributes.

    Example:
      currency_exchange_rate = client.currency_exchange_rates.get()
      currency_exchange_rate.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def rate(self):
        return self.attributes.get('rate')
  

    @property
    def source(self):
        return self.attributes.get('source')
  

    @property
    def target(self):
        return self.attributes.get('target')
  

    @property
    def time(self):
        return self.attributes.get('time')
  


  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\customer.py
Nome: customer.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class Customer(object):
    """A thin wrapper around a customer, providing easy access to its
    attributes.

    Example:
      customer = client.customers.get()
      customer.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def address_line1(self):
        return self.attributes.get('address_line1')
  

    @property
    def address_line2(self):
        return self.attributes.get('address_line2')
  

    @property
    def address_line3(self):
        return self.attributes.get('address_line3')
  

    @property
    def city(self):
        return self.attributes.get('city')
  

    @property
    def company_name(self):
        return self.attributes.get('company_name')
  

    @property
    def country_code(self):
        return self.attributes.get('country_code')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def danish_identity_number(self):
        return self.attributes.get('danish_identity_number')
  

    @property
    def email(self):
        return self.attributes.get('email')
  

    @property
    def family_name(self):
        return self.attributes.get('family_name')
  

    @property
    def given_name(self):
        return self.attributes.get('given_name')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def language(self):
        return self.attributes.get('language')
  

    @property
    def metadata(self):
        return self.attributes.get('metadata')
  

    @property
    def phone_number(self):
        return self.attributes.get('phone_number')
  

    @property
    def postal_code(self):
        return self.attributes.get('postal_code')
  

    @property
    def region(self):
        return self.attributes.get('region')
  

    @property
    def swedish_identity_number(self):
        return self.attributes.get('swedish_identity_number')
  


  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\customer_bank_account.py
Nome: customer_bank_account.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class CustomerBankAccount(object):
    """A thin wrapper around a customer_bank_account, providing easy access to its
    attributes.

    Example:
      customer_bank_account = client.customer_bank_accounts.get()
      customer_bank_account.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def account_holder_name(self):
        return self.attributes.get('account_holder_name')
  

    @property
    def account_number_ending(self):
        return self.attributes.get('account_number_ending')
  

    @property
    def account_type(self):
        return self.attributes.get('account_type')
  

    @property
    def bank_name(self):
        return self.attributes.get('bank_name')
  

    @property
    def country_code(self):
        return self.attributes.get('country_code')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def currency(self):
        return self.attributes.get('currency')
  

    @property
    def enabled(self):
        return self.attributes.get('enabled')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def metadata(self):
        return self.attributes.get('metadata')
  


  

  

  

  

  

  

  

  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def customer(self):
            return self.attributes.get('customer')
    
  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\customer_notification.py
Nome: customer_notification.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class CustomerNotification(object):
    """A thin wrapper around a customer_notification, providing easy access to its
    attributes.

    Example:
      customer_notification = client.customer_notifications.get()
      customer_notification.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def action_taken(self):
        return self.attributes.get('action_taken')
  

    @property
    def action_taken_at(self):
        return self.attributes.get('action_taken_at')
  

    @property
    def action_taken_by(self):
        return self.attributes.get('action_taken_by')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def type(self):
        return self.attributes.get('type')
  


  

  

  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def customer(self):
            return self.attributes.get('customer')
    
        @property
        def event(self):
            return self.attributes.get('event')
    
        @property
        def mandate(self):
            return self.attributes.get('mandate')
    
        @property
        def payment(self):
            return self.attributes.get('payment')
    
        @property
        def refund(self):
            return self.attributes.get('refund')
    
        @property
        def subscription(self):
            return self.attributes.get('subscription')
    
  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\event.py
Nome: event.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class Event(object):
    """A thin wrapper around a event, providing easy access to its
    attributes.

    Example:
      event = client.events.get()
      event.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def action(self):
        return self.attributes.get('action')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def customer_notifications(self):
        return self.attributes.get('customer_notifications')
  

    @property
    def details(self):
        return self.Details(self.attributes.get('details'))
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def metadata(self):
        return self.attributes.get('metadata')
  

    @property
    def resource_type(self):
        return self.attributes.get('resource_type')
  


  

  

  

  
    class Details(object):
        """Wrapper for the response's 'details' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def bank_account_id(self):
            return self.attributes.get('bank_account_id')
    
        @property
        def cause(self):
            return self.attributes.get('cause')
    
        @property
        def currency(self):
            return self.attributes.get('currency')
    
        @property
        def description(self):
            return self.attributes.get('description')
    
        @property
        def not_retried_reason(self):
            return self.attributes.get('not_retried_reason')
    
        @property
        def origin(self):
            return self.attributes.get('origin')
    
        @property
        def _property(self):
            return self.attributes.get('property')
    
        @property
        def reason_code(self):
            return self.attributes.get('reason_code')
    
        @property
        def scheme(self):
            return self.attributes.get('scheme')
    
        @property
        def will_attempt_retry(self):
            return self.attributes.get('will_attempt_retry')
    
  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def bank_authorisation(self):
            return self.attributes.get('bank_authorisation')
    
        @property
        def billing_request(self):
            return self.attributes.get('billing_request')
    
        @property
        def billing_request_flow(self):
            return self.attributes.get('billing_request_flow')
    
        @property
        def creditor(self):
            return self.attributes.get('creditor')
    
        @property
        def customer(self):
            return self.attributes.get('customer')
    
        @property
        def customer_bank_account(self):
            return self.attributes.get('customer_bank_account')
    
        @property
        def instalment_schedule(self):
            return self.attributes.get('instalment_schedule')
    
        @property
        def mandate(self):
            return self.attributes.get('mandate')
    
        @property
        def mandate_request_mandate(self):
            return self.attributes.get('mandate_request_mandate')
    
        @property
        def new_customer_bank_account(self):
            return self.attributes.get('new_customer_bank_account')
    
        @property
        def new_mandate(self):
            return self.attributes.get('new_mandate')
    
        @property
        def organisation(self):
            return self.attributes.get('organisation')
    
        @property
        def parent_event(self):
            return self.attributes.get('parent_event')
    
        @property
        def payer_authorisation(self):
            return self.attributes.get('payer_authorisation')
    
        @property
        def payment(self):
            return self.attributes.get('payment')
    
        @property
        def payment_request_payment(self):
            return self.attributes.get('payment_request_payment')
    
        @property
        def payout(self):
            return self.attributes.get('payout')
    
        @property
        def previous_customer_bank_account(self):
            return self.attributes.get('previous_customer_bank_account')
    
        @property
        def refund(self):
            return self.attributes.get('refund')
    
        @property
        def subscription(self):
            return self.attributes.get('subscription')
    
  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\instalment_schedule.py
Nome: instalment_schedule.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class InstalmentSchedule(object):
    """A thin wrapper around a instalment_schedule, providing easy access to its
    attributes.

    Example:
      instalment_schedule = client.instalment_schedules.get()
      instalment_schedule.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def currency(self):
        return self.attributes.get('currency')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def metadata(self):
        return self.attributes.get('metadata')
  

    @property
    def name(self):
        return self.attributes.get('name')
  

    @property
    def payment_errors(self):
        return self.attributes.get('payment_errors')
  

    @property
    def status(self):
        return self.attributes.get('status')
  

    @property
    def total_amount(self):
        return self.attributes.get('total_amount')
  


  

  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def customer(self):
            return self.attributes.get('customer')
    
        @property
        def mandate(self):
            return self.attributes.get('mandate')
    
        @property
        def payments(self):
            return self.attributes.get('payments')
    
  

  

  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\institution.py
Nome: institution.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class Institution(object):
    """A thin wrapper around a institution, providing easy access to its
    attributes.

    Example:
      institution = client.institutions.get()
      institution.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def bank_redirect(self):
        return self.attributes.get('bank_redirect')
  

    @property
    def country_code(self):
        return self.attributes.get('country_code')
  

    @property
    def icon_url(self):
        return self.attributes.get('icon_url')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def logo_url(self):
        return self.attributes.get('logo_url')
  

    @property
    def name(self):
        return self.attributes.get('name')
  


  

  

  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\mandate.py
Nome: mandate.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class Mandate(object):
    """A thin wrapper around a mandate, providing easy access to its
    attributes.

    Example:
      mandate = client.mandates.get()
      mandate.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def metadata(self):
        return self.attributes.get('metadata')
  

    @property
    def next_possible_charge_date(self):
        return self.attributes.get('next_possible_charge_date')
  

    @property
    def payments_require_approval(self):
        return self.attributes.get('payments_require_approval')
  

    @property
    def reference(self):
        return self.attributes.get('reference')
  

    @property
    def scheme(self):
        return self.attributes.get('scheme')
  

    @property
    def status(self):
        return self.attributes.get('status')
  


  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def creditor(self):
            return self.attributes.get('creditor')
    
        @property
        def customer(self):
            return self.attributes.get('customer')
    
        @property
        def customer_bank_account(self):
            return self.attributes.get('customer_bank_account')
    
        @property
        def new_mandate(self):
            return self.attributes.get('new_mandate')
    
  

  

  

  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\mandate_import.py
Nome: mandate_import.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class MandateImport(object):
    """A thin wrapper around a mandate_import, providing easy access to its
    attributes.

    Example:
      mandate_import = client.mandate_imports.get()
      mandate_import.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def scheme(self):
        return self.attributes.get('scheme')
  

    @property
    def status(self):
        return self.attributes.get('status')
  


  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\mandate_import_entry.py
Nome: mandate_import_entry.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class MandateImportEntry(object):
    """A thin wrapper around a mandate_import_entry, providing easy access to its
    attributes.

    Example:
      mandate_import_entry = client.mandate_import_entries.get()
      mandate_import_entry.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def record_identifier(self):
        return self.attributes.get('record_identifier')
  


  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def customer(self):
            return self.attributes.get('customer')
    
        @property
        def customer_bank_account(self):
            return self.attributes.get('customer_bank_account')
    
        @property
        def mandate(self):
            return self.attributes.get('mandate')
    
        @property
        def mandate_import(self):
            return self.attributes.get('mandate_import')
    
  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\mandate_pdf.py
Nome: mandate_pdf.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class MandatePdf(object):
    """A thin wrapper around a mandate_pdf, providing easy access to its
    attributes.

    Example:
      mandate_pdf = client.mandate_pdfs.get()
      mandate_pdf.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def expires_at(self):
        return self.attributes.get('expires_at')
  

    @property
    def url(self):
        return self.attributes.get('url')
  


  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\payer_authorisation.py
Nome: payer_authorisation.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class PayerAuthorisation(object):
    """A thin wrapper around a payer_authorisation, providing easy access to its
    attributes.

    Example:
      payer_authorisation = client.payer_authorisations.get()
      payer_authorisation.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def bank_account(self):
        return self.BankAccount(self.attributes.get('bank_account'))
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def customer(self):
        return self.Customer(self.attributes.get('customer'))
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def incomplete_fields(self):
        return self.attributes.get('incomplete_fields')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def mandate(self):
        return self.Mandate(self.attributes.get('mandate'))
  

    @property
    def status(self):
        return self.attributes.get('status')
  


  
    class BankAccount(object):
        """Wrapper for the response's 'bank_account' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def account_holder_name(self):
            return self.attributes.get('account_holder_name')
    
        @property
        def account_number(self):
            return self.attributes.get('account_number')
    
        @property
        def account_number_ending(self):
            return self.attributes.get('account_number_ending')
    
        @property
        def account_number_suffix(self):
            return self.attributes.get('account_number_suffix')
    
        @property
        def account_type(self):
            return self.attributes.get('account_type')
    
        @property
        def bank_code(self):
            return self.attributes.get('bank_code')
    
        @property
        def branch_code(self):
            return self.attributes.get('branch_code')
    
        @property
        def country_code(self):
            return self.attributes.get('country_code')
    
        @property
        def currency(self):
            return self.attributes.get('currency')
    
        @property
        def iban(self):
            return self.attributes.get('iban')
    
        @property
        def metadata(self):
            return self.attributes.get('metadata')
    
  

  

  
    class Customer(object):
        """Wrapper for the response's 'customer' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def address_line1(self):
            return self.attributes.get('address_line1')
    
        @property
        def address_line2(self):
            return self.attributes.get('address_line2')
    
        @property
        def address_line3(self):
            return self.attributes.get('address_line3')
    
        @property
        def city(self):
            return self.attributes.get('city')
    
        @property
        def company_name(self):
            return self.attributes.get('company_name')
    
        @property
        def country_code(self):
            return self.attributes.get('country_code')
    
        @property
        def danish_identity_number(self):
            return self.attributes.get('danish_identity_number')
    
        @property
        def email(self):
            return self.attributes.get('email')
    
        @property
        def family_name(self):
            return self.attributes.get('family_name')
    
        @property
        def given_name(self):
            return self.attributes.get('given_name')
    
        @property
        def locale(self):
            return self.attributes.get('locale')
    
        @property
        def metadata(self):
            return self.attributes.get('metadata')
    
        @property
        def postal_code(self):
            return self.attributes.get('postal_code')
    
        @property
        def region(self):
            return self.attributes.get('region')
    
        @property
        def swedish_identity_number(self):
            return self.attributes.get('swedish_identity_number')
    
  

  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def bank_account(self):
            return self.attributes.get('bank_account')
    
        @property
        def customer(self):
            return self.attributes.get('customer')
    
        @property
        def mandate(self):
            return self.attributes.get('mandate')
    
  

  
    class Mandate(object):
        """Wrapper for the response's 'mandate' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def metadata(self):
            return self.attributes.get('metadata')
    
        @property
        def payer_ip_address(self):
            return self.attributes.get('payer_ip_address')
    
        @property
        def reference(self):
            return self.attributes.get('reference')
    
        @property
        def scheme(self):
            return self.attributes.get('scheme')
    
  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\payment.py
Nome: payment.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class Payment(object):
    """A thin wrapper around a payment, providing easy access to its
    attributes.

    Example:
      payment = client.payments.get()
      payment.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def amount(self):
        return self.attributes.get('amount')
  

    @property
    def amount_refunded(self):
        return self.attributes.get('amount_refunded')
  

    @property
    def charge_date(self):
        return self.attributes.get('charge_date')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def currency(self):
        return self.attributes.get('currency')
  

    @property
    def description(self):
        return self.attributes.get('description')
  

    @property
    def fx(self):
        return self.Fx(self.attributes.get('fx'))
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def metadata(self):
        return self.attributes.get('metadata')
  

    @property
    def reference(self):
        return self.attributes.get('reference')
  

    @property
    def retry_if_possible(self):
        return self.attributes.get('retry_if_possible')
  

    @property
    def status(self):
        return self.attributes.get('status')
  


  

  

  

  

  

  

  
    class Fx(object):
        """Wrapper for the response's 'fx' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def estimated_exchange_rate(self):
            return self.attributes.get('estimated_exchange_rate')
    
        @property
        def exchange_rate(self):
            return self.attributes.get('exchange_rate')
    
        @property
        def fx_amount(self):
            return self.attributes.get('fx_amount')
    
        @property
        def fx_currency(self):
            return self.attributes.get('fx_currency')
    
  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def creditor(self):
            return self.attributes.get('creditor')
    
        @property
        def instalment_schedule(self):
            return self.attributes.get('instalment_schedule')
    
        @property
        def mandate(self):
            return self.attributes.get('mandate')
    
        @property
        def payout(self):
            return self.attributes.get('payout')
    
        @property
        def subscription(self):
            return self.attributes.get('subscription')
    
  

  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\payout.py
Nome: payout.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class Payout(object):
    """A thin wrapper around a payout, providing easy access to its
    attributes.

    Example:
      payout = client.payouts.get()
      payout.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def amount(self):
        return self.attributes.get('amount')
  

    @property
    def arrival_date(self):
        return self.attributes.get('arrival_date')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def currency(self):
        return self.attributes.get('currency')
  

    @property
    def deducted_fees(self):
        return self.attributes.get('deducted_fees')
  

    @property
    def fx(self):
        return self.Fx(self.attributes.get('fx'))
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def metadata(self):
        return self.attributes.get('metadata')
  

    @property
    def payout_type(self):
        return self.attributes.get('payout_type')
  

    @property
    def reference(self):
        return self.attributes.get('reference')
  

    @property
    def status(self):
        return self.attributes.get('status')
  

    @property
    def tax_currency(self):
        return self.attributes.get('tax_currency')
  


  

  

  

  

  

  
    class Fx(object):
        """Wrapper for the response's 'fx' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def estimated_exchange_rate(self):
            return self.attributes.get('estimated_exchange_rate')
    
        @property
        def exchange_rate(self):
            return self.attributes.get('exchange_rate')
    
        @property
        def fx_amount(self):
            return self.attributes.get('fx_amount')
    
        @property
        def fx_currency(self):
            return self.attributes.get('fx_currency')
    
  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def creditor(self):
            return self.attributes.get('creditor')
    
        @property
        def creditor_bank_account(self):
            return self.attributes.get('creditor_bank_account')
    
  

  

  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\payout_item.py
Nome: payout_item.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class PayoutItem(object):
    """A thin wrapper around a payout_item, providing easy access to its
    attributes.

    Example:
      payout_item = client.payout_items.get()
      payout_item.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def amount(self):
        return self.attributes.get('amount')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def taxes(self):
        return self.attributes.get('taxes')
  

    @property
    def type(self):
        return self.attributes.get('type')
  


  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def mandate(self):
            return self.attributes.get('mandate')
    
        @property
        def payment(self):
            return self.attributes.get('payment')
    
        @property
        def refund(self):
            return self.attributes.get('refund')
    
  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\redirect_flow.py
Nome: redirect_flow.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class RedirectFlow(object):
    """A thin wrapper around a redirect_flow, providing easy access to its
    attributes.

    Example:
      redirect_flow = client.redirect_flows.get()
      redirect_flow.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def confirmation_url(self):
        return self.attributes.get('confirmation_url')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def description(self):
        return self.attributes.get('description')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def mandate_reference(self):
        return self.attributes.get('mandate_reference')
  

    @property
    def metadata(self):
        return self.attributes.get('metadata')
  

    @property
    def redirect_url(self):
        return self.attributes.get('redirect_url')
  

    @property
    def scheme(self):
        return self.attributes.get('scheme')
  

    @property
    def session_token(self):
        return self.attributes.get('session_token')
  

    @property
    def success_redirect_url(self):
        return self.attributes.get('success_redirect_url')
  


  

  

  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def billing_request(self):
            return self.attributes.get('billing_request')
    
        @property
        def creditor(self):
            return self.attributes.get('creditor')
    
        @property
        def customer(self):
            return self.attributes.get('customer')
    
        @property
        def customer_bank_account(self):
            return self.attributes.get('customer_bank_account')
    
        @property
        def mandate(self):
            return self.attributes.get('mandate')
    
  

  

  

  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\refund.py
Nome: refund.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class Refund(object):
    """A thin wrapper around a refund, providing easy access to its
    attributes.

    Example:
      refund = client.refunds.get()
      refund.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def amount(self):
        return self.attributes.get('amount')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def currency(self):
        return self.attributes.get('currency')
  

    @property
    def fx(self):
        return self.Fx(self.attributes.get('fx'))
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def metadata(self):
        return self.attributes.get('metadata')
  

    @property
    def reference(self):
        return self.attributes.get('reference')
  

    @property
    def status(self):
        return self.attributes.get('status')
  


  

  

  

  
    class Fx(object):
        """Wrapper for the response's 'fx' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def estimated_exchange_rate(self):
            return self.attributes.get('estimated_exchange_rate')
    
        @property
        def exchange_rate(self):
            return self.attributes.get('exchange_rate')
    
        @property
        def fx_amount(self):
            return self.attributes.get('fx_amount')
    
        @property
        def fx_currency(self):
            return self.attributes.get('fx_currency')
    
  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def mandate(self):
            return self.attributes.get('mandate')
    
        @property
        def payment(self):
            return self.attributes.get('payment')
    
  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\scenario_simulator.py
Nome: scenario_simulator.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class ScenarioSimulator(object):
    """A thin wrapper around a scenario_simulator, providing easy access to its
    attributes.

    Example:
      scenario_simulator = client.scenario_simulators.get()
      scenario_simulator.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def id(self):
        return self.attributes.get('id')
  


  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\subscription.py
Nome: subscription.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class Subscription(object):
    """A thin wrapper around a subscription, providing easy access to its
    attributes.

    Example:
      subscription = client.subscriptions.get()
      subscription.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def amount(self):
        return self.attributes.get('amount')
  

    @property
    def app_fee(self):
        return self.attributes.get('app_fee')
  

    @property
    def count(self):
        return self.attributes.get('count')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def currency(self):
        return self.attributes.get('currency')
  

    @property
    def day_of_month(self):
        return self.attributes.get('day_of_month')
  

    @property
    def earliest_charge_date_after_resume(self):
        return self.attributes.get('earliest_charge_date_after_resume')
  

    @property
    def end_date(self):
        return self.attributes.get('end_date')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def interval(self):
        return self.attributes.get('interval')
  

    @property
    def interval_unit(self):
        return self.attributes.get('interval_unit')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def metadata(self):
        return self.attributes.get('metadata')
  

    @property
    def month(self):
        return self.attributes.get('month')
  

    @property
    def name(self):
        return self.attributes.get('name')
  

    @property
    def payment_reference(self):
        return self.attributes.get('payment_reference')
  

    @property
    def retry_if_possible(self):
        return self.attributes.get('retry_if_possible')
  

    @property
    def start_date(self):
        return self.attributes.get('start_date')
  

    @property
    def status(self):
        return self.attributes.get('status')
  

    @property
    def upcoming_payments(self):
        return self.attributes.get('upcoming_payments')
  


  

  

  

  

  

  

  

  

  

  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def mandate(self):
            return self.attributes.get('mandate')
    
  

  

  

  

  

  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\tax_rate.py
Nome: tax_rate.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class TaxRate(object):
    """A thin wrapper around a tax_rate, providing easy access to its
    attributes.

    Example:
      tax_rate = client.tax_rates.get()
      tax_rate.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def end_date(self):
        return self.attributes.get('end_date')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def jurisdiction(self):
        return self.attributes.get('jurisdiction')
  

    @property
    def percentage(self):
        return self.attributes.get('percentage')
  

    @property
    def start_date(self):
        return self.attributes.get('start_date')
  

    @property
    def type(self):
        return self.attributes.get('type')
  


  

  

  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\webhook.py
Nome: webhook.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class Webhook(object):
    """A thin wrapper around a webhook, providing easy access to its
    attributes.

    Example:
      webhook = client.webhooks.get()
      webhook.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def is_test(self):
        return self.attributes.get('is_test')
  

    @property
    def request_body(self):
        return self.attributes.get('request_body')
  

    @property
    def request_headers(self):
        return self.attributes.get('request_headers')
  

    @property
    def response_body(self):
        return self.attributes.get('response_body')
  

    @property
    def response_body_truncated(self):
        return self.attributes.get('response_body_truncated')
  

    @property
    def response_code(self):
        return self.attributes.get('response_code')
  

    @property
    def response_headers(self):
        return self.attributes.get('response_headers')
  

    @property
    def response_headers_content_truncated(self):
        return self.attributes.get('response_headers_content_truncated')
  

    @property
    def response_headers_count_truncated(self):
        return self.attributes.get('response_headers_count_truncated')
  

    @property
    def successful(self):
        return self.attributes.get('successful')
  

    @property
    def url(self):
        return self.attributes.get('url')
  


  

  

  

  

  

  

  

  

  

  

  

  

  


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\resources\__init__.py
Nome: __init__.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

from .bank_authorisation import BankAuthorisation

from .bank_details_lookup import BankDetailsLookup

from .billing_request import BillingRequest

from .billing_request_flow import BillingRequestFlow

from .billing_request_template import BillingRequestTemplate

from .block import Block

from .creditor import Creditor

from .creditor_bank_account import CreditorBankAccount

from .currency_exchange_rate import CurrencyExchangeRate

from .customer import Customer

from .customer_bank_account import CustomerBankAccount

from .customer_notification import CustomerNotification

from .event import Event

from .instalment_schedule import InstalmentSchedule

from .institution import Institution

from .mandate import Mandate

from .mandate_import import MandateImport

from .mandate_import_entry import MandateImportEntry

from .mandate_pdf import MandatePdf

from .payer_authorisation import PayerAuthorisation

from .payment import Payment

from .payout import Payout

from .payout_item import PayoutItem

from .redirect_flow import RedirectFlow

from .refund import Refund

from .scenario_simulator import ScenarioSimulator

from .subscription import Subscription

from .tax_rate import TaxRate

from .webhook import Webhook


========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\bank_authorisations_service.py
Nome: bank_authorisations_service.py
----------------------------------------
# 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 BankAuthorisationsService(base_service.BaseService):
    """Service class that provides access to the bank_authorisations
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.BankAuthorisation
    RESOURCE_NAME = 'bank_authorisations'


    def get(self,identity,params=None, headers=None):
        """Get a Bank Authorisation..

        Fetches a bank authorisation

        Args:
              identity (string): Unique identifier, beginning with "BAU".
              params (dict, optional): Query string parameters.

        Returns:
              BankAuthorisation
        """
        path = self._sub_url_params('/bank_authorisations/:identity', {
          
            'identity': identity,
          })
        

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

    def create(self,params=None, headers=None):
        """Create a Bank Authorisation.

        Create a Bank Authorisation.

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\bank_details_lookups_service.py
Nome: bank_details_lookups_service.py
----------------------------------------
# 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 BankDetailsLookupsService(base_service.BaseService):
    """Service class that provides access to the bank_details_lookups
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.BankDetailsLookup
    RESOURCE_NAME = 'bank_details_lookups'


    def create(self,params=None, headers=None):
        """Perform a bank details lookup.

        Performs a bank details lookup. As part of the lookup, a modulus check
        and
        reachability check are performed.
        
        If your request returns an [error](#api-usage-errors) or the
        `available_debit_schemes`
        attribute is an empty array, you will not be able to collect payments
        from the
        specified bank account. GoCardless may be able to collect payments from
        an account
        even if no `bic` is returned.
        
        Bank account details may be supplied using [local
        details](#appendix-local-bank-details) or an IBAN.
        
        _ACH scheme_ For compliance reasons, an extra validation step is done
        using
        a third-party provider to make sure the customer's bank account can
        accept
        Direct Debit. If a bank account is discovered to be closed or invalid,
        the
        customer is requested to adjust the account number/routing number and
        succeed in this check to continue with the flow.
        
        _Note:_ Usage of this endpoint is monitored. If your organisation
        relies on GoCardless for
        modulus or reachability checking but not for payment collection, please
        get in touch.

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

        Returns:
              BankDetailsLookup
        """
        path = '/bank_details_lookups'
        
        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)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\base_service.py
Nome: base_service.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

import re
import time
from requests import Timeout, ConnectionError
from uuid import uuid4

from .. import list_response
from ..api_response import ApiResponse
from ..errors import MalformedResponseError

class BaseService(object):
    """Base class for API service classes."""
    def __init__(self, api_client, max_network_retries=3, retry_delay_in_seconds=0.5, raise_on_idempotency_conflict=False):
        self._api_client = api_client
        self.max_network_retries = max_network_retries
        self.retry_delay_in_seconds = retry_delay_in_seconds
        self.raise_on_idempotency_conflict = raise_on_idempotency_conflict

    def _perform_request(self, method, path, params, headers=None, retry_failures=False):
        if method == 'POST':
            headers = self._inject_idempotency_key(headers)

        if retry_failures:
            for retries_left in range(self.max_network_retries-1, -1, -1):
                try:
                    return self._attempt_request(method, path, params, headers)
                except (Timeout, ConnectionError, MalformedResponseError) as err:
                    if retries_left > 0:
                        time.sleep(self.retry_delay_in_seconds)
                    else:
                        raise err
        else:
            return self._attempt_request(method, path, params, headers)

    def _attempt_request(self, method, path, params, headers):
        if method == 'GET':
            return self._api_client.get(path, params=params, headers=headers)

        if method == 'POST':
            return self._api_client.post(path, body=params, headers=headers)

        if method == 'PUT':
            return self._api_client.put(path, body=params, headers=headers)

        if method == 'DELETE':
            return self._api_client.delete(path, body=params, headers=headers)

        raise ValueError('Invalid method "{}"'.format(method))


    def _inject_idempotency_key(self, headers):
        headers = headers or {}
        if 'Idempotency-Key' not in headers:
            headers['Idempotency-Key'] = str(uuid4())

        return headers

    def _envelope_key(self):
        return type(self).RESOURCE_NAME

    def _resource_for(self, response):
        api_response = ApiResponse(response)

        data = api_response.body[self._envelope_key()]
        klass = type(self).RESOURCE_CLASS
        if isinstance(data, dict):
            return klass(data, api_response)
        else:
            records = [klass(item, api_response) for item in data]
            return list_response.ListResponse(records, api_response)

    def _sub_url_params(self, url, params):
        return re.sub(r':(\w+)', lambda match: params[match.group(1)], url)

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\billing_requests_service.py
Nome: billing_requests_service.py
----------------------------------------
# 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 BillingRequestsService(base_service.BaseService):
    """Service class that provides access to the billing_requests
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.BillingRequest
    RESOURCE_NAME = 'billing_requests'


    def list(self,params=None, headers=None):
        """List Billing Requests.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        billing requests.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of BillingRequest instances
        """
        path = '/billing_requests'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def create(self,params=None, headers=None):
        """Create a Billing Request.

        

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def get(self,identity,params=None, headers=None):
        """Get a single Billing Request.

        Fetches a billing request

        Args:
              identity (string): Unique identifier, beginning with "BRQ".
              params (dict, optional): Query string parameters.

        Returns:
              BillingRequest
        """
        path = self._sub_url_params('/billing_requests/:identity', {
          
            'identity': identity,
          })
        

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

    def collect_customer_details(self,identity,params=None, headers=None):
        """Collect customer details for a Billing Request.

        If the billing request has a pending
        <code>collect_customer_details</code>
        action, this endpoint can be used to collect the details in order to
        complete it.
        
        The endpoint takes the same payload as Customers, but checks that the
        customer fields are populated correctly for the billing request scheme.
        
        Whatever is provided to this endpoint is used to update the referenced
        customer, and will take effect immediately after the request is
        successful.

        Args:
              identity (string): Unique identifier, beginning with "BRQ".
              params (dict, optional): Request body.

        Returns:
              BillingRequest
        """
        path = self._sub_url_params('/billing_requests/:identity/actions/collect_customer_details', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def collect_bank_account(self,identity,params=None, headers=None):
        """Collect bank account details for a Billing Request.

        If the billing request has a pending
        <code>collect_bank_account</code> action, this endpoint can be
        used to collect the details in order to complete it.
        
        The endpoint takes the same payload as Customer Bank Accounts, but
        check
        the bank account is valid for the billing request scheme before
        creating
        and attaching it.
        
        _ACH scheme_ For compliance reasons, an extra validation step is done
        using
        a third-party provider to make sure the customer's bank account can
        accept
        Direct Debit. If a bank account is discovered to be closed or invalid,
        the
        customer is requested to adjust the account number/routing number and
        succeed in this check to continue with the flow.

        Args:
              identity (string): Unique identifier, beginning with "BRQ".
              params (dict, optional): Request body.

        Returns:
              BillingRequest
        """
        path = self._sub_url_params('/billing_requests/:identity/actions/collect_bank_account', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def fulfil(self,identity,params=None, headers=None):
        """Fulfil a Billing Request.

        If a billing request is ready to be fulfilled, call this endpoint to
        cause
        it to fulfil, executing the payment.

        Args:
              identity (string): Unique identifier, beginning with "BRQ".
              params (dict, optional): Request body.

        Returns:
              BillingRequest
        """
        path = self._sub_url_params('/billing_requests/:identity/actions/fulfil', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def choose_currency(self,identity,params=None, headers=None):
        """Change currency for a Billing Request.

        This will allow for the updating of the currency and subsequently the
        scheme if needed for a billing request
        this will only be available for mandate only flows, it will not support
        payments requests or plans

        Args:
              identity (string): Unique identifier, beginning with "BRQ".
              params (dict, optional): Request body.

        Returns:
              BillingRequest
        """
        path = self._sub_url_params('/billing_requests/:identity/actions/choose_currency', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def confirm_payer_details(self,identity,params=None, headers=None):
        """Confirm the customer and bank account details.

        This is needed when you have a mandate request. As a scheme compliance
        rule we are required to
        allow the payer to crosscheck the details entered by them and confirm
        it.

        Args:
              identity (string): Unique identifier, beginning with "BRQ".
              params (dict, optional): Request body.

        Returns:
              BillingRequest
        """
        path = self._sub_url_params('/billing_requests/:identity/actions/confirm_payer_details', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def cancel(self,identity,params=None, headers=None):
        """Cancel a Billing Request.

        Immediately cancels a billing request, causing all billing request
        flows
        to expire.

        Args:
              identity (string): Unique identifier, beginning with "BRQ".
              params (dict, optional): Request body.

        Returns:
              BillingRequest
        """
        path = self._sub_url_params('/billing_requests/:identity/actions/cancel', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def notify(self,identity,params=None, headers=None):
        """Notify the customer of a Billing Request.

        Notifies the customer linked to the billing request, asking them to
        authorise it.
        Currently, the customer can only be notified by email.

        Args:
              identity (string): Unique identifier, beginning with "BRQ".
              params (dict, optional): Request body.

        Returns:
              BillingRequest
        """
        path = self._sub_url_params('/billing_requests/:identity/actions/notify', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def fallback(self,identity,params=None, headers=None):
        """Trigger fallback for a Billing Request.

        Triggers a fallback from the open-banking flow to direct debit. Note,
        the billing request must have fallback enabled.

        Args:
              identity (string): Unique identifier, beginning with "BRQ".
              params (dict, optional): Request body.

        Returns:
              BillingRequest
        """
        path = self._sub_url_params('/billing_requests/:identity/actions/fallback', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\billing_request_flows_service.py
Nome: billing_request_flows_service.py
----------------------------------------
# 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 BillingRequestFlowsService(base_service.BaseService):
    """Service class that provides access to the billing_request_flows
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.BillingRequestFlow
    RESOURCE_NAME = 'billing_request_flows'


    def create(self,params=None, headers=None):
        """Create a Billing Request Flow.

        Creates a new billing request flow.

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

        Returns:
              BillingRequestFlow
        """
        path = '/billing_request_flows'
        
        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)
  

    def initialise(self,identity,params=None, headers=None):
        """Initialise a Billing Request Flow.

        Returns the flow having generated a fresh session token which can be
        used to power
        integrations that manipulate the flow.

        Args:
              identity (string): Unique identifier, beginning with "BRF".
              params (dict, optional): Request body.

        Returns:
              BillingRequestFlow
        """
        path = self._sub_url_params('/billing_request_flows/:identity/actions/initialise', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\billing_request_templates_service.py
Nome: billing_request_templates_service.py
----------------------------------------
# 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 BillingRequestTemplatesService(base_service.BaseService):
    """Service class that provides access to the billing_request_templates
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.BillingRequestTemplate
    RESOURCE_NAME = 'billing_request_templates'


    def list(self,params=None, headers=None):
        """List Billing Request Templates.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        Billing Request Templates.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of BillingRequestTemplate instances
        """
        path = '/billing_request_templates'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single Billing Request Template.

        Fetches a Billing Request Template

        Args:
              identity (string): Unique identifier, beginning with "BRT".
              params (dict, optional): Query string parameters.

        Returns:
              BillingRequestTemplate
        """
        path = self._sub_url_params('/billing_request_templates/:identity', {
          
            'identity': identity,
          })
        

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

    def create(self,params=None, headers=None):
        """Create a Billing Request Template.

        

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def update(self,identity,params=None, headers=None):
        """Update a Billing Request Template.

        Updates a Billing Request Template, which will affect all future
        Billing Requests created by this template.

        Args:
              identity (string): Unique identifier, beginning with "BRQ".
              params (dict, optional): Request body.

        Returns:
              BillingRequestTemplate
        """
        path = self._sub_url_params('/billing_request_templates/:identity', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {self._envelope_key(): params}

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

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\blocks_service.py
Nome: blocks_service.py
----------------------------------------
# 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 BlocksService(base_service.BaseService):
    """Service class that provides access to the blocks
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.Block
    RESOURCE_NAME = 'blocks'


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

        Creates a new Block of a given type. By default it will be active.

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def get(self,identity,params=None, headers=None):
        """Get a single block.

        Retrieves the details of an existing block.

        Args:
              identity (string): Unique identifier, beginning with "BLC".
              params (dict, optional): Query string parameters.

        Returns:
              Block
        """
        path = self._sub_url_params('/blocks/:identity', {
          
            'identity': identity,
          })
        

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

    def list(self,params=None, headers=None):
        """List multiple blocks.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        blocks.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of Block instances
        """
        path = '/blocks'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def disable(self,identity,params=None, headers=None):
        """Disable a block.

        Disables a block so that it no longer will prevent mandate creation.

        Args:
              identity (string): Unique identifier, beginning with "BLC".
              params (dict, optional): Request body.

        Returns:
              Block
        """
        path = self._sub_url_params('/blocks/:identity/actions/disable', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def enable(self,identity,params=None, headers=None):
        """Enable a block.

        Enables a previously disabled block so that it will prevent mandate
        creation

        Args:
              identity (string): Unique identifier, beginning with "BLC".
              params (dict, optional): Request body.

        Returns:
              Block
        """
        path = self._sub_url_params('/blocks/:identity/actions/enable', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def block_by_ref(self,params=None, headers=None):
        """Create blocks by reference.

        Creates new blocks for a given reference. By default blocks will be
        active.
        Returns 201 if at least one block was created. Returns 200 if there
        were no new
        blocks created.

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

        Returns:
              ListResponse of Block instances
        """
        path = '/block_by_ref'
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\creditors_service.py
Nome: creditors_service.py
----------------------------------------
# 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 CreditorsService(base_service.BaseService):
    """Service class that provides access to the creditors
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.Creditor
    RESOURCE_NAME = 'creditors'


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

        Creates a new creditor.

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def list(self,params=None, headers=None):
        """List creditors.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        creditors.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of Creditor instances
        """
        path = '/creditors'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single creditor.

        Retrieves the details of an existing creditor.

        Args:
              identity (string): Unique identifier, beginning with "CR".
              params (dict, optional): Query string parameters.

        Returns:
              Creditor
        """
        path = self._sub_url_params('/creditors/:identity', {
          
            'identity': identity,
          })
        

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

    def update(self,identity,params=None, headers=None):
        """Update a creditor.

        Updates a creditor object. Supports all of the fields supported when
        creating a creditor.

        Args:
              identity (string): Unique identifier, beginning with "CR".
              params (dict, optional): Request body.

        Returns:
              Creditor
        """
        path = self._sub_url_params('/creditors/:identity', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {self._envelope_key(): params}

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

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\creditor_bank_accounts_service.py
Nome: creditor_bank_accounts_service.py
----------------------------------------
# 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 CreditorBankAccountsService(base_service.BaseService):
    """Service class that provides access to the creditor_bank_accounts
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.CreditorBankAccount
    RESOURCE_NAME = 'creditor_bank_accounts'


    def create(self,params=None, headers=None):
        """Create a creditor bank account.

        Creates a new creditor bank account object.

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def list(self,params=None, headers=None):
        """List creditor bank accounts.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        creditor bank accounts.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of CreditorBankAccount instances
        """
        path = '/creditor_bank_accounts'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single creditor bank account.

        Retrieves the details of an existing creditor bank account.

        Args:
              identity (string): Unique identifier, beginning with "BA".
              params (dict, optional): Query string parameters.

        Returns:
              CreditorBankAccount
        """
        path = self._sub_url_params('/creditor_bank_accounts/:identity', {
          
            'identity': identity,
          })
        

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

    def disable(self,identity,params=None, headers=None):
        """Disable a creditor bank account.

        Immediately disables the bank account, no money can be paid out to a
        disabled account.
        
        This will return a `disable_failed` error if the bank account has
        already been disabled.
        
        A disabled bank account can be re-enabled by creating a new bank
        account resource with the same details.

        Args:
              identity (string): Unique identifier, beginning with "BA".
              params (dict, optional): Request body.

        Returns:
              CreditorBankAccount
        """
        path = self._sub_url_params('/creditor_bank_accounts/:identity/actions/disable', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\currency_exchange_rates_service.py
Nome: currency_exchange_rates_service.py
----------------------------------------
# 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 CurrencyExchangeRatesService(base_service.BaseService):
    """Service class that provides access to the currency_exchange_rates
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.CurrencyExchangeRate
    RESOURCE_NAME = 'currency_exchange_rates'


    def list(self,params=None, headers=None):
        """List exchange rates.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of all
        exchange rates.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of CurrencyExchangeRate instances
        """
        path = '/currency_exchange_rates'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\customers_service.py
Nome: customers_service.py
----------------------------------------
# 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 CustomersService(base_service.BaseService):
    """Service class that provides access to the customers
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.Customer
    RESOURCE_NAME = 'customers'


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

        Creates a new customer object.

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def list(self,params=None, headers=None):
        """List customers.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        customers.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of Customer instances
        """
        path = '/customers'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single customer.

        Retrieves the details of an existing customer.

        Args:
              identity (string): Unique identifier, beginning with "CU".
              params (dict, optional): Query string parameters.

        Returns:
              Customer
        """
        path = self._sub_url_params('/customers/:identity', {
          
            'identity': identity,
          })
        

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

    def update(self,identity,params=None, headers=None):
        """Update a customer.

        Updates a customer object. Supports all of the fields supported when
        creating a customer.

        Args:
              identity (string): Unique identifier, beginning with "CU".
              params (dict, optional): Request body.

        Returns:
              Customer
        """
        path = self._sub_url_params('/customers/:identity', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {self._envelope_key(): params}

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

    def remove(self,identity,params=None, headers=None):
        """Remove a customer.

        Removed customers will not appear in search results or lists of
        customers (in our API
        or exports), and it will not be possible to load an individually
        removed customer by
        ID.
        
        <p class="restricted-notice"><strong>The action of removing a customer
        cannot be reversed, so please use with care.</strong></p>

        Args:
              identity (string): Unique identifier, beginning with "CU".
              params (dict, optional): Request body.

        Returns:
              Customer
        """
        path = self._sub_url_params('/customers/:identity', {
          
            'identity': identity,
          })
        
        response = self._perform_request('DELETE', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\customer_bank_accounts_service.py
Nome: customer_bank_accounts_service.py
----------------------------------------
# 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 CustomerBankAccountsService(base_service.BaseService):
    """Service class that provides access to the customer_bank_accounts
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.CustomerBankAccount
    RESOURCE_NAME = 'customer_bank_accounts'


    def create(self,params=None, headers=None):
        """Create a customer bank account.

        Creates a new customer bank account object.
        
        There are three different ways to supply bank account details:
        
        - [Local details](#appendix-local-bank-details)
        
        - IBAN
        
        - [Customer Bank Account
        Tokens](#javascript-flow-create-a-customer-bank-account-token)
        
        For more information on the different fields required in each country,
        see [local bank details](#appendix-local-bank-details).

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def list(self,params=None, headers=None):
        """List customer bank accounts.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        bank accounts.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of CustomerBankAccount instances
        """
        path = '/customer_bank_accounts'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single customer bank account.

        Retrieves the details of an existing bank account.

        Args:
              identity (string): Unique identifier, beginning with "BA".
              params (dict, optional): Query string parameters.

        Returns:
              CustomerBankAccount
        """
        path = self._sub_url_params('/customer_bank_accounts/:identity', {
          
            'identity': identity,
          })
        

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

    def update(self,identity,params=None, headers=None):
        """Update a customer bank account.

        Updates a customer bank account object. Only the metadata parameter is
        allowed.

        Args:
              identity (string): Unique identifier, beginning with "BA".
              params (dict, optional): Request body.

        Returns:
              CustomerBankAccount
        """
        path = self._sub_url_params('/customer_bank_accounts/:identity', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {self._envelope_key(): params}

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

    def disable(self,identity,params=None, headers=None):
        """Disable a customer bank account.

        Immediately cancels all associated mandates and cancellable payments.
        
        This will return a `disable_failed` error if the bank account has
        already been disabled.
        
        A disabled bank account can be re-enabled by creating a new bank
        account resource with the same details.

        Args:
              identity (string): Unique identifier, beginning with "BA".
              params (dict, optional): Request body.

        Returns:
              CustomerBankAccount
        """
        path = self._sub_url_params('/customer_bank_accounts/:identity/actions/disable', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\customer_notifications_service.py
Nome: customer_notifications_service.py
----------------------------------------
# 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 CustomerNotificationsService(base_service.BaseService):
    """Service class that provides access to the customer_notifications
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.CustomerNotification
    RESOURCE_NAME = 'customer_notifications'


    def handle(self,identity,params=None, headers=None):
        """Handle a notification.

        "Handling" a notification means that you have sent the notification
        yourself (and
        don't want GoCardless to send it).
        If the notification has already been actioned, or the deadline to
        notify has passed,
        this endpoint will return an `already_actioned` error and you should
        not take
        further action. This endpoint takes no additional parameters.
        

        Args:
              identity (string): The id of the notification.
              params (dict, optional): Request body.

        Returns:
              CustomerNotification
        """
        path = self._sub_url_params('/customer_notifications/:identity/actions/handle', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\events_service.py
Nome: events_service.py
----------------------------------------
# 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 EventsService(base_service.BaseService):
    """Service class that provides access to the events
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.Event
    RESOURCE_NAME = 'events'


    def list(self,params=None, headers=None):
        """List events.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        events.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of Event instances
        """
        path = '/events'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single event.

        Retrieves the details of a single event.

        Args:
              identity (string): Unique identifier, beginning with "EV".
              params (dict, optional): Query string parameters.

        Returns:
              Event
        """
        path = self._sub_url_params('/events/:identity', {
          
            'identity': identity,
          })
        

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

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\instalment_schedules_service.py
Nome: instalment_schedules_service.py
----------------------------------------
# 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 InstalmentSchedulesService(base_service.BaseService):
    """Service class that provides access to the instalment_schedules
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.InstalmentSchedule
    RESOURCE_NAME = 'instalment_schedules'


    def create_with_dates(self,params=None, headers=None):
        """Create (with dates).

        Creates a new instalment schedule object, along with the associated
        payments. This
        API is recommended if you know the specific dates you wish to charge.
        Otherwise,
        please check out the [scheduling
        version](#instalment-schedules-create-with-schedule).
        
        The `instalments` property is an array of payment properties (`amount`
        and
        `charge_date`).
        
        It can take quite a while to create the associated payments, so the API
        will return
        the status as `pending` initially. When processing has completed, a
        subsequent GET
        request for the instalment schedule will either have the status
        `success` and link
        to the created payments, or the status `error` and detailed information
        about the
        failures.

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def create_with_schedule(self,params=None, headers=None):
        """Create (with schedule).

        Creates a new instalment schedule object, along with the associated
        payments. This
        API is recommended if you wish to use the GoCardless scheduling logic.
        For finer
        control over the individual dates, please check out the [alternative
        version](#instalment-schedules-create-with-dates).
        
        It can take quite a while to create the associated payments, so the API
        will return
        the status as `pending` initially. When processing has completed, a
        subsequent
        GET request for the instalment schedule will either have the status
        `success` and link to
        the created payments, or the status `error` and detailed information
        about the
        failures.

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def list(self,params=None, headers=None):
        """List instalment schedules.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        instalment schedules.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of InstalmentSchedule instances
        """
        path = '/instalment_schedules'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single instalment schedule.

        Retrieves the details of an existing instalment schedule.

        Args:
              identity (string): Unique identifier, beginning with "IS".
              params (dict, optional): Query string parameters.

        Returns:
              InstalmentSchedule
        """
        path = self._sub_url_params('/instalment_schedules/:identity', {
          
            'identity': identity,
          })
        

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

    def update(self,identity,params=None, headers=None):
        """Update an instalment schedule.

        Updates an instalment schedule. This accepts only the metadata
        parameter.

        Args:
              identity (string): Unique identifier, beginning with "IS".
              params (dict, optional): Request body.

        Returns:
              InstalmentSchedule
        """
        path = self._sub_url_params('/instalment_schedules/:identity', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {self._envelope_key(): params}

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

    def cancel(self,identity,params=None, headers=None):
        """Cancel an instalment schedule.

        Immediately cancels an instalment schedule; no further payments will be
        collected for it.
        
        This will fail with a `cancellation_failed` error if the instalment
        schedule is already cancelled or has completed.

        Args:
              identity (string): Unique identifier, beginning with "IS".
              params (dict, optional): Request body.

        Returns:
              InstalmentSchedule
        """
        path = self._sub_url_params('/instalment_schedules/:identity/actions/cancel', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\institutions_service.py
Nome: institutions_service.py
----------------------------------------
# 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 InstitutionsService(base_service.BaseService):
    """Service class that provides access to the institutions
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.Institution
    RESOURCE_NAME = 'institutions'


    def list(self,params=None, headers=None):
        """List Institutions.

        Returns a list of supported institutions.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of Institution instances
        """
        path = '/institutions'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\mandates_service.py
Nome: mandates_service.py
----------------------------------------
# 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 MandatesService(base_service.BaseService):
    """Service class that provides access to the mandates
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.Mandate
    RESOURCE_NAME = 'mandates'


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

        Creates a new mandate object.

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def list(self,params=None, headers=None):
        """List mandates.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        mandates.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of Mandate instances
        """
        path = '/mandates'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single mandate.

        Retrieves the details of an existing mandate.

        Args:
              identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016.
              params (dict, optional): Query string parameters.

        Returns:
              Mandate
        """
        path = self._sub_url_params('/mandates/:identity', {
          
            'identity': identity,
          })
        

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

    def update(self,identity,params=None, headers=None):
        """Update a mandate.

        Updates a mandate object. This accepts only the metadata parameter.

        Args:
              identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016.
              params (dict, optional): Request body.

        Returns:
              Mandate
        """
        path = self._sub_url_params('/mandates/:identity', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {self._envelope_key(): params}

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

    def cancel(self,identity,params=None, headers=None):
        """Cancel a mandate.

        Immediately cancels a mandate and all associated cancellable payments.
        Any metadata supplied to this endpoint will be stored on the mandate
        cancellation event it causes.
        
        This will fail with a `cancellation_failed` error if the mandate is
        already cancelled.

        Args:
              identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016.
              params (dict, optional): Request body.

        Returns:
              Mandate
        """
        path = self._sub_url_params('/mandates/:identity/actions/cancel', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def reinstate(self,identity,params=None, headers=None):
        """Reinstate a mandate.

        <a name="mandate_not_inactive"></a>Reinstates a cancelled or expired
        mandate to the banks. You will receive a `resubmission_requested`
        webhook, but after that reinstating the mandate follows the same
        process as its initial creation, so you will receive a `submitted`
        webhook, followed by a `reinstated` or `failed` webhook up to two
        working days later. Any metadata supplied to this endpoint will be
        stored on the `resubmission_requested` event it causes.
        
        This will fail with a `mandate_not_inactive` error if the mandate is
        already being submitted, or is active.
        
        Mandates can be resubmitted up to 10 times.

        Args:
              identity (string): Unique identifier, beginning with "MD". Note that this prefix may not apply to mandates created before 2016.
              params (dict, optional): Request body.

        Returns:
              Mandate
        """
        path = self._sub_url_params('/mandates/:identity/actions/reinstate', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\mandate_imports_service.py
Nome: mandate_imports_service.py
----------------------------------------
# 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 MandateImportsService(base_service.BaseService):
    """Service class that provides access to the mandate_imports
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.MandateImport
    RESOURCE_NAME = 'mandate_imports'


    def create(self,params=None, headers=None):
        """Create a new mandate import.

        Mandate imports are first created, before mandates are added
        one-at-a-time, so
        this endpoint merely signals the start of the import process. Once
        you've finished
        adding entries to an import, you should
        [submit](#mandate-imports-submit-a-mandate-import) it.

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def get(self,identity,params=None, headers=None):
        """Get a mandate import.

        Returns a single mandate import.

        Args:
              identity (string): Unique identifier, beginning with "IM".
              params (dict, optional): Query string parameters.

        Returns:
              MandateImport
        """
        path = self._sub_url_params('/mandate_imports/:identity', {
          
            'identity': identity,
          })
        

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

    def submit(self,identity,params=None, headers=None):
        """Submit a mandate import.

        Submits the mandate import, which allows it to be processed by a member
        of the
        GoCardless team. Once the import has been submitted, it can no longer
        have entries
        added to it.
        
        In our sandbox environment, to aid development, we automatically
        process mandate
        imports approximately 10 seconds after they are submitted. This will
        allow you to
        test both the "submitted" response and wait for the webhook to confirm
        the
        processing has begun.

        Args:
              identity (string): Unique identifier, beginning with "IM".
              params (dict, optional): Request body.

        Returns:
              MandateImport
        """
        path = self._sub_url_params('/mandate_imports/:identity/actions/submit', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def cancel(self,identity,params=None, headers=None):
        """Cancel a mandate import.

        Cancels the mandate import, which aborts the import process and stops
        the mandates
        being set up in GoCardless. Once the import has been cancelled, it can
        no longer have
        entries added to it. Mandate imports which have already been submitted
        or processed
        cannot be cancelled.

        Args:
              identity (string): Unique identifier, beginning with "IM".
              params (dict, optional): Request body.

        Returns:
              MandateImport
        """
        path = self._sub_url_params('/mandate_imports/:identity/actions/cancel', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\mandate_import_entries_service.py
Nome: mandate_import_entries_service.py
----------------------------------------
# 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 MandateImportEntriesService(base_service.BaseService):
    """Service class that provides access to the mandate_import_entries
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.MandateImportEntry
    RESOURCE_NAME = 'mandate_import_entries'


    def create(self,params=None, headers=None):
        """Add a mandate import entry.

        For an existing [mandate import](#core-endpoints-mandate-imports), this
        endpoint can
        be used to add individual mandates to be imported into GoCardless.
        
        You can add no more than 30,000 rows to a single mandate import.
        If you attempt to go over this limit, the API will return a
        `record_limit_exceeded` error.

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

        Returns:
              MandateImportEntry
        """
        path = '/mandate_import_entries'
        
        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)
  

    def list(self,params=None, headers=None):
        """List all mandate import entries.

        For an existing mandate import, this endpoint lists all of the entries
        attached.
        
        After a mandate import has been submitted, you can use this endpoint to
        associate records
        in your system (using the `record_identifier` that you provided when
        creating the
        mandate import).
        

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of MandateImportEntry instances
        """
        path = '/mandate_import_entries'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\mandate_pdfs_service.py
Nome: mandate_pdfs_service.py
----------------------------------------
# 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 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, headers=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).
        
        By default, we'll generate PDF mandates in English.
        
        To generate a PDF mandate in another language, set the
        `Accept-Language` header when creating the PDF mandate to the relevant
        [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
        language code supported for the scheme.
        
        | Scheme           | Supported languages                               
                                                                               
                          |
        | :--------------- |
        :-------------------------------------------------------------------------------------------------------------------------------------------
        |
        | ACH              | English (`en`)                                    
                                                                               
                          |
        | Autogiro         | English (`en`), Swedish (`sv`)                    
                                                                               
                          |
        | Bacs             | English (`en`)                                    
                                                                               
                          |
        | BECS             | English (`en`)                                    
                                                                               
                          |
        | BECS NZ          | English (`en`)                                    
                                                                               
                          |
        | Betalingsservice | Danish (`da`), English (`en`)                     
                                                                               
                          |
        | PAD              | English (`en`)                                    
                                                                               
                          |
        | SEPA Core        | Danish (`da`), Dutch (`nl`), English (`en`),
        French (`fr`), German (`de`), Italian (`it`), Portuguese (`pt`),
        Spanish (`es`), Swedish (`sv`) |

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

        Returns:
              MandatePdf
        """
        path = '/mandate_pdfs'
        
        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)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\payer_authorisations_service.py
Nome: payer_authorisations_service.py
----------------------------------------
# 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 PayerAuthorisationsService(base_service.BaseService):
    """Service class that provides access to the payer_authorisations
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.PayerAuthorisation
    RESOURCE_NAME = 'payer_authorisations'


    def get(self,identity,params=None, headers=None):
        """Get a single Payer Authorisation.

        Retrieves the details of a single existing Payer Authorisation. It can
        be used for polling the status of a Payer Authorisation.

        Args:
              identity (string): Unique identifier, beginning with "PA".
              params (dict, optional): Query string parameters.

        Returns:
              PayerAuthorisation
        """
        path = self._sub_url_params('/payer_authorisations/:identity', {
          
            'identity': identity,
          })
        

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

    def create(self,params=None, headers=None):
        """Create a Payer Authorisation.

        Creates a Payer Authorisation. The resource is saved to the database
        even if incomplete. An empty array of incomplete_fields means that the
        resource is valid. The ID of the resource is used for the other
        actions. This endpoint has been designed this way so you do not need to
        save any payer data on your servers or the browser while still being
        able to implement a progressive solution, such as a multi-step form.

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def update(self,identity,params=None, headers=None):
        """Update a Payer Authorisation.

        Updates a Payer Authorisation. Updates the Payer Authorisation with the
        request data. Can be invoked as many times as needed. Only fields
        present in the request will be modified. An empty array of
        incomplete_fields means that the resource is valid. This endpoint has
        been designed this way so you do not need to save any payer data on
        your servers or the browser while still being able to implement a
        progressive solution, such a multi-step form. <p class="notice"> Note
        that in order to update the `metadata` attribute values it must be sent
        completely as it overrides the previously existing values. </p>

        Args:
              identity (string): Unique identifier, beginning with "PA".
              params (dict, optional): Request body.

        Returns:
              PayerAuthorisation
        """
        path = self._sub_url_params('/payer_authorisations/:identity', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {self._envelope_key(): params}

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

    def submit(self,identity,params=None, headers=None):
        """Submit a Payer Authorisation.

        Submits all the data previously pushed to this PayerAuthorisation for
        verification. This time, a 200 HTTP status is returned if the resource
        is valid and a 422 error response in case of validation errors. After
        it is successfully submitted, the Payer Authorisation can no longer be
        edited.

        Args:
              identity (string): Unique identifier, beginning with "PA".
              params (dict, optional): Request body.

        Returns:
              PayerAuthorisation
        """
        path = self._sub_url_params('/payer_authorisations/:identity/actions/submit', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def confirm(self,identity,params=None, headers=None):
        """Confirm a Payer Authorisation.

        Confirms the Payer Authorisation, indicating that the resources are
        ready to be created.
        A Payer Authorisation cannot be confirmed if it hasn't been submitted
        yet.
        
        <p class="notice">
          The main use of the confirm endpoint is to enable integrators to
        acknowledge the end of the setup process. 
          They might want to make the payers go through some other steps after
        they go through our flow or make them go through the necessary
        verification mechanism (upcoming feature).
        </p>

        Args:
              identity (string): Unique identifier, beginning with "PA".
              params (dict, optional): Request body.

        Returns:
              PayerAuthorisation
        """
        path = self._sub_url_params('/payer_authorisations/:identity/actions/confirm', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\payments_service.py
Nome: payments_service.py
----------------------------------------
# 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 PaymentsService(base_service.BaseService):
    """Service class that provides access to the payments
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.Payment
    RESOURCE_NAME = 'payments'


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

        <a name="mandate_is_inactive"></a>Creates a new payment object.
        
        This fails with a `mandate_is_inactive` error if the linked
        [mandate](#core-endpoints-mandates) is cancelled or has failed.
        Payments can be created against mandates with status of:
        `pending_customer_approval`, `pending_submission`, `submitted`, and
        `active`.

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def list(self,params=None, headers=None):
        """List payments.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        payments.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of Payment instances
        """
        path = '/payments'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single payment.

        Retrieves the details of a single existing payment.

        Args:
              identity (string): Unique identifier, beginning with "PM".
              params (dict, optional): Query string parameters.

        Returns:
              Payment
        """
        path = self._sub_url_params('/payments/:identity', {
          
            'identity': identity,
          })
        

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

    def update(self,identity,params=None, headers=None):
        """Update a payment.

        Updates a payment object. This accepts only the metadata parameter.

        Args:
              identity (string): Unique identifier, beginning with "PM".
              params (dict, optional): Request body.

        Returns:
              Payment
        """
        path = self._sub_url_params('/payments/:identity', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {self._envelope_key(): params}

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

    def cancel(self,identity,params=None, headers=None):
        """Cancel a payment.

        Cancels the payment if it has not already been submitted to the banks.
        Any metadata supplied to this endpoint will be stored on the payment
        cancellation event it causes.
        
        This will fail with a `cancellation_failed` error unless the payment's
        status is `pending_submission`.

        Args:
              identity (string): Unique identifier, beginning with "PM".
              params (dict, optional): Request body.

        Returns:
              Payment
        """
        path = self._sub_url_params('/payments/:identity/actions/cancel', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def retry(self,identity,params=None, headers=None):
        """Retry a payment.

        <a name="retry_failed"></a>Retries a failed payment if the underlying
        mandate is active. You will receive a `resubmission_requested` webhook,
        but after that retrying the payment follows the same process as its
        initial creation, so you will receive a `submitted` webhook, followed
        by a `confirmed` or `failed` event. Any metadata supplied to this
        endpoint will be stored against the payment submission event it causes.
        
        This will return a `retry_failed` error if the payment has not failed.
        
        Payments can be retried up to 3 times.

        Args:
              identity (string): Unique identifier, beginning with "PM".
              params (dict, optional): Request body.

        Returns:
              Payment
        """
        path = self._sub_url_params('/payments/:identity/actions/retry', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\payouts_service.py
Nome: payouts_service.py
----------------------------------------
# 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 PayoutsService(base_service.BaseService):
    """Service class that provides access to the payouts
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.Payout
    RESOURCE_NAME = 'payouts'


    def list(self,params=None, headers=None):
        """List payouts.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        payouts.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of Payout instances
        """
        path = '/payouts'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single payout.

        Retrieves the details of a single payout. For an example of how to
        reconcile the transactions in a payout, see [this
        guide](#events-reconciling-payouts-with-events).

        Args:
              identity (string): Unique identifier, beginning with "PO".
              params (dict, optional): Query string parameters.

        Returns:
              Payout
        """
        path = self._sub_url_params('/payouts/:identity', {
          
            'identity': identity,
          })
        

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

    def update(self,identity,params=None, headers=None):
        """Update a payout.

        Updates a payout object. This accepts only the metadata parameter.

        Args:
              identity (string): Unique identifier, beginning with "PO".
              params (dict, optional): Request body.

        Returns:
              Payout
        """
        path = self._sub_url_params('/payouts/:identity', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {self._envelope_key(): params}

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

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\payout_items_service.py
Nome: payout_items_service.py
----------------------------------------
# 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 PayoutItemsService(base_service.BaseService):
    """Service class that provides access to the payout_items
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.PayoutItem
    RESOURCE_NAME = 'payout_items'


    def list(self,params=None, headers=None):
        """Get all payout items in a single payout.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of
        items in the payout.
        

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of PayoutItem instances
        """
        path = '/payout_items'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\redirect_flows_service.py
Nome: redirect_flows_service.py
----------------------------------------
# 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 RedirectFlowsService(base_service.BaseService):
    """Service class that provides access to the redirect_flows
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.RedirectFlow
    RESOURCE_NAME = 'redirect_flows'


    def create(self,params=None, headers=None):
        """Create a redirect flow.

        Creates a redirect flow object which can then be used to redirect your
        customer to the GoCardless hosted payment pages.

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def get(self,identity,params=None, headers=None):
        """Get a single redirect flow.

        Returns all details about a single redirect flow

        Args:
              identity (string): Unique identifier, beginning with "RE".
              params (dict, optional): Query string parameters.

        Returns:
              RedirectFlow
        """
        path = self._sub_url_params('/redirect_flows/:identity', {
          
            'identity': identity,
          })
        

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

    def complete(self,identity,params=None, headers=None):
        """Complete a redirect flow.

        This creates a [customer](#core-endpoints-customers), [customer bank
        account](#core-endpoints-customer-bank-accounts), and
        [mandate](#core-endpoints-mandates) using the details supplied by your
        customer and returns the ID of the created mandate.
        
        This will return a `redirect_flow_incomplete` error if your customer
        has not yet been redirected back to your site, and a
        `redirect_flow_already_completed` error if your integration has already
        completed this flow. It will return a `bad_request` error if the
        `session_token` differs to the one supplied when the redirect flow was
        created.

        Args:
              identity (string): Unique identifier, beginning with "RE".
              params (dict, optional): Request body.

        Returns:
              RedirectFlow
        """
        path = self._sub_url_params('/redirect_flows/:identity/actions/complete', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\refunds_service.py
Nome: refunds_service.py
----------------------------------------
# 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 RefundsService(base_service.BaseService):
    """Service class that provides access to the refunds
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.Refund
    RESOURCE_NAME = 'refunds'


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

        Creates a new refund object.
        
        This fails with:<a name="total_amount_confirmation_invalid"></a><a
        name="number_of_refunds_exceeded"></a><a
        name="available_refund_amount_insufficient"></a>
        
        - `total_amount_confirmation_invalid` if the confirmation amount
        doesn't match the total amount refunded for the payment. This safeguard
        is there to prevent two processes from creating refunds without
        awareness of each other.
        
        - `number_of_refunds_exceeded` if five or more refunds have already
        been created against the payment.
        
        - `available_refund_amount_insufficient` if the creditor does not have
        sufficient balance for refunds available to cover the cost of the
        requested refund.
        

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def list(self,params=None, headers=None):
        """List refunds.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        refunds.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of Refund instances
        """
        path = '/refunds'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single refund.

        Retrieves all details for a single refund

        Args:
              identity (string): Unique identifier, beginning with "RF".
              params (dict, optional): Query string parameters.

        Returns:
              Refund
        """
        path = self._sub_url_params('/refunds/:identity', {
          
            'identity': identity,
          })
        

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

    def update(self,identity,params=None, headers=None):
        """Update a refund.

        Updates a refund object.

        Args:
              identity (string): Unique identifier, beginning with "RF".
              params (dict, optional): Request body.

        Returns:
              Refund
        """
        path = self._sub_url_params('/refunds/:identity', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {self._envelope_key(): params}

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

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\scenario_simulators_service.py
Nome: scenario_simulators_service.py
----------------------------------------
# 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 ScenarioSimulatorsService(base_service.BaseService):
    """Service class that provides access to the scenario_simulators
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.ScenarioSimulator
    RESOURCE_NAME = 'scenario_simulators'


    def run(self,identity,params=None, headers=None):
        """Simulate a scenario.

        Runs the specific scenario simulator against the specific resource

        Args:
              identity (string): The unique identifier of the simulator, used to initiate simulations. One of:
<ul>
<li>`creditor_verification_status_action_required`: Sets a creditor's `verification status` to `action required`, meaning that the creditor must provide further information to GoCardless in order to verify their account to receive payouts.</li>
<li>`creditor_verification_status_in_review`: Sets a creditor's `verification status` to `in review`, meaning that the creditor has provided all of the information requested by GoCardless to verify their account, and is now awaiting review.</li>
<li>`creditor_verification_status_successful`: Sets a creditor's `verification status` to `successful`, meaning that the creditor is fully verified and can receive payouts.</li>
<li>`payment_confirmed`: Transitions a payment through to `confirmed`. It must start in the `pending_submission` state, and its mandate must be in the `activated` state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may be `pending_submission`, since their mandates are submitted with their first payment).</li>
<li>`payment_paid_out`: Transitions a payment through to `paid_out`, having been collected successfully and paid out to you. It must start in the `pending_submission` state, and its mandate must be in the `activated` state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may be `pending_submission`, since their mandates are submitted with their first payment).</li>
<li>`payment_failed`: Transitions a payment through to `failed`. It must start in the `pending_submission` state, and its mandate must be in the `activated` state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may be `pending_submission`, since their mandates are submitted with their first payment).</li>
<li>`payment_charged_back`: Behaves the same as the `payout_paid_out` simulator, except that the payment is transitioned to `charged_back` after it is paid out, having been charged back by the customer.</li>
<li>`payment_chargeback_settled`: Behaves the same as the `payment_charged_back` simulator, except that the charged back payment is additionally included as a debit item in a payout, thereby settling the charged back payment.</li>
<li>`payment_late_failure`: Transitions a payment through to `late_failure`, having been apparently collected successfully beforehand. It must start in the `pending_submission` state, and its mandate must be in the `activated` state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may be `pending_submission`, since their mandates are submitted with their first payment). Not compatible with Autogiro mandates.</li>
<li>`payment_late_failure_settled`: Behaves the same as the `payment_late_failure` simulator, except that the late failure is additionally included as a debit item in a payout, thereby settling the late failure.</li>
<li>`payment_submitted`: Transitions a payment to `submitted`, without proceeding any further. It must start in the `pending_submission` state.</li>
<li>`mandate_activated`: Transitions a mandate through to `activated`, having been submitted to the banks and set up successfully. It must start in the `pending_submission` state. Not compatible with ACH, BECS, BECS_NZ and SEPA mandates, which are submitted and activated with their first payment.</li>
<li>`mandate_customer_approval_granted`: Transitions a mandate through to `pending_submission`, as if the customer approved the mandate creation. It must start in the `pending_customer_approval` state. Compatible only with Bacs and SEPA mandates, which support customer signatures on the mandate. All payments associated with the mandate will be transitioned to `pending_submission`. All subscriptions associated with the mandate will become `active`.</li>
<li>`mandate_customer_approval_skipped`: Transitions a mandate through to `pending_submission`, as if the customer skipped the mandate approval during the mandate creation process. It must start in the `pending_customer_approval` state. Compatible only with Bacs and SEPA mandates, which support customer signatures on the mandate. All payments associated with the mandate will be transitioned to `pending_submission`. All subscriptions associated with the mandate will become `active`.</li>
<li>`mandate_failed`: Transitions a mandate through to `failed`, having been submitted to the banks but found to be invalid (for example due to invalid bank details). It must start in the `pending_submission` or `submitted` states. Not compatible with SEPA mandates, which are submitted with their first payment.</li>
<li>`mandate_expired`: Transitions a mandate through to `expired`, having been submitted to the banks, set up successfully and then expired because no collection attempts were made against it for longer than the scheme's dormancy period (13 months for Bacs, 3 years for SEPA, 15 months for ACH, Betalingsservice, and BECS). It must start in the `pending_submission` state. Not compatible with Autogiro, BECS NZ, and PAD mandates, which do not expire.</li>
<li>`mandate_transferred`: Transitions a mandate through to `transferred`, having been submitted to the banks, set up successfully and then moved to a new bank account due to the customer using the UK's Current Account Switching Service (CASS). It must start in the `pending_submission` state. Only compatible with Bacs mandates.</li>
<li>`mandate_transferred_with_resubmission`: Transitions a mandate through `transferred` and resubmits it to the banks, can be caused be the UK's Current Account Switching Service (CASS) or when a customer contacts GoCardless to change their bank details. It must start in the `pending_submission` state. Only compatible with Bacs, SEPA and Autogiro mandates.</li>
<li>`refund_paid`: Transitions a refund to `paid`. It must start in either the `pending_submission` or `submitted` state.</li>
<li>`refund_settled`: Transitions a refund to `paid`, if it's not already, then generates a payout that includes the refund, thereby settling the funds. It must start in one of `pending_submission`, `submitted` or `paid` states.</li>
<li>`refund_bounced`: Transitions a refund to `bounced`. It must start in either the `pending_submission`, `submitted`, or `paid` state.</li>
<li>`refund_returned`: Transitions a refund to `refund_returned`. The refund must start in `pending_submission`.</li>
<li>`payout_bounced`: Transitions a payout to `bounced`. It must start in the `paid` state.</li>
<li>`billing_request_fulfilled`: Authorises the billing request, and then fulfils it. The billing request must be in the `pending` state, with all actions completed except for `bank_authorisation`. Only billing requests with a `payment_request` are supported.</li>
<li>`billing_request_fulfilled_and_payment_failed`: Authorises the billing request, fulfils it, and moves the associated payment to `failed`. The billing request must be in the `pending` state, with all actions completed except for `bank_authorisation`. Only billing requests with a `payment_request` are supported.</li>
<li>`billing_request_fulfilled_and_payment_paid_out`: Authorises the billing request, fulfils it, and moves the associated payment to `paid_out`. The billing request must be in the `pending` state, with all actions completed except for `bank_authorisation`. Only billing requests with a `payment_request` are supported.</li>
</ul>
              params (dict, optional): Request body.

        Returns:
              ScenarioSimulator
        """
        path = self._sub_url_params('/scenario_simulators/:identity/actions/run', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\subscriptions_service.py
Nome: subscriptions_service.py
----------------------------------------
# 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 SubscriptionsService(base_service.BaseService):
    """Service class that provides access to the subscriptions
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.Subscription
    RESOURCE_NAME = 'subscriptions'


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

        Creates a new subscription object

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

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

        try:
          response = self._perform_request('POST', path, params, headers,
                                            retry_failures=True)
        except errors.IdempotentCreationConflictError as err:
          if self.raise_on_idempotency_conflict:
            raise err
          return self.get(identity=err.conflicting_resource_id,
                          params=params,
                          headers=headers)
        return self._resource_for(response)
  

    def list(self,params=None, headers=None):
        """List subscriptions.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        subscriptions.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of Subscription instances
        """
        path = '/subscriptions'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single subscription.

        Retrieves the details of a single subscription.

        Args:
              identity (string): Unique identifier, beginning with "SB".
              params (dict, optional): Query string parameters.

        Returns:
              Subscription
        """
        path = self._sub_url_params('/subscriptions/:identity', {
          
            'identity': identity,
          })
        

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

    def update(self,identity,params=None, headers=None):
        """Update a subscription.

        Updates a subscription object.
        
        This fails with:
        
        - `validation_failed` if invalid data is provided when attempting to
        update a subscription.
        
        - `subscription_not_active` if the subscription is no longer active.
        
        - `subscription_already_ended` if the subscription has taken all
        payments.
        
        - `mandate_payments_require_approval` if the amount is being changed
        and the mandate requires approval.
        
        - `number_of_subscription_amendments_exceeded` error if the
        subscription amount has already been changed 10 times.
        
        - `forbidden` if the amount is being changed, and the subscription was
        created by an app and you are not authenticated as that app, or if the
        subscription was not created by an app and you are authenticated as an
        app
        
        - `resource_created_by_another_app` if the app fee is being changed,
        and the subscription was created by an app other than the app you are
        authenticated as
        

        Args:
              identity (string): Unique identifier, beginning with "SB".
              params (dict, optional): Request body.

        Returns:
              Subscription
        """
        path = self._sub_url_params('/subscriptions/:identity', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {self._envelope_key(): params}

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

    def pause(self,identity,params=None, headers=None):
        """Pause a subscription.

        Pause a subscription object.
        No payments will be created until it is resumed.
        
        This can only be used when a subscription is collecting a fixed number
        of payments (created using `count`),
        when they continue forever (created without `count` or `end_date`) or
        the subscription is already paused for a number of cycles.
        
        When `pause_cycles` is omitted the subscription is paused until the
        [resume endpoint](#subscriptions-resume-a-subscription) is called.
        If the subscription is collecting a fixed number of payments,
        `end_date` will be set to `null`.
        When paused indefinitely, `upcoming_payments` will be empty.
        
        When `pause_cycles` is provided the subscription will be paused for the
        number of cycles requested.
        If the subscription is collecting a fixed number of payments,
        `end_date` will be set to a new value.
        When paused for a number of cycles, `upcoming_payments` will still
        contain the upcoming charge dates.
        
        This fails with:
        
        - `forbidden` if the subscription was created by an app and you are not
        authenticated as that app, or if the subscription was not created by an
        app and you are authenticated as an app
        
        - `validation_failed` if invalid data is provided when attempting to
        pause a subscription.
        
        - `subscription_paused_cannot_update_cycles` if the subscription is
        already paused for a number of cycles and the request provides a value
        for `pause_cycle`.
        
        - `subscription_cannot_be_paused` if the subscription cannot be paused.
        
        - `subscription_already_ended` if the subscription has taken all
        payments.
        
        - `pause_cycles_must_be_greater_than_or_equal_to` if the provided value
        for `pause_cycles` cannot be satisfied.
        

        Args:
              identity (string): Unique identifier, beginning with "SB".
              params (dict, optional): Request body.

        Returns:
              Subscription
        """
        path = self._sub_url_params('/subscriptions/:identity/actions/pause', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def resume(self,identity,params=None, headers=None):
        """Resume a subscription.

        Resume a subscription object.
        Payments will start to be created again based on the subscriptions
        recurrence rules.
        The `charge_date` on the next payment will be the same as the
        subscriptions `earliest_charge_date_after_resume`
        
        This fails with:
        
        - `forbidden` if the subscription was created by an app and you are not
        authenticated as that app, or if the subscription was not created by an
        app and you are authenticated as an app
        
        - `validation_failed` if invalid data is provided when attempting to
        resume a subscription.
        
        - `subscription_not_paused` if the subscription is not paused.
        

        Args:
              identity (string): Unique identifier, beginning with "SB".
              params (dict, optional): Request body.

        Returns:
              Subscription
        """
        path = self._sub_url_params('/subscriptions/:identity/actions/resume', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

    def cancel(self,identity,params=None, headers=None):
        """Cancel a subscription.

        Immediately cancels a subscription; no more payments will be created
        under it. Any metadata supplied to this endpoint will be stored on the
        payment cancellation event it causes.
        
        This will fail with a cancellation_failed error if the subscription is
        already cancelled or finished.

        Args:
              identity (string): Unique identifier, beginning with "SB".
              params (dict, optional): Request body.

        Returns:
              Subscription
        """
        path = self._sub_url_params('/subscriptions/:identity/actions/cancel', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\tax_rates_service.py
Nome: tax_rates_service.py
----------------------------------------
# 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 TaxRatesService(base_service.BaseService):
    """Service class that provides access to the tax_rates
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.TaxRate
    RESOURCE_NAME = 'tax_rates'


    def list(self,params=None, headers=None):
        """List tax rates.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of all
        tax rates.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of TaxRate instances
        """
        path = '/tax_rates'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single tax rate.

        Retrieves the details of a tax rate.

        Args:
              identity (string): The unique identifier created by the jurisdiction, tax type and version
              params (dict, optional): Query string parameters.

        Returns:
              TaxRate
        """
        path = self._sub_url_params('/tax_rates/:identity', {
          
            'identity': identity,
          })
        

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

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\webhooks_service.py
Nome: webhooks_service.py
----------------------------------------
# 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 WebhooksService(base_service.BaseService):
    """Service class that provides access to the webhooks
    endpoints of the GoCardless Pro API.
    """

    RESOURCE_CLASS = resources.Webhook
    RESOURCE_NAME = 'webhooks'


    def list(self,params=None, headers=None):
        """List webhooks.

        Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your
        webhooks.

        Args:
              params (dict, optional): Query string parameters.

        Returns:
              ListResponse of Webhook instances
        """
        path = '/webhooks'
        

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

    def all(self, params=None):
        if params is None:
            params = {}
        return Paginator(self, params)
    
  

    def get(self,identity,params=None, headers=None):
        """Get a single webhook.

        Retrieves the details of an existing webhook.

        Args:
              identity (string): Unique identifier, beginning with "WB".
              params (dict, optional): Query string parameters.

        Returns:
              Webhook
        """
        path = self._sub_url_params('/webhooks/:identity', {
          
            'identity': identity,
          })
        

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

    def retry(self,identity,params=None, headers=None):
        """Retry a webhook.

        Requests for a previous webhook to be sent again

        Args:
              identity (string): Unique identifier, beginning with "WB".
              params (dict, optional): Request body.

        Returns:
              Webhook
        """
        path = self._sub_url_params('/webhooks/:identity/actions/retry', {
          
            'identity': identity,
          })
        
        if params is not None:
            params = {'data': params}
        response = self._perform_request('POST', path, params, headers,
                                         retry_failures=False)
        return self._resource_for(response)
  

========================================

Percorso: C:\Users\Utente\Desktop\gocardless_17\gocardless\gocardless_pro\services\__init__.py
Nome: __init__.py
----------------------------------------
# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

from .bank_authorisations_service import BankAuthorisationsService
from .bank_details_lookups_service import BankDetailsLookupsService
from .billing_requests_service import BillingRequestsService
from .billing_request_flows_service import BillingRequestFlowsService
from .billing_request_templates_service import BillingRequestTemplatesService
from .blocks_service import BlocksService
from .creditors_service import CreditorsService
from .creditor_bank_accounts_service import CreditorBankAccountsService
from .currency_exchange_rates_service import CurrencyExchangeRatesService
from .customers_service import CustomersService
from .customer_bank_accounts_service import CustomerBankAccountsService
from .customer_notifications_service import CustomerNotificationsService
from .events_service import EventsService
from .instalment_schedules_service import InstalmentSchedulesService
from .institutions_service import InstitutionsService
from .mandates_service import MandatesService
from .mandate_imports_service import MandateImportsService
from .mandate_import_entries_service import MandateImportEntriesService
from .mandate_pdfs_service import MandatePdfsService
from .payer_authorisations_service import PayerAuthorisationsService
from .payments_service import PaymentsService
from .payouts_service import PayoutsService
from .payout_items_service import PayoutItemsService
from .redirect_flows_service import RedirectFlowsService
from .refunds_service import RefundsService
from .scenario_simulators_service import ScenarioSimulatorsService
from .subscriptions_service import SubscriptionsService
from .tax_rates_service import TaxRatesService
from .webhooks_service import WebhooksService