Workday API - модуль расчета заработной платы - установка объекта Payee_Response_GroupType не возвращает элементы данных
Все,
Я пытался использовать API рабочего дня для возврата данных о моих сотрудниках по расчету заработной платы. Я создал ссылку на службу для конечной точки (USPayrollWeb). Я считаю, что устанавливаю всю необходимую информацию. Мой пример кода прилагается. Если я не включу Payee_Response_GroupType в свой запрос. Я получаю обратно коллекцию идентификаторов ссылок.
Dim oService As New USPayrollWeb.Payroll_InterfacePortClient()
oService.Endpoint.Address = New EndpointAddress(_ServiceURL)
oService.ClientCredentials.UserName.UserName = _UserName
oService.ClientCredentials.UserName.Password = _Password
Dim oHeader As Workday_Common_HeaderType = New Workday_Common_HeaderType()
oHeader.Include_Reference_Descriptors_In_Response = True
Dim myRequest As New USPayrollWeb.Get_Payees_RequestType
Dim myResponse As New USPayrollWeb.Get_Payees_ResponseType
Dim oRestCriteria As Payee_Request_CriteriaType = New Payee_Request_CriteriaType
oRestCriteria.Use_Pay_Period_for_Payroll_Input_Start_and_End_Date = True
Dim oPayGroupObjectIDType As New Pay_GroupObjectIDType
oPayGroupObjectIDType.type = "Organization_Reference_ID"
oPayGroupObjectIDType.Value = "US_Monthly"
Dim oPayGroupObjectType As New Pay_GroupObjectType()
oPayGroupObjectType.ID = New Pay_GroupObjectIDType() {oPayGroupObjectIDType}
Dim oPayeeResponseFilter As USPayrollWeb.Payee_Response_FilterType = New USPayrollWeb.Payee_Response_FilterType
oPayeeResponseFilter.As_Of_Effective_Date = "2019-11-30-07:00"
oPayeeResponseFilter.As_Of_Entry_DateTime = "2019-12-02T05:55:00.088-07:00"
oPayeeResponseFilter.Page = 1
oPayeeResponseFilter.Count = 999
oPayeeResponseFilter.PageSpecified = True
oPayeeResponseFilter.CountSpecified = True
Dim oResponseDateRange As Response_Date_Range_FilterType = New Response_Date_Range_FilterType
oResponseDateRange.Begin_Effective_Date = "2019-11-01-07:00"
oResponseDateRange.Begin_Entry_DateTime = "2019-11-01T05:07:14.000-07:00"
Dim oResponseGroup As Payee_Response_GroupType = New Payee_Response_GroupType
With oResponseGroup
.Include_Reference = True
.Include_Contracts_for_Terminated_Workers = False
.Include_External_Pay_Group_Data = False
.Exclude_Payee_Organization_Support_Role_Data = True
.Include_Period_Content_Data = False
.Include_Payee_Personal_Information = True
.Exclude_Payee_Detailed_Identification_Information = False
.Include_Payee_Additional_Job_Data = True
.Include_Payee_Compensation_Information = True
.Exclude_Payee_Detailed_Compensation_Information = False
.Include_Payee_Organizations_Information = True
.Exclude_Payee_Location_Hierarchies = False
.Exclude_Payee_Cost_Centers = False
.Exclude_Payee_Cost_Center_Hierarchies = False
.Exclude_Payee_Companies = False
.Exclude_Payee_Company_Hierarchies = False
.Exclude_Payee_Matrix_Organizations = False
.Exclude_Payee_Pay_Groups = False
.Exclude_Payee_Regions = False
.Exclude_Payee_Region_Hierarchies = False
.Exclude_Payee_Supervisory_Organizations = False
.Exclude_Payee_Teams = False
.Exclude_Custom_Organizations = False
.Include_Payment_Election_Data = True
.Include_Pay_Component_Compensation_Data = False
.Include_Pay_Component_Benefit_Plan_Data = False
.Include_Pay_Component_Benefit_Group_Coverage_Data = False
.Include_Pay_Component_Time_Off_Data = False
.Include_Pay_Component_Payroll_Input_Data = False
.Include_Payee_Earnings_and_Deductions_Summary_Data = True
.Include_Payee_Status_Data = True
.Include_Pay_Component_Period_Time_Tracking_Summary_Data = True
.Include_Pay_Component_Time_Off_Entries_Detail_Data = True
.Include_Payee_Compensation_Prorated_Amount = True
.Include_Payee_Compensation_One_Time_Payment_Rescind_and_Corrects = True
.Include_Payee_Compensation_FTE_Change_Date = True
.Include_Pay_Component_Time_Off_Adjustment_Data = True
.Unrounded_Time_Tracking_Calculated_Quantities = False
End With
'Assign to object and call.
oRestCriteria.Pay_Group_Reference = oPayGroupObjectType
myRequest.Request_Criteria = oRestCriteria
myRequest.Response_Date_Range_Filter = oResponseDateRange
myRequest.Response_Filter = oPayeeResponseFilter
'если я закомментирую следующее присвоение response_group, я получу коллекцию "Response_data", однако при создании объекта все установлено как false.
myRequest.Response_Group = oResponseGroup
'Если я включу его, я не получу возвращенную коллекцию response_data. myRequest.version = "v32.2"
Try
myResponse = oService.Get_Payees(oHeader, myRequest)