var taskList = new TaskInsertModel[] { new TaskInsertModel() };
var model = new TransactionCreateRequestModel()
{
EnableLogging = false,
ResponseIncludes = new TransactionIncludesModel()
{
IncludeParticipants = true,
},
Transactions = new TransactionCreateModel[]
{
new TransactionCreateModel()
{
IsTest = true,
ProntoID = "Default",
Description = "Web Services Insert Test",
Participants = new ParticipantInsertModel[]
{
new ParticipantInsertModel()
{
FullName = "John Smith",
EmailAddress = "john.smith@your-domain.com",
SendRequestViaEmail = true,
Tasks = taskList
}
},
Documents = new DocumentInsertModel[]
{
new DocumentInsertModel()
{
Title = "Web Services Insert Test Document",
Source = new SourceModel()
{
FileBytes = System.IO.File.ReadAllBytes(@"c:\myDocument.pdf")
},
Tasks = taskList
}
}
}
}
};
var results = serviceClient.CreateTransactions(GetServiceAuthentication(), model);
if (results.IsSuccessful)
{
//do work...
}
else
{
//handle error
}
Dim taskList = New TaskInsertModel() {New TaskInsertModel()}
Dim model = New TransactionCreateRequestModel() With {
.EnableLogging = False,
.ResponseIncludes = New TransactionIncludesModel() With {
.IncludeParticipants = True
},
.Transactions = New TransactionCreateModel() {New TransactionCreateModel() With {
.IsTest = True,
.ProntoID = "Default",
.Description = "Web Services Insert Test",
.Participants = New ParticipantInsertModel() {New ParticipantInsertModel() With {
.FullName = "John Smith",
.EmailAddress = "john.smith@your-domain.com",
.SendRequestViaEmail = True,
.Tasks = taskList
}},
.Documents = New DocumentInsertModel() {New DocumentInsertModel() With {
.Title = "Web Services Insert Test Document",
.Source = New SourceModel() With {
.FileBytes = System.IO.File.ReadAllBytes("c:\myDocument.pdf")
},
.Tasks = taskList
}}
}}
}
Dim results = serviceClient.CreateTransactions(GetServiceAuthentication(), model)
If Not results.IsSuccessful Then
'do work...
Else
'handle error
End If