-
Notifications
You must be signed in to change notification settings - Fork 1
/
CardAccountDetails.java
435 lines (365 loc) · 15.3 KB
/
CardAccountDetails.java
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
/*
* NextGenPSD2 XS2A Framework
* # Summary The **NextGenPSD2** *Framework Version 1.3.12* offers a modern, open, harmonised and interoperable set of Application Programming Interfaces (APIs) as the safest and most efficient way to provide data securely. The NextGenPSD2 Framework reduces XS2A complexity and costs, addresses the problem of multiple competing standards in Europe and, aligned with the goals of the Euro Retail Payments Board, enables European banking customers to benefit from innovative products and services ('Banking as a Service') by granting TPPs safe and secure (authenticated and authorised) access to their bank accounts and financial data. The possible Approaches are: * Redirect SCA Approach * OAuth SCA Approach * Decoupled SCA Approach * Embedded SCA Approach without SCA method * Embedded SCA Approach with only one SCA method available * Embedded SCA Approach with Selection of a SCA method Not every message defined in this API definition is necessary for all approaches. Furthermore this API definition does not differ between methods which are mandatory, conditional, or optional. Therefore for a particular implementation of a Berlin Group PSD2 compliant API it is only necessary to support a certain subset of the methods defined in this API definition. **Please have a look at the implementation guidelines if you are not sure which message has to be used for the approach you are going to use.** ## Some General Remarks Related to this version of the OpenAPI Specification: * **This API definition is based on the Implementation Guidelines of the Berlin Group PSD2 API.** It is not a replacement in any sense. The main specification is (at the moment) always the Implementation Guidelines of the Berlin Group PSD2 API. * **This API definition contains the REST-API for requests from the PISP to the ASPSP.** * **This API definition contains the messages for all different approaches defined in the Implementation Guidelines.** * According to the OpenAPI-Specification [https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md] \"If in is \"header\" and the name field is \"Accept\", \"Content-Type\" or \"Authorization\", the parameter definition SHALL be ignored.\" The element \"Accept\" will not be defined in this file at any place. The elements \"Content-Type\" and \"Authorization\" are implicitly defined by the OpenApi tags \"content\" and \"security\". * There are several predefined types which might occur in payment initiation messages, but are not used in the standard JSON messages in the Implementation Guidelines. Therefore they are not used in the corresponding messages in this file either. We added them for the convenience of the user. If there is a payment product, which needs these fields, one can easily use the predefined types. But the ASPSP need not to accept them in general. * **We omit the definition of all standard HTTP header elements (mandatory/optional/conditional) except they are mentioned in the Implementation Guidelines.** Therefore the implementer might add these in his own realisation of a PSD2 complient API in addition to the elements defined in this file. ## General Remarks on Data Types The Berlin Group definition of UTF-8 strings in context of the PSD2 API has to support at least the following characters a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 / - ? : ( ) . , ' + Space
*
* OpenAPI spec version: 1.3.12_2022-07-01
* Contact: info@berlin-group.org
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package de.adorsys.psd2.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import de.adorsys.psd2.client.model.AccountStatus;
import de.adorsys.psd2.client.model.Amount;
import de.adorsys.psd2.client.model.BalanceList;
import de.adorsys.psd2.client.model.LinksAccountDetails;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
/**
* Card account details.
*/
@Schema(description = "Card account details. ")
public class CardAccountDetails {
@SerializedName("resourceId")
private String resourceId = null;
@SerializedName("maskedPan")
private String maskedPan = null;
@SerializedName("currency")
private String currency = null;
@SerializedName("ownerName")
private String ownerName = null;
@SerializedName("name")
private String name = null;
@SerializedName("displayName")
private String displayName = null;
@SerializedName("product")
private String product = null;
@SerializedName("debitAccounting")
private Boolean debitAccounting = null;
@SerializedName("status")
private AccountStatus status = null;
/**
* Specifies the usage of the account: * PRIV: private personal account * ORGA: professional account
*/
@JsonAdapter(UsageEnum.Adapter.class)
public enum UsageEnum {
PRIV("PRIV"),
ORGA("ORGA");
private String value;
UsageEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static UsageEnum fromValue(String text) {
for (UsageEnum b : UsageEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<UsageEnum> {
@Override
public void write(final JsonWriter jsonWriter, final UsageEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public UsageEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return UsageEnum.fromValue(String.valueOf(value));
}
}
} @SerializedName("usage")
private UsageEnum usage = null;
@SerializedName("details")
private String details = null;
@SerializedName("creditLimit")
private Amount creditLimit = null;
@SerializedName("balances")
private BalanceList balances = null;
@SerializedName("_links")
private LinksAccountDetails _links = null;
public CardAccountDetails resourceId(String resourceId) {
this.resourceId = resourceId;
return this;
}
/**
* This is the data element to be used in the path when retrieving data from a dedicated account. This shall be filled, if addressable resource are created by the ASPSP on the /card-accounts endpoint.
* @return resourceId
**/
@Schema(description = "This is the data element to be used in the path when retrieving data from a dedicated account. This shall be filled, if addressable resource are created by the ASPSP on the /card-accounts endpoint. ")
public String getResourceId() {
return resourceId;
}
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
public CardAccountDetails maskedPan(String maskedPan) {
this.maskedPan = maskedPan;
return this;
}
/**
* Get maskedPan
* @return maskedPan
**/
@Schema(required = true, description = "")
public String getMaskedPan() {
return maskedPan;
}
public void setMaskedPan(String maskedPan) {
this.maskedPan = maskedPan;
}
public CardAccountDetails currency(String currency) {
this.currency = currency;
return this;
}
/**
* Get currency
* @return currency
**/
@Schema(required = true, description = "")
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public CardAccountDetails ownerName(String ownerName) {
this.ownerName = ownerName;
return this;
}
/**
* Get ownerName
* @return ownerName
**/
@Schema(description = "")
public String getOwnerName() {
return ownerName;
}
public void setOwnerName(String ownerName) {
this.ownerName = ownerName;
}
public CardAccountDetails name(String name) {
this.name = name;
return this;
}
/**
* Name of the account, as assigned by the ASPSP, in agreement with the account owner in order to provide an additional means of identification of the account.
* @return name
**/
@Schema(description = "Name of the account, as assigned by the ASPSP, in agreement with the account owner in order to provide an additional means of identification of the account. ")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public CardAccountDetails displayName(String displayName) {
this.displayName = displayName;
return this;
}
/**
* Get displayName
* @return displayName
**/
@Schema(description = "")
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public CardAccountDetails product(String product) {
this.product = product;
return this;
}
/**
* Product Name of the Bank for this account, proprietary definition.
* @return product
**/
@Schema(description = "Product Name of the Bank for this account, proprietary definition. ")
public String getProduct() {
return product;
}
public void setProduct(String product) {
this.product = product;
}
public CardAccountDetails debitAccounting(Boolean debitAccounting) {
this.debitAccounting = debitAccounting;
return this;
}
/**
* Get debitAccounting
* @return debitAccounting
**/
@Schema(description = "")
public Boolean getDebitAccounting() {
return debitAccounting;
}
public void setDebitAccounting(Boolean debitAccounting) {
this.debitAccounting = debitAccounting;
}
public CardAccountDetails status(AccountStatus status) {
this.status = status;
return this;
}
/**
* Get status
* @return status
**/
@Schema(description = "")
public AccountStatus getStatus() {
return status;
}
public void setStatus(AccountStatus status) {
this.status = status;
}
public CardAccountDetails usage(UsageEnum usage) {
this.usage = usage;
return this;
}
/**
* Specifies the usage of the account: * PRIV: private personal account * ORGA: professional account
* @return usage
**/
@Schema(description = "Specifies the usage of the account: * PRIV: private personal account * ORGA: professional account ")
public UsageEnum getUsage() {
return usage;
}
public void setUsage(UsageEnum usage) {
this.usage = usage;
}
public CardAccountDetails details(String details) {
this.details = details;
return this;
}
/**
* Specifications that might be provided by the ASPSP: - characteristics of the account - characteristics of the relevant card
* @return details
**/
@Schema(description = "Specifications that might be provided by the ASPSP: - characteristics of the account - characteristics of the relevant card ")
public String getDetails() {
return details;
}
public void setDetails(String details) {
this.details = details;
}
public CardAccountDetails creditLimit(Amount creditLimit) {
this.creditLimit = creditLimit;
return this;
}
/**
* Get creditLimit
* @return creditLimit
**/
@Schema(description = "")
public Amount getCreditLimit() {
return creditLimit;
}
public void setCreditLimit(Amount creditLimit) {
this.creditLimit = creditLimit;
}
public CardAccountDetails balances(BalanceList balances) {
this.balances = balances;
return this;
}
/**
* Get balances
* @return balances
**/
@Schema(description = "")
public BalanceList getBalances() {
return balances;
}
public void setBalances(BalanceList balances) {
this.balances = balances;
}
public CardAccountDetails _links(LinksAccountDetails _links) {
this._links = _links;
return this;
}
/**
* Get _links
* @return _links
**/
@Schema(description = "")
public LinksAccountDetails getLinks() {
return _links;
}
public void setLinks(LinksAccountDetails _links) {
this._links = _links;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CardAccountDetails cardAccountDetails = (CardAccountDetails) o;
return Objects.equals(this.resourceId, cardAccountDetails.resourceId) &&
Objects.equals(this.maskedPan, cardAccountDetails.maskedPan) &&
Objects.equals(this.currency, cardAccountDetails.currency) &&
Objects.equals(this.ownerName, cardAccountDetails.ownerName) &&
Objects.equals(this.name, cardAccountDetails.name) &&
Objects.equals(this.displayName, cardAccountDetails.displayName) &&
Objects.equals(this.product, cardAccountDetails.product) &&
Objects.equals(this.debitAccounting, cardAccountDetails.debitAccounting) &&
Objects.equals(this.status, cardAccountDetails.status) &&
Objects.equals(this.usage, cardAccountDetails.usage) &&
Objects.equals(this.details, cardAccountDetails.details) &&
Objects.equals(this.creditLimit, cardAccountDetails.creditLimit) &&
Objects.equals(this.balances, cardAccountDetails.balances) &&
Objects.equals(this._links, cardAccountDetails._links);
}
@Override
public int hashCode() {
return Objects.hash(resourceId, maskedPan, currency, ownerName, name, displayName, product, debitAccounting, status, usage, details, creditLimit, balances, _links);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CardAccountDetails {\n");
sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n");
sb.append(" maskedPan: ").append(toIndentedString(maskedPan)).append("\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
sb.append(" product: ").append(toIndentedString(product)).append("\n");
sb.append(" debitAccounting: ").append(toIndentedString(debitAccounting)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" usage: ").append(toIndentedString(usage)).append("\n");
sb.append(" details: ").append(toIndentedString(details)).append("\n");
sb.append(" creditLimit: ").append(toIndentedString(creditLimit)).append("\n");
sb.append(" balances: ").append(toIndentedString(balances)).append("\n");
sb.append(" _links: ").append(toIndentedString(_links)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}