Subversion Repository Public Repository

ChrisCompleteCodeTrunk

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
65
using System;
using Newtonsoft.Json;
using System.M3Workflow.Data.Base;

/*
 * {    
	"invoice" : { 
		"id": "<GUID>", /* not null
        "vendorId": "<GUID>", /* not null 
		"companyId": "<GUID>",  /* not null 
		"propertyId": "<GUID>", /* not null 
		"invoiceNo" : "<STRING>", /* limit 25 chracters
		"amount" : "<DECIMAL>", /* not null 
		"recurring" : "<BOOLEAN>", /* not null 
		"pONo" : "<STRING>", /* limit 15 chracters */ /* null 
		"description" : "<STRING>", /* limit 100 chracters */ /* null 
		"transmitDate" : "<DATETIME>", /* null 
		"acctPeriod" : "<STRING>", /* limit 10 chracters */ /* null 
		"posted" : "<BOOLEAN>", /* not null 
		"hasImages" : "<BOOLEAN>",		
"invoiceDetail" : [
			{
				"account" : "<STRING>",
				"amount" : "<DECIMAL>",
				"capital" : "<BOOLEAN>",
				"order" : "<INT>",
				"description" : "<STRING>" /* not required 				
			},
			{
				"account" : "<STRING>",
				"amount" : "<DECIMAL>",
				"capital" : "<BOOLEAN>",
                "order" : "<INT>",
				"description" : "<STRING>" /* not required 				
			 }
            			/* etc ..            
		]
    	}
}



 *
 */ 

namespace M3Workflow.Data
{
    class InvoiceObject
    {
        [JsonProperty(Order = 1, PropertyName = "id", Required = Required.Always)]
        public Guid Id { get; set; }

        [JsonProperty(Order = 1, PropertyName = "vendorid", Required = Required.Always)]
        public Guid VendorId { get; set; }

        [JsonProperty(Order = 1, PropertyName = "companyid", Required = Required.Always)]
        public Guid CompanyId { get; set; }

        [JsonProperty(Order = 1, PropertyName = "propertyid", Required = Required.Always)]
        public Guid PropertyId { get; set; }

        var i = invoiceNo == null ? string.Empty
        : invoiceNo.Substring(0, Math.Min(25, invoiceNo.Length));
    }
}

Commits for ChrisCompleteCodeTrunk/M3Workflow/M3Workflow.Data/Base/Class1.cs

Diff revisions: vs.
Revision Author Commited Message
1 BBDSCHRIS picture BBDSCHRIS Wed 22 Aug, 2018 20:08:03 +0000