# Path: pycounter/sushi5.py
# DEPRECATED_KEYS = {"requestor_email", "requestor_name", "customer_name"}
# def _dates_from_filters(filters):
#     def update_case_insensitive(name):
# def _get_identifiers(item):
# def raw_to_full(raw_report):
# def get_status(url: str) -> str:
# def get_sushi_stats_raw(
#     wsdl_url=None,
#     start_date=None,
#     end_date=None,
#     requestor_id=None,
#     customer_reference=None,
#     report="TR_J1",
#     release=5,
#     sushi_dump=False,
#     verify=True,
#     url=None,
#     api_key=None,
#     **kwargs,
# ):
# def _check_params(kwargs, release):
# 
# Path: pycounter/helpers.py
# def convert_date_run(datestring):
#     """
#     Convert a date of the format 'YYYY-MM-DD' to a datetime.date object.
# 
#     (Will also accept MM/DD/YYYY format, ISO 8601 timestamps, or existing
#     datetime objects; these shouldn't be in COUNTER reports, but they
#     do show up in real world data...)
# 
#     :param datestring: the string to convert to a date.
# 
#     :return: datetime.date object
# 
#     """
#     if isinstance(datestring, datetime.date):
#         return datestring
# 
#     return pendulum.parse(datestring, strict=False).date()


import collections
import datetime
import logging
import time
import uuid
import warnings
import pendulum
import requests
import pycounter.constants
import pycounter.exceptions
import pycounter.report
from lxml import etree
from lxml import objectify
from pycounter import sushi5
from pycounter.helpers import convert_date_run

    response = requests.post(
        url=wsdl_url, headers=headers, data=payload, verify=verify, **extra_params
    )

    if sushi_dump:
        logger.debug(
            "SUSHI DUMP: request: %s \n\n response: %s", payload, response.content
        )
    return response.content


def get_status(url: str, release: int) -> str:
    """Request SUSHI server status."""
    if release != 5:
        raise NotImplementedError(f"Status for COUNTER {release} is not implemented.")

    return sushi5.get_status(url)


def get_report(*args, **kwargs):
    """Get a usage report from a SUSHI server.

    returns a :class:`pycounter.report.CounterReport` object.

    parameters: see get_sushi_stats_raw

    :param no_delay: don't delay in retrying Report Queued
    """
    if kwargs.get("release") == 5:

# Path: pycounter/sushi5.py
# DEPRECATED_KEYS = {"requestor_email", "requestor_name", "customer_name"}
# def _dates_from_filters(filters):
#     def update_case_insensitive(name):
# def _get_identifiers(item):
# def raw_to_full(raw_report):
# def get_status(url: str) -> str:
# def get_sushi_stats_raw(
#     wsdl_url=None,
#     start_date=None,
#     end_date=None,
#     requestor_id=None,
#     customer_reference=None,
#     report="TR_J1",
#     release=5,
#     sushi_dump=False,
#     verify=True,
#     url=None,
#     api_key=None,
#     **kwargs,
# ):
# def _check_params(kwargs, release):
# 
# Path: pycounter/helpers.py
# def convert_date_run(datestring):
#     """
#     Convert a date of the format 'YYYY-MM-DD' to a datetime.date object.
# 
#     (Will also accept MM/DD/YYYY format, ISO 8601 timestamps, or existing
#     datetime objects; these shouldn't be in COUNTER reports, but they
#     do show up in real world data...)
# 
#     :param datestring: the string to convert to a date.
# 
#     :return: datetime.date object
# 
#     """
#     if isinstance(datestring, datetime.date):
#         return datestring
# 
#     return pendulum.parse(datestring, strict=False).date()


# Path: pycounter/sushi.py
import collections
import datetime
import logging
import time
import uuid
import warnings
import pendulum
import requests
import pycounter.constants
import pycounter.exceptions
import pycounter.report
from lxml import etree
from lxml import objectify
from pycounter import sushi5
from pycounter.helpers import convert_date_run


    response = requests.post(
        url=wsdl_url, headers=headers, data=payload, verify=verify, **extra_params
    )

    if sushi_dump:
        logger.debug(
            "SUSHI DUMP: request: %s \n\n response: %s", payload, response.content
        )
    return response.content


def get_status(url: str, release: int) -> str:
    """Request SUSHI server status."""
    if release != 5:
        raise NotImplementedError(f"Status for COUNTER {release} is not implemented.")

    return sushi5.get_status(url)


def get_report(*args, **kwargs):
    """Get a usage report from a SUSHI server.

    returns a :class:`pycounter.report.CounterReport` object.

    parameters: see get_sushi_stats_raw

    :param no_delay: don't delay in retrying Report Queued
    """
    if kwargs.get("release") == 5:

        gssr = sushi5.get_sushi_stats_raw