@@ -714,6 +714,38 @@ def test_v2_account_verification_create(self):
714714 assert account_verification .url == "v2/account_verifications"
715715 assert account_verification .json .account_number == account_number
716716
717+ def test_v2_customers_list (self ):
718+ """Test getting all customers using v2 API."""
719+ customers = list (self .fintoc .v2 .customers .list ())
720+
721+ assert len (customers ) > 0
722+ for customer in customers :
723+ assert customer .method == "get"
724+ assert customer .url == "v2/customers"
725+
726+ def test_v2_customer_get (self ):
727+ """Test getting a specific customer using v2 API."""
728+ customer_id = "test_customer_id"
729+
730+ customer = self .fintoc .v2 .customers .get (customer_id )
731+
732+ assert customer .method == "get"
733+ assert customer .url == f"v2/customers/{ customer_id } "
734+
735+ def test_v2_customer_create (self ):
736+ """Test creating a customer using v2 API."""
737+ customer_data = {
738+ "name" : "Test Customer" ,
739+ "email" : "test@example.com" ,
740+ }
741+
742+ customer = self .fintoc .v2 .customers .create (** customer_data )
743+
744+ assert customer .method == "post"
745+ assert customer .url == "v2/customers"
746+ assert customer .json .name == customer_data ["name" ]
747+ assert customer .json .email == customer_data ["email" ]
748+
717749 def test_v2_entities_list (self ):
718750 """Test getting all entities using v2 API."""
719751 entities = list (self .fintoc .v2 .entities .list ())
0 commit comments