Debian Codegraph @

segment/account_information.go

raw
1 package segment
2
3 import (
4 "github.com/mitch000001/go-hbci/domain"
5 "github.com/mitch000001/go-hbci/element"
6 )
7
8 type AccountInformationRequest interface {
9 ClientSegment
10 SetContinuationMark(continuationMark string)
11 }
12
13 func NewAccountInformationRequestSegmentV1(account domain.AccountConnection, allAccounts bool) AccountInformationRequest {
14 a := &AccountInformationRequestSegmentV1{
15 AccountConnection: element.NewAccountConnection(account),
16 AllAccounts: element.NewBoolean(allAccounts),
17 }
18 a.ClientSegment = NewBasicSegment(1, a)
19 return a
20 }
21
22 type AccountInformationRequestSegmentV1 struct {
23 ClientSegment
24 AccountConnection *element.AccountConnectionDataElement
25 AllAccounts *element.BooleanDataElement
26 MaxEntries *element.NumberDataElement
27 ContinuationReference *element.AlphaNumericDataElement
28 }
29
30 func (a *AccountInformationRequestSegmentV1) Version() int { return 1 }
31 func (a *AccountInformationRequestSegmentV1) ID() string { return "HKKIF" }
32 func (a *AccountInformationRequestSegmentV1) referencedId() string { return "" }
33 func (a *AccountInformationRequestSegmentV1) sender() string { return senderUser }
34
35 func (a *AccountInformationRequestSegmentV1) elements() []element.DataElement {
36 return []element.DataElement{
37 a.AccountConnection,
38 a.AllAccounts,
39 a.MaxEntries,
40 a.ContinuationReference,
41 }
42 }
43
44 func (a *AccountInformationRequestSegmentV1) SetContinuationMark(continuationMark string) {
45 a.ContinuationReference = element.NewAlphaNumeric(continuationMark, 35)
46 }
47
48 func NewAccountInformationRequestSegmentV2(account domain.AccountConnection, allAccounts bool) AccountInformationRequest {
49 a := &AccountInformationRequestSegmentV2{
50 AccountConnection: element.NewAccountConnection(account),
51 AllAccounts: element.NewBoolean(allAccounts),
52 }
53 a.ClientSegment = NewBasicSegment(1, a)
54 return a
55 }
56
57 type AccountInformationRequestSegmentV2 struct {
58 ClientSegment
59 AccountConnection *element.AccountConnectionDataElement
60 AllAccounts *element.BooleanDataElement
61 MaxEntries *element.NumberDataElement
62 ContinuationReference *element.AlphaNumericDataElement
63 }
64
65 func (a *AccountInformationRequestSegmentV2) Version() int { return 2 }
66 func (a *AccountInformationRequestSegmentV2) ID() string { return "HKKIF" }
67 func (a *AccountInformationRequestSegmentV2) referencedId() string { return "" }
68 func (a *AccountInformationRequestSegmentV2) sender() string { return senderUser }
69
70 func (a *AccountInformationRequestSegmentV2) elements() []element.DataElement {
71 return []element.DataElement{
72 a.AccountConnection,
73 a.AllAccounts,
74 a.MaxEntries,
75 a.ContinuationReference,
76 }
77 }
78
79 func (a *AccountInformationRequestSegmentV2) SetContinuationMark(continuationMark string) {
80 a.ContinuationReference = element.NewAlphaNumeric(continuationMark, 35)
81 }
82
83 func NewAccountInformationRequestSegmentV3(account domain.InternationalAccountConnection, allAccounts bool) AccountInformationRequest {
84 a := &AccountInformationRequestSegmentV3{
85 AccountConnection: element.NewInternationalAccountConnection(account),
86 AllAccounts: element.NewBoolean(allAccounts),
87 }
88 a.ClientSegment = NewBasicSegment(1, a)
89 return a
90 }
91
92 type AccountInformationRequestSegmentV3 struct {
93 ClientSegment
94 AccountConnection *element.InternationalAccountConnectionDataElement
95 AllAccounts *element.BooleanDataElement
96 MaxEntries *element.NumberDataElement
97 ContinuationReference *element.AlphaNumericDataElement
98 }
99
100 func (a *AccountInformationRequestSegmentV3) Version() int { return 3 }
101 func (a *AccountInformationRequestSegmentV3) ID() string { return "HKKIF" }
102 func (a *AccountInformationRequestSegmentV3) referencedId() string { return "" }
103 func (a *AccountInformationRequestSegmentV3) sender() string { return senderUser }
104
105 func (a *AccountInformationRequestSegmentV3) elements() []element.DataElement {
106 return []element.DataElement{
107 a.AccountConnection,
108 a.AllAccounts,
109 a.MaxEntries,
110 a.ContinuationReference,
111 }
112 }
113
114 func (a *AccountInformationRequestSegmentV3) SetContinuationMark(continuationMark string) {
115 a.ContinuationReference = element.NewAlphaNumeric(continuationMark, 35)
116 }
117
118 func NewAccountInformationRequestSegmentV4(account domain.InternationalAccountConnection, allAccounts bool) AccountInformationRequest {
119 a := &AccountInformationRequestSegmentV4{
120 AccountConnection: element.NewInternationalAccountConnection(account),
121 AllAccounts: element.NewBoolean(allAccounts),
122 }
123 a.ClientSegment = NewBasicSegment(1, a)
124 return a
125 }
126
127 type AccountInformationRequestSegmentV4 struct {
128 ClientSegment
129 AccountConnection *element.InternationalAccountConnectionDataElement
130 AllAccounts *element.BooleanDataElement
131 MaxEntries *element.NumberDataElement
132 ContinuationReference *element.AlphaNumericDataElement
133 }
134
135 func (a *AccountInformationRequestSegmentV4) Version() int { return 4 }
136 func (a *AccountInformationRequestSegmentV4) ID() string { return "HKKIF" }
137 func (a *AccountInformationRequestSegmentV4) referencedId() string { return "" }
138 func (a *AccountInformationRequestSegmentV4) sender() string { return senderUser }
139
140 func (a *AccountInformationRequestSegmentV4) elements() []element.DataElement {
141 return []element.DataElement{
142 a.AccountConnection,
143 a.AllAccounts,
144 a.MaxEntries,
145 a.ContinuationReference,
146 }
147 }
148
149 func (a *AccountInformationRequestSegmentV4) SetContinuationMark(continuationMark string) {
150 a.ContinuationReference = element.NewAlphaNumeric(continuationMark, 35)
151 }
152
153 func NewAccountInformationRequestSegmentV5(account domain.InternationalAccountConnection, allAccounts bool) AccountInformationRequest {
154 a := &AccountInformationRequestSegmentV5{
155 AccountConnection: element.NewInternationalAccountConnection(account),
156 AllAccounts: element.NewBoolean(allAccounts),
157 }
158 a.ClientSegment = NewBasicSegment(1, a)
159 return a
160 }
161
162 type AccountInformationRequestSegmentV5 struct {
163 ClientSegment
164 AccountConnection *element.InternationalAccountConnectionDataElement
165 AllAccounts *element.BooleanDataElement
166 MaxEntries *element.NumberDataElement
167 ContinuationReference *element.AlphaNumericDataElement
168 }
169
170 func (a *AccountInformationRequestSegmentV5) Version() int { return 5 }
171 func (a *AccountInformationRequestSegmentV5) ID() string { return "HKKIF" }
172 func (a *AccountInformationRequestSegmentV5) referencedId() string { return "" }
173 func (a *AccountInformationRequestSegmentV5) sender() string { return senderUser }
174
175 func (a *AccountInformationRequestSegmentV5) elements() []element.DataElement {
176 return []element.DataElement{
177 a.AccountConnection,
178 a.AllAccounts,
179 a.MaxEntries,
180 a.ContinuationReference,
181 }
182 }
183
184 func (a *AccountInformationRequestSegmentV5) SetContinuationMark(continuationMark string) {
185 a.ContinuationReference = element.NewAlphaNumeric(continuationMark, 35)
186 }
187
188 func NewAccountInformationRequestSegmentV6(account domain.InternationalAccountConnection, allAccounts bool) AccountInformationRequest {
189 a := &AccountInformationRequestSegmentV6{
190 AccountConnection: element.NewInternationalAccountConnection(account),
191 AllAccounts: element.NewBoolean(allAccounts),
192 }
193 a.ClientSegment = NewBasicSegment(1, a)
194 return a
195 }
196
197 type AccountInformationRequestSegmentV6 struct {
198 ClientSegment
199 AccountConnection *element.InternationalAccountConnectionDataElement
200 AllAccounts *element.BooleanDataElement
201 MaxEntries *element.NumberDataElement
202 ContinuationReference *element.AlphaNumericDataElement
203 }
204
205 func (a *AccountInformationRequestSegmentV6) Version() int { return 6 }
206 func (a *AccountInformationRequestSegmentV6) ID() string { return "HKKIF" }
207 func (a *AccountInformationRequestSegmentV6) referencedId() string { return "" }
208 func (a *AccountInformationRequestSegmentV6) sender() string { return senderUser }
209
210 func (a *AccountInformationRequestSegmentV6) elements() []element.DataElement {
211 return []element.DataElement{
212 a.AccountConnection,
213 a.AllAccounts,
214 a.MaxEntries,
215 a.ContinuationReference,
216 }
217 }
218
219 func (a *AccountInformationRequestSegmentV6) SetContinuationMark(continuationMark string) {
220 a.ContinuationReference = element.NewAlphaNumeric(continuationMark, 35)
221 }
222
223 //go:generate go run ../cmd/unmarshaler/unmarshaler_generator.go -segment AccountInformationResponseSegment
224
225 type AccountInformationResponseSegment struct {
226 Segment
227 AccountConnection *element.AccountConnectionDataElement
228 AccountKind *element.NumberDataElement
229 Name1 *element.AlphaNumericDataElement
230 Name2 *element.AlphaNumericDataElement
231 AccountProductID *element.AlphaNumericDataElement
232 AccountCurrency *element.CurrencyDataElement
233 OpeningDate *element.DateDataElement
234 DebitInterest *element.ValueDataElement
235 CreditInterest *element.ValueDataElement
236 OverDebitInterest *element.ValueDataElement
237 CreditLimit *element.AmountDataElement
238 ReferenceAccount *element.AccountConnectionDataElement
239 AccountStatementShippingType *element.NumberDataElement
240 AccountStatementShippingRotation *element.NumberDataElement
241 AdditionalInformation *element.TextDataElement
242 DisposalEligiblePersons *element.DisposalEligiblePersonsDataElement
243 }
244
245 func (a *AccountInformationResponseSegment) Version() int { return 1 }
246 func (a *AccountInformationResponseSegment) ID() string { return "HIKIF" }
247 func (a *AccountInformationResponseSegment) referencedId() string { return "" }
248 func (a *AccountInformationResponseSegment) sender() string { return senderBank }
249
250 func (a *AccountInformationResponseSegment) elements() []element.DataElement {
251 return []element.DataElement{
252 a.AccountConnection,
253 a.AccountKind,
254 a.Name1,
255 a.Name2,
256 a.AccountProductID,
257 a.AccountCurrency,
258 a.OpeningDate,
259 a.DebitInterest,
260 a.CreditInterest,
261 a.OverDebitInterest,
262 a.CreditLimit,
263 a.ReferenceAccount,
264 a.AccountStatementShippingType,
265 a.AccountStatementShippingRotation,
266 a.AdditionalInformation,
267 a.DisposalEligiblePersons,
268 }
269 }