# Path: paystackapi/tests/base_test_case.py
# class BaseTestCase(unittest.TestCase):
# 		
# 	def endpoint_url(self, path):
# 		if path[0] == '/':
# 			return 'https://api.paystack.co{}'.format(path)
# 		return 'https://api.paystack.co/{}'.format(path)
# 
# Path: paystackapi/charge.py
# class Charge(PayStackBase):
#     """docstring for Charge."""
# 
#     @classmethod
#     def start_charge(cls, **kwargs):
#         """
#         Start a charge.
# 
#         Args:
#             email: Customer's email address
#             amount: Amount in kobo
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('charge', data=kwargs,)
# 
#     @classmethod
#     def submit_pin(cls, **kwargs):
#         """
#         Submit PIN to continue a charge.
# 
#         Args:
#             pin: PIN submitted by user
#             reference: reference for transaction that requested pin
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('charge/submit_pin', data=kwargs,)
# 
#     @classmethod
#     def submit_otp(cls, **kwargs):
#         """
#         Submit OTP to complete a charge.
# 
#         Args:
#             otp: OTP submitted by user
#             reference: reference for ongoing transaction
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('charge/submit_otp', data=kwargs,)
#     
#     @classmethod
#     def submit_phone(cls, **kwargs):
#         """
#         Submit Phone when requested.
# 
#         Args:
#             phone: Phone submitted by user
#             reference: reference for ongoing transaction
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('charge/submit_phone', data=kwargs,)
# 
#     @classmethod
#     def submit_birthday(cls, **kwargs):
#         """
#         Submit Birthday when requested.
# 
#         Args:
#             birthday: Birthday submitted by user
#             reference: reference for ongoing transaction
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('charge/submit_birthday', data=kwargs,)
# 
#     @classmethod
#     def check_pending(cls, reference):
#         """
#         Check pending charge
# 
#         Args:
#             reference: The reference to check
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.get(f"charge/{reference}")


import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.charge import Charge
            metadata={
                "custom_fields": [
                    {
                        "value":"makurdi",
                        "display_name": "Donation for",
                        "variable_name": "donation_for"
                    },
                ],
            },
            bank={
                "code":"057",
                "account_number":"0000000000"
            },
            birthday="1995-12-23"
        )

        self.assertTrue(response['status'])

    @httpretty.activate
    def test_submit_pin(self):
        """Method defined to test submit pin."""

        httpretty.register_uri(
            httpretty.POST,
            self.endpoint_url("/charge/submit_pin"),
            content_type='text/json',
            body='{"status": true, "message": "Charge attempted"}',
            status=201,
        )


# Path: paystackapi/tests/base_test_case.py
# class BaseTestCase(unittest.TestCase):
# 		
# 	def endpoint_url(self, path):
# 		if path[0] == '/':
# 			return 'https://api.paystack.co{}'.format(path)
# 		return 'https://api.paystack.co/{}'.format(path)
# 
# Path: paystackapi/charge.py
# class Charge(PayStackBase):
#     """docstring for Charge."""
# 
#     @classmethod
#     def start_charge(cls, **kwargs):
#         """
#         Start a charge.
# 
#         Args:
#             email: Customer's email address
#             amount: Amount in kobo
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('charge', data=kwargs,)
# 
#     @classmethod
#     def submit_pin(cls, **kwargs):
#         """
#         Submit PIN to continue a charge.
# 
#         Args:
#             pin: PIN submitted by user
#             reference: reference for transaction that requested pin
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('charge/submit_pin', data=kwargs,)
# 
#     @classmethod
#     def submit_otp(cls, **kwargs):
#         """
#         Submit OTP to complete a charge.
# 
#         Args:
#             otp: OTP submitted by user
#             reference: reference for ongoing transaction
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('charge/submit_otp', data=kwargs,)
#     
#     @classmethod
#     def submit_phone(cls, **kwargs):
#         """
#         Submit Phone when requested.
# 
#         Args:
#             phone: Phone submitted by user
#             reference: reference for ongoing transaction
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('charge/submit_phone', data=kwargs,)
# 
#     @classmethod
#     def submit_birthday(cls, **kwargs):
#         """
#         Submit Birthday when requested.
# 
#         Args:
#             birthday: Birthday submitted by user
#             reference: reference for ongoing transaction
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('charge/submit_birthday', data=kwargs,)
# 
#     @classmethod
#     def check_pending(cls, reference):
#         """
#         Check pending charge
# 
#         Args:
#             reference: The reference to check
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.get(f"charge/{reference}")


# Path: paystackapi/tests/test_charge.py
import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.charge import Charge

            metadata={
                "custom_fields": [
                    {
                        "value":"makurdi",
                        "display_name": "Donation for",
                        "variable_name": "donation_for"
                    },
                ],
            },
            bank={
                "code":"057",
                "account_number":"0000000000"
            },
            birthday="1995-12-23"
        )

        self.assertTrue(response['status'])

    @httpretty.activate
    def test_submit_pin(self):
        """Method defined to test submit pin."""

        httpretty.register_uri(
            httpretty.POST,
            self.endpoint_url("/charge/submit_pin"),
            content_type='text/json',
            body='{"status": true, "message": "Charge attempted"}',
            status=201,
        )


        response = Charge.submit_pin(