You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The Xero API returned a contact with tax_number_type set to "TAXNUMBERTYPE/SSN", but the Python SDK only accepts these exact values: 'SSN' 'EIN' 'ITIN' 'ATIN' 'None' #205
I have been forced to monkey patch the SDK. Xero team can contact me to get the Tenant ID that generates this error.
original_setter = contact.Contact.tax_number_type.fset
def patched_setter(self, tax_number_type):
"""Setter that handles malformed tax_number_type from Xero API."""
if tax_number_type and isinstance(tax_number_type, str) and "TAXNUMBERTYPE/" in tax_number_type:
tax_number_type = tax_number_type.replace("TAXNUMBERTYPE/", "")
original_setter(self, tax_number_type)
Activity
github-actions commentedon Jan 12, 2026
PETOSS-883
github-actions commentedon Jan 12, 2026
Thanks for raising an issue, a ticket has been created to track your request