# 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/customer.py
# class Customer(PayStackBase):
#     """docstring for Customer."""
# 
#     @classmethod
#     def create(cls, **kwargs):
#         """
#         Function defined to create customer.
# 
#         Args:
#             first_name: customer's first name.
#             last_name: customer's last name.
#             email: customer's email address.
#             phone:customer's phone number.
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('customer', data=kwargs,)
# 
#     @classmethod
#     def get(cls, customer_id):
#         """
#         Static method defined to get customers by id.
# 
#         Args:
#             customer_id: paystack customer id.
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.get(f"customer/{customer_id}")
# 
#     @classmethod
#     def list(cls):
#         """
#         Static method defined to list paystack customers.
# 
#         Args:
#             No argument required.
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.get('customer')
# 
#     @classmethod
#     def update(cls, customer_id, **kwargs):
#         """
#         Static method defined to update paystack customer data by id.
# 
#         Args:
#             customer_id: paystack customer id.
#             first_name: customer's first name(optional).
#             last_name: customer's last name(optional).
#             email: customer's email address(optional).
#             phone:customer's phone number(optional).
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.put(f"customer/{customer_id}", data=kwargs,)


import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.customer import Customer
        response = Customer.create(
            first_name='samuel', last_name='james',
            email='johndoe@andela.com', phone='00000000000')
        self.assertTrue(response['status'])

    @httpretty.activate
    def test_get(self):
        """Method defined to test Customer get."""
        httpretty.register_uri(
            httpretty.GET,
            self.endpoint_url("/customer/4013"),
            content_type='text/json',
            body='{"status": true, "contributors": true}',
            status=201,
        )

        response = Customer.get(customer_id=4013)
        self.assertEqual(response['status'], True)

    @httpretty.activate
    def test_list(self):
        """Method defined to test paystackapi customer list."""
        httpretty.register_uri(
            httpretty.GET,
            self.endpoint_url("/customer"),
            content_type='text/json',
            body='{"status": true, "contributors": true}',
            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/customer.py
# class Customer(PayStackBase):
#     """docstring for Customer."""
# 
#     @classmethod
#     def create(cls, **kwargs):
#         """
#         Function defined to create customer.
# 
#         Args:
#             first_name: customer's first name.
#             last_name: customer's last name.
#             email: customer's email address.
#             phone:customer's phone number.
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('customer', data=kwargs,)
# 
#     @classmethod
#     def get(cls, customer_id):
#         """
#         Static method defined to get customers by id.
# 
#         Args:
#             customer_id: paystack customer id.
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.get(f"customer/{customer_id}")
# 
#     @classmethod
#     def list(cls):
#         """
#         Static method defined to list paystack customers.
# 
#         Args:
#             No argument required.
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.get('customer')
# 
#     @classmethod
#     def update(cls, customer_id, **kwargs):
#         """
#         Static method defined to update paystack customer data by id.
# 
#         Args:
#             customer_id: paystack customer id.
#             first_name: customer's first name(optional).
#             last_name: customer's last name(optional).
#             email: customer's email address(optional).
#             phone:customer's phone number(optional).
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.put(f"customer/{customer_id}", data=kwargs,)


# Path: paystackapi/tests/test_customer.py
import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.customer import Customer

        response = Customer.create(
            first_name='samuel', last_name='james',
            email='johndoe@andela.com', phone='00000000000')
        self.assertTrue(response['status'])

    @httpretty.activate
    def test_get(self):
        """Method defined to test Customer get."""
        httpretty.register_uri(
            httpretty.GET,
            self.endpoint_url("/customer/4013"),
            content_type='text/json',
            body='{"status": true, "contributors": true}',
            status=201,
        )

        response = Customer.get(customer_id=4013)
        self.assertEqual(response['status'], True)

    @httpretty.activate
    def test_list(self):
        """Method defined to test paystackapi customer list."""
        httpretty.register_uri(
            httpretty.GET,
            self.endpoint_url("/customer"),
            content_type='text/json',
            body='{"status": true, "contributors": true}',
            status=201,
        )


        response = Customer.list()