-
Notifications
You must be signed in to change notification settings - Fork 53
/
setters.go
85 lines (71 loc) · 1.65 KB
/
setters.go
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
package generator
// SetType set type of document
func (d *Document) SetType(docType string) *Document {
d.Type = docType
return d
}
// SetHeader set header of document
func (d *Document) SetHeader(header *HeaderFooter) *Document {
d.Header = header
return d
}
// SetFooter set footer of document
func (d *Document) SetFooter(footer *HeaderFooter) *Document {
d.Footer = footer
return d
}
// SetRef of document
func (d *Document) SetRef(ref string) *Document {
d.Ref = ref
return d
}
// SetVersion of document
func (d *Document) SetVersion(version string) *Document {
d.Version = version
return d
}
// SetDescription of document
func (d *Document) SetDescription(desc string) *Document {
d.Description = desc
return d
}
// SetNotes of document
func (d *Document) SetNotes(notes string) *Document {
d.Notes = notes
return d
}
// SetCompany of document
func (d *Document) SetCompany(company *Contact) *Document {
d.Company = company
return d
}
// SetCustomer of document
func (d *Document) SetCustomer(customer *Contact) *Document {
d.Customer = customer
return d
}
// AppendItem to document items
func (d *Document) AppendItem(item *Item) *Document {
d.Items = append(d.Items, item)
return d
}
// SetDate of document
func (d *Document) SetDate(date string) *Document {
d.Date = date
return d
}
// SetPaymentTerm of document
func (d *Document) SetPaymentTerm(term string) *Document {
d.PaymentTerm = term
return d
}
// SetDefaultTax of document
func (d *Document) SetDefaultTax(tax *Tax) *Document {
d.DefaultTax = tax
return d
}
// SetDiscount of document
func (d *Document) SetDiscount(discount *Discount) *Document {
d.Discount = discount
return d
}