EDMIService: WIP
This commit is contained in:
@@ -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!")
|
||||
|
||||
@@ -25,6 +25,15 @@
|
||||
Public Property DateImported As Date = Date.Now
|
||||
End Class
|
||||
|
||||
Public Class ImportFileOptions
|
||||
Inherits BaseOptions
|
||||
|
||||
''' <summary>
|
||||
''' Date when the file was imported. Can be in the past. Defaults to now.
|
||||
''' </summary>
|
||||
Public Property DateImported As Date = Date.Now
|
||||
End Class
|
||||
|
||||
Public Class GetVariableValueOptions
|
||||
Inherits BaseOptions
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user