-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathAdjustment3.go
40 lines (29 loc) · 1.19 KB
/
Adjustment3.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
package iso20022
// Modification on the value of goods and / or services. For example: rebate, discount, surcharge
type Adjustment3 struct {
// Specifies the type of adjustment applied to the amount of goods/services by means of a code.
Type *AdjustmentType2Code `xml:"Tp"`
// Specifies a type of adjustment not present in the code list.
OtherAdjustmentType *Max35Text `xml:"OthrAdjstmntTp"`
// Specifies the monetary amount of the adjustment.
Amount *CurrencyAndAmount `xml:"Amt"`
// Specifies the percentage rate of the adjustment.
Rate *PercentageRate `xml:"Rate"`
// Specifies whether the adjustment must be subtracted or added to the total amount.
Direction *AdjustmentDirection1Code `xml:"Drctn"`
}
func (a *Adjustment3) SetType(value string) {
a.Type = (*AdjustmentType2Code)(&value)
}
func (a *Adjustment3) SetOtherAdjustmentType(value string) {
a.OtherAdjustmentType = (*Max35Text)(&value)
}
func (a *Adjustment3) SetAmount(value, currency string) {
a.Amount = NewCurrencyAndAmount(value, currency)
}
func (a *Adjustment3) SetRate(value string) {
a.Rate = (*PercentageRate)(&value)
}
func (a *Adjustment3) SetDirection(value string) {
a.Direction = (*AdjustmentDirection1Code)(&value)
}