XERO API员工分类缺失

问题描述

我正在使用XERO Python库来获取员工数据。我已经成功恢复了基本的员工数据,但是即使我可以在Web UI中看到该信息,似乎敏感的任何事情都会返回None

具体地说,我正在尝试获取员工的classification值。

Screenshot of Web UI

但是API似乎正在删除任何半敏感/个人数据:

{'employees': [{'bank_accounts': None,'classification': None,'date_of_birth': datetime.date(1984,1,26),'gender': 'M',...
                'home_address': None,'start_date': datetime.date(2018,8,24),'status': <EmployeeStatus.ACTIVE: 'ACTIVE'>,'super_memberships': None,'tax_declaration': None,'termination_date': None,'title': None,'twitter_user_name': None,'updated_date_utc': datetime.datetime(2020,9,2,32,26,tzinfo=tzutc()),'validation_errors': None}]}

我在OAuth中设置了范围,以包括payroll.employees payroll.timesheets payroll.settings

我缺少通过API返回完整数据的什么功能

解决方法

这可能在回购中作为问题得到更好的解决。

https://github.com/XeroAPI/xero-python

还有一个示例应用程序,在复制或修复问题方面可能会显示一些有用的信息。

https://github.com/XeroAPI/xero-python-oauth2-app