-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathFlexResponse.cs
64 lines (56 loc) · 1.91 KB
/
FlexResponse.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Copyright © 2023 Textkernel BV. All rights reserved.
// This file is provided for use by, or on behalf of, Textkernel licensees
// within the terms of their license of Textkernel products or Textkernel customers
// within the Terms of Service pertaining to the Textkernel SaaS products.
using System.Collections.Generic;
namespace Textkernel.Tx.Models.API.Parsing
{
/// <summary>
/// Information about the FlexRequests transaction, if any were provided.
/// </summary>
public class FlexResponse
{
/// <summary>
/// See <see href="https://developer.textkernel.com/tx-platform/v10/overview/#http-status-codes"/>
/// </summary>
public string Code { get; set; }
/// <summary>
/// A short human-readable description explaining the <see cref="Code"/> value
/// </summary>
public string Message { get; set; }
/// <summary>
/// Responses to FlexRequests
/// </summary>
public List<FlexResponseItem> Responses { get; set; }
internal bool IsSuccess
{
get
{
switch (Code)
{
case "Success":
return true;
}
return false;
}
}
}
/// <summary>
/// Responses to FlexRequests
/// </summary>
public class FlexResponseItem
{
/// <summary>
/// Unique field name assigned to the respective FlexRequest
/// </summary>
public string Identifier { get; set; }
/// <summary>
/// Reply to the FlexRequest Prompt
/// </summary>
public string Reply { get; set; }
/// <summary>
/// List of replies to the FlexRequest Prompt if the FlexRequest had a <see cref="FlexRequestDataType.List"/> DataType
/// </summary>
public List<string> ReplyList { get; set; }
}
}