-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInvoice.cs
More file actions
152 lines (133 loc) · 4.46 KB
/
Invoice.cs
File metadata and controls
152 lines (133 loc) · 4.46 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
using System.Text.Json.Serialization;
namespace QuickBooks_CustomFields_API.Models
{
public class Invoice
{
public string? Id { get; set; }
public string? SyncToken { get; set; }
public string? DocNumber { get; set; }
public string? TxnDate { get; set; }
public string? DueDate { get; set; }
public decimal TotalAmt { get; set; }
public decimal Balance { get; set; }
public CustomerRef? CustomerRef { get; set; }
public List<InvoiceLine>? Line { get; set; }
public List<CustomFieldValue>? CustomField { get; set; }
public CustomerMemo? CustomerMemo { get; set; }
}
public class CustomerRef
{
public string? Value { get; set; }
public string? Name { get; set; }
}
public class InvoiceLine
{
public string? Id { get; set; }
public decimal Amount { get; set; }
public string? DetailType { get; set; }
public string? Description { get; set; }
public SalesItemLineDetail? SalesItemLineDetail { get; set; }
}
public class SalesItemLineDetail
{
public ItemRef? ItemRef { get; set; }
public decimal Qty { get; set; }
public decimal UnitPrice { get; set; }
}
public class ItemRef
{
public string? Value { get; set; }
public string? Name { get; set; }
}
public class CustomFieldValue
{
public string? DefinitionId { get; set; }
public string? StringValue { get; set; }
public object? NumberValue { get; set; }
public string? DateValue { get; set; }
public string? Type { get; set; }
public string? Name { get; set; }
}
public class CustomerMemo
{
public string? Value { get; set; }
}
public class Customer
{
public string? Id { get; set; }
public string? DisplayName { get; set; }
public string? GivenName { get; set; }
public string? FamilyName { get; set; }
public string? CompanyName { get; set; }
public bool Active { get; set; }
}
public class QuickBooksInvoiceQueryResponse
{
public InvoiceQueryResponse? QueryResponse { get; set; }
}
public class InvoiceQueryResponse
{
public List<Invoice>? Invoice { get; set; }
public int MaxResults { get; set; }
public int StartPosition { get; set; }
}
public class QuickBooksCustomerQueryResponse
{
public CustomerQueryResponse? QueryResponse { get; set; }
}
public class CustomerQueryResponse
{
public List<Customer>? Customer { get; set; }
public int MaxResults { get; set; }
public int StartPosition { get; set; }
}
public class QuickBooksInvoiceResponse
{
public Invoice? Invoice { get; set; }
public string? Time { get; set; }
}
public class InvoiceCreateRequest
{
public string? InvoiceId { get; set; }
public string? SyncToken { get; set; }
public string CustomerId { get; set; } = string.Empty;
public string InvoiceDate { get; set; } = string.Empty;
public string? DueDate { get; set; }
public List<InvoiceLineItem> LineItems { get; set; } = new List<InvoiceLineItem>();
public List<InvoiceCustomField>? CustomFields { get; set; }
public string? Notes { get; set; }
}
public class InvoiceCustomField
{
public string DefinitionId { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
public string DataType { get; set; } = "STRING";
}
public class InvoiceLineItem
{
public string? LineId { get; set; }
public string ItemId { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public decimal Quantity { get; set; }
public decimal UnitPrice { get; set; }
public decimal Amount { get; set; }
}
public class Item
{
public string? Id { get; set; }
public string? Name { get; set; }
public string? Type { get; set; }
public decimal UnitPrice { get; set; }
public bool Active { get; set; }
}
public class QuickBooksItemQueryResponse
{
public ItemQueryResponse? QueryResponse { get; set; }
}
public class ItemQueryResponse
{
public List<Item>? Item { get; set; }
public int MaxResults { get; set; }
}
}