/
GetRecordAsHtmlPayload.cs
48 lines (42 loc) · 1.26 KB
/
GetRecordAsHtmlPayload.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
/*
* Copyright © 2010 Intuit Inc. All rights reserved.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.opensource.org/licenses/eclipse-1.0.php
*/
using System;
using System.Text;
namespace Intuit.QuickBase.Core.Payload
{
internal class GetRecordAsHtmlPayload : Payload
{
private int _rid;
internal GetRecordAsHtmlPayload(int rid, bool jht)
: this(rid)
{
Jht = jht;
}
internal GetRecordAsHtmlPayload(int rid)
{
Rid = rid;
}
private int Rid
{
get { return _rid; }
set
{
if (value < 1) throw new ArgumentException("rid");
_rid = value;
}
}
private bool Jht { get; set; }
internal override string GetXmlPayload()
{
var sb = new StringBuilder();
sb.Append(String.Format("<rid>{0}</rid>", Rid));
sb.Append(Jht ? "<jht>" + "1" + "</jht>" : String.Empty);
return sb.ToString();
}
}
}