"""
MONEI API v1

The MONEI API is organized around REST principles. Our API is designed to be intuitive and developer-friendly.  ### Base URL  All API requests should be made to:  ``` https://api.monei.com/v1 ```  ### Environment  MONEI provides two environments:  - **Test Environment**: For development and testing without processing real payments - **Live Environment**: For processing real transactions in production  ### Client Libraries  We provide official SDKs to simplify integration:  - [PHP SDK](https://github.com/MONEI/monei-php-sdk) - [Python SDK](https://github.com/MONEI/monei-python-sdk) - [Node.js SDK](https://github.com/MONEI/monei-node-sdk) - [Postman Collection](https://postman.monei.com/)  Our SDKs handle authentication, error handling, and request formatting automatically.  You can download the OpenAPI specification from the https://js.monei.com/api/v1/openapi.json and generate your own client library using the [OpenAPI Generator](https://openapi-generator.tech/).  ### Important Requirements  - All API requests must be made over HTTPS - If you are not using our official SDKs, you **must provide a valid `User-Agent` header** with each request - Requests without proper authentication will return a `401 Unauthorized` error  ### Error Handling  The API returns consistent error codes and messages to help you troubleshoot issues. Each response includes a `statusCode` attribute indicating the outcome of your request.  ### Rate Limits  The API implements rate limiting to ensure stability. If you exceed the limits, requests will return a `429 Too Many Requests` status code.   # noqa: E501

The version of the OpenAPI document: 1.7.4
Generated by: https://openapi-generator.tech
"""

import sys
import unittest
from datetime import datetime

import Monei
from Monei.model.apple_pay_certificate import ApplePayCertificate


class TestApplePayCertificate(unittest.TestCase):
    """ApplePayCertificate unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def testApplePayCertificate(self):
        """Test ApplePayCertificate"""
        model = ApplePayCertificate(
            id="cert_123456789",
            account_id="acc_123456789",
            active=True,
            created_at=datetime.now(),
        )
        self.assertEqual(model.id, "cert_123456789")
        self.assertEqual(model.account_id, "acc_123456789")
        self.assertTrue(model.active)
        self.assertIsInstance(model.created_at, datetime)

    def testApplePayCertificateWithOptionalFields(self):
        """Test ApplePayCertificate with optional fields"""
        expire_at = datetime.now()
        model = ApplePayCertificate(
            id="cert_123456789",
            account_id="acc_123456789",
            active=True,
            created_at=datetime.now(),
            csr="base64url_encoded_csr",
            cert="base64_encoded_cert",
            expire_at=expire_at,
        )
        self.assertEqual(model.csr, "base64url_encoded_csr")
        self.assertEqual(model.cert, "base64_encoded_cert")
        self.assertEqual(model.expire_at, expire_at)


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