def create_curl_command(authorization, payload, command, url, curl_options, show_api_key,
                        content_type='application/json'):
    """
    cURL command generator
    :param authorization: Authorization part e.g Bearer API key
    :param payload: Payload data
    :param command: GET, PUT, etc
    :param url: API url
    :param curl_options: E.g. '-v' for verbose
    :param show_api_key: Showing actual api-key or not
    :param content_type: Content type
    :return: cURL command string
    """
    if show_api_key is False:
        authorization = 'Bearer API_KEY'

    headers = '-H \'Authorization: {}\' -H \'Content-type: {}\''.format(authorization, content_type)

    if payload is not None:
        cc = 'curl {} -d \'{}\' -X {} \'{}\' {}'.format(headers, payload, command.upper(), url, curl_options)
    else:
        cc = 'curl {} -X {} \'{}\' {}'.format(headers, command.upper(), url, curl_options)

    return cc