-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathATMCassetteCounters1.go
49 lines (36 loc) · 1.48 KB
/
ATMCassetteCounters1.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
package iso20022
// ATM cassette counter per unit value or globally.
type ATMCassetteCounters1 struct {
// Amount of one media unit, if the media type is valued.
UnitValue *ImpliedCurrencyAndAmount `xml:"UnitVal,omitempty"`
// Currency of the media, if the media type is valued and different from the currency of the requested amount.
Currency *ActiveCurrencyCode `xml:"Ccy,omitempty"`
// Type of notes.
ItemType *ATMNoteType2Code `xml:"ItmTp,omitempty"`
// Counters of media inside the cassette.
Counter []*ATMCassetteCounters2 `xml:"Cntr,omitempty"`
// Current number of media present in the cassette.
CurrentNumber *Number `xml:"CurNb"`
// Current amount in the cassette.
CurrentAmount *ImpliedCurrencyAndAmount `xml:"CurAmt,omitempty"`
}
func (a *ATMCassetteCounters1) SetUnitValue(value, currency string) {
a.UnitValue = NewImpliedCurrencyAndAmount(value, currency)
}
func (a *ATMCassetteCounters1) SetCurrency(value string) {
a.Currency = (*ActiveCurrencyCode)(&value)
}
func (a *ATMCassetteCounters1) SetItemType(value string) {
a.ItemType = (*ATMNoteType2Code)(&value)
}
func (a *ATMCassetteCounters1) AddCounter() *ATMCassetteCounters2 {
newValue := new(ATMCassetteCounters2)
a.Counter = append(a.Counter, newValue)
return newValue
}
func (a *ATMCassetteCounters1) SetCurrentNumber(value string) {
a.CurrentNumber = (*Number)(&value)
}
func (a *ATMCassetteCounters1) SetCurrentAmount(value, currency string) {
a.CurrentAmount = NewImpliedCurrencyAndAmount(value, currency)
}