EDMIService: WIP

This commit is contained in:
Jonathan Jenne
2021-12-07 16:37:23 +01:00
parent 6be8b1bdb5
commit 2a6fd3555b
20 changed files with 498 additions and 364 deletions

View File

@@ -179,11 +179,19 @@ Public Class Client
End Try
End Function
Public Async Function ImportFileAsync(pFilePath As String, pObjectStoreName As String, pObjectKind As String, pBusinessEntity As String, Optional pImportOptions As Options.NewFileOptions = Nothing) As Task(Of Long)
Public Async Function ImportFileAsync(
pFilePath As String,
pProfileId As Integer,
pAttributeValues As List(Of UserAttributeValue),
pObjectStoreName As String,
pObjectKind As String,
pBusinessEntity As String,
Optional pImportOptions As Options.ImportFileOptions = Nothing
) As Task(Of Long)
Try
' Set default options
If pImportOptions Is Nothing Then
pImportOptions = New Options.NewFileOptions()
pImportOptions = New Options.ImportFileOptions()
End If
' Check if file exists
@@ -221,7 +229,9 @@ Public Class Client
.User = New UserState() With {
.UserName = pImportOptions.Username,
.Language = pImportOptions.Language
}
},
.ProfileId = pProfileId,
.AttributeValues = pAttributeValues.ToArray
})
If oFileImportResponse.OK = False Then
Throw New ApplicationException("Could not Import File Contents!")