nebius/SWE-bench-extra huggingface dataset:
Repository: ej2/python-quickbooks

Issue:
Typo in Purchase attribute : self.EnitityRef = None
/quickbooks/objects/purchase.py:65

Should be `self.EntityRef`

Comments:

Patch:
diff --git a/quickbooks/objects/customer.py b/quickbooks/objects/customer.py
index 1bbdeed..0f43bfd 100644
--- a/quickbooks/objects/customer.py
+++ b/quickbooks/objects/customer.py
@@ -57,6 +57,7 @@ class Customer(QuickbooksManagedObject, QuickbooksTransactionEntity):
         self.ResaleNum = ""
         self.Level = 0
         self.OpenBalanceDate = ""
+        self.PrimaryTaxIdentifier = ""
 
         self.BillAddr = None
         self.ShipAddr = None
diff --git a/quickbooks/objects/paymentmethod.py b/quickbooks/objects/paymentmethod.py
index ba4a9eb..dd4da4c 100644
--- a/quickbooks/objects/paymentmethod.py
+++ b/quickbooks/objects/paymentmethod.py
@@ -29,3 +29,6 @@ class PaymentMethod(QuickbooksManagedObject, QuickbooksTransactionEntity):
         ref.name = self.Name
         ref.type = self.qbo_object_name
         ref.value = self.Id
+
+        return ref
+
diff --git a/quickbooks/objects/purchase.py b/quickbooks/objects/purchase.py
index 18fbe9d..853dd67 100644
--- a/quickbooks/objects/purchase.py
+++ b/quickbooks/objects/purchase.py
@@ -62,7 +62,7 @@ class Purchase(DeleteMixin, QuickbooksManagedObject, QuickbooksTransactionEntity
         self.TxnTaxDetail = None
         self.DepartmentRef = None
         self.AccountRef = None
-        self.EnitityRef = None
+        self.EntityRef = None
         self.CurrencyRef = None
         self.PaymentMethodRef = None
         self.RemitToAddr = None


Test patch:
diff --git a/tests/unit/objects/test_paymentmethod.py b/tests/unit/objects/test_paymentmethod.py
index 8016214..5978808 100644
--- a/tests/unit/objects/test_paymentmethod.py
+++ b/tests/unit/objects/test_paymentmethod.py
@@ -17,3 +17,14 @@ class PaymentMethodTests(unittest.TestCase):
         result = client.isvalid_object_name(obj.qbo_object_name)
 
         self.assertTrue(result)
+
+    def test_to_ref(self):
+        obj = PaymentMethod()
+        obj.Name = "test"
+        obj.Id = 12
+
+        ref = obj.to_ref()
+
+        self.assertEquals(ref.name, "test")
+        self.assertEquals(ref.type, "PaymentMethod")
+        self.assertEquals(ref.value, 12)