# coding: utf-8

"""
    Conekta API

    Conekta sdk  # noqa: E501

    The version of the OpenAPI document: 2.1.0
    Contact: engineering@conekta.com
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import unittest

import conekta
from conekta import ApiClient
from conekta.api.webhook_keys_api import WebhookKeysApi  # noqa: E501
from conekta.rest import ApiException
from test.test_utils import get_base_path


class TestWebhookKeysApi(unittest.TestCase):
    """WebhookKeysApi unit test stubs"""

    def setUp(self):
        self.api = conekta.api.webhook_keys_api.WebhookKeysApi(ApiClient(
            configuration=conekta.Configuration(host=get_base_path())
        ))  # noqa: E501

    def tearDown(self):
        pass

    def test_create_webhook_key(self):
        """Test case for create_webhook_key

        Create Webhook Key  # noqa: E501
        """
        accept_language = 'es'
        rq = conekta.WebhookKeyRequest(
            active=True
        )
        response = self.api.create_webhook_key(accept_language, rq)
        self.assertIsNotNone(response)

    def test_delete_webhook_key(self):
        """Test case for delete_webhook_key

        Delete Webhook key  # noqa: E501
        """
        accept_language = 'es'
        response = self.api.delete_webhook_key('645a59da22e7da0001cad283', accept_language)
        self.assertIsNotNone(response)

    def test_get_webhook_key(self):
        """Test case for get_webhook_key

        Get Webhook Key  # noqa: E501
        """
        accept_language = 'es'
        response = self.api.get_webhook_key('645a5eb022e7da0001cad2a4', accept_language)
        self.assertIsNotNone(response)

    def test_get_webhook_keys(self):
        """Test case for get_webhook_keys

        Get List of Webhook Keys  # noqa: E501
        """
        accept_language = 'es'
        response = self.api.get_webhook_keys(accept_language, limit=2)
        self.assertIsNotNone(response)

    def test_update_webhook_key(self):
        """Test case for update_webhook_key

        Update Webhook Key  # noqa: E501
        """
        accept_language = 'es'
        rq = conekta.WebhookKeyUpdateRequest(
            active=False
        )
        response = self.api.update_webhook_key('645a613622e7da0001cad882', accept_language, rq)
        self.assertIsNotNone(response)


if __name__ == '__main__':
    unittest.main()
