-
Notifications
You must be signed in to change notification settings - Fork 151
[capital] Code generation: update services and models #1793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "service": "capital", | ||
| "project": "java", | ||
| "generatedAt": "2026-04-20T10:47:11Z", | ||
| "openapiCommitSha": "3550ecd3f320efaad6bee55ffed5122cb9ba09d5", | ||
| "automationCommitSha": "4ad0c0c7e87bc0e5994a9a3350a991d0691350bb", | ||
| "libraryCommitSha": "f6491265ec484f8de763b2bf915498ee30b42861" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,12 +12,16 @@ | |
| package com.adyen.model.capital; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
| import com.fasterxml.jackson.annotation.JsonCreator; | ||
| import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| import com.fasterxml.jackson.annotation.JsonInclude; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
| import com.fasterxml.jackson.annotation.JsonValue; | ||
| import com.fasterxml.jackson.core.JsonProcessingException; | ||
| import java.util.*; | ||
| import java.util.Arrays; | ||
| import java.util.logging.Logger; | ||
|
|
||
| /** AdditionalBankIdentification */ | ||
| @JsonPropertyOrder({ | ||
|
|
@@ -31,8 +35,64 @@ public class AdditionalBankIdentification { | |
| /** Mark when the attribute has been explicitly set. */ | ||
| private boolean isSetCode = false; | ||
|
|
||
| /** | ||
| * The type of additional bank identification, depending on the country. Possible values: * | ||
| * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) | ||
| * code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * | ||
| * **caRoutingNumber**: The 9-digit [Canadian routing | ||
| * number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without | ||
| * separators or spaces. * **gbSortCode**: The 6-digit [UK sort | ||
| * code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * | ||
| * **usRoutingNumber**: The 9-digit [routing | ||
| * number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or | ||
| * spaces. | ||
| */ | ||
| public enum TypeEnum { | ||
| AUBSBCODE(String.valueOf("auBsbCode")), | ||
|
|
||
| CAROUTINGNUMBER(String.valueOf("caRoutingNumber")), | ||
|
|
||
| GBSORTCODE(String.valueOf("gbSortCode")), | ||
|
|
||
| USROUTINGNUMBER(String.valueOf("usRoutingNumber")); | ||
|
|
||
| private static final Logger LOG = Logger.getLogger(TypeEnum.class.getName()); | ||
|
|
||
| private String value; | ||
|
|
||
| TypeEnum(String value) { | ||
| this.value = value; | ||
| } | ||
|
|
||
| @JsonValue | ||
| public String getValue() { | ||
| return value; | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return String.valueOf(value); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
|
|
||
| @JsonCreator | ||
| public static TypeEnum fromValue(String value) { | ||
| for (TypeEnum b : TypeEnum.values()) { | ||
| if (b.value.equals(value)) { | ||
| return b; | ||
| } | ||
| } | ||
| // handling unexpected value | ||
| LOG.warning( | ||
| "TypeEnum: unexpected enum value '" | ||
| + value | ||
| + "' - Supported values are " | ||
| + Arrays.toString(TypeEnum.values())); | ||
| return null; | ||
| } | ||
|
Comment on lines
+78
to
+91
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Example implementation: private static final Map<String, TypeEnum> VALUE_MAP = new HashMap<>();
static {
for (TypeEnum e : values()) {
VALUE_MAP.put(e.value, e);
}
}
@JsonCreator
public static TypeEnum fromValue(String value) {
TypeEnum enumValue = VALUE_MAP.get(value);
if (enumValue == null) {
LOG.warning(
"TypeEnum: unexpected enum value '"
+ value
+ "' - Supported values are "
+ Arrays.toString(TypeEnum.values()));
}
return enumValue;
} |
||
| } | ||
|
|
||
| public static final String JSON_PROPERTY_TYPE = "type"; | ||
| private AdditionalBankIdentificationTypes type; | ||
| private TypeEnum type; | ||
|
|
||
| /** Mark when the attribute has been explicitly set. */ | ||
| private boolean isSetType = false; | ||
|
|
@@ -81,36 +141,90 @@ public void setCode(String code) { | |
| } | ||
|
|
||
| /** | ||
| * type | ||
| * The type of additional bank identification, depending on the country. Possible values: * | ||
| * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) | ||
| * code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * | ||
| * **caRoutingNumber**: The 9-digit [Canadian routing | ||
| * number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without | ||
| * separators or spaces. * **gbSortCode**: The 6-digit [UK sort | ||
| * code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * | ||
| * **usRoutingNumber**: The 9-digit [routing | ||
| * number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or | ||
| * spaces. | ||
| * | ||
| * @param type | ||
| * @param type The type of additional bank identification, depending on the country. Possible | ||
| * values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) | ||
| * code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * | ||
| * **caRoutingNumber**: The 9-digit [Canadian routing | ||
| * number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without | ||
| * separators or spaces. * **gbSortCode**: The 6-digit [UK sort | ||
| * code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * | ||
| * **usRoutingNumber**: The 9-digit [routing | ||
| * number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or | ||
| * spaces. | ||
|
Comment on lines
+155
to
+164
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Javadoc for the |
||
| * @return the current {@code AdditionalBankIdentification} instance, allowing for method chaining | ||
| */ | ||
| public AdditionalBankIdentification type(AdditionalBankIdentificationTypes type) { | ||
| public AdditionalBankIdentification type(TypeEnum type) { | ||
| this.type = type; | ||
| isSetType = true; // mark as set | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Get type | ||
| * The type of additional bank identification, depending on the country. Possible values: * | ||
| * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) | ||
| * code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * | ||
| * **caRoutingNumber**: The 9-digit [Canadian routing | ||
| * number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without | ||
| * separators or spaces. * **gbSortCode**: The 6-digit [UK sort | ||
| * code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * | ||
| * **usRoutingNumber**: The 9-digit [routing | ||
| * number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or | ||
| * spaces. | ||
| * | ||
| * @return type | ||
| * @return type The type of additional bank identification, depending on the country. Possible | ||
| * values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) | ||
| * code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * | ||
| * **caRoutingNumber**: The 9-digit [Canadian routing | ||
| * number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without | ||
| * separators or spaces. * **gbSortCode**: The 6-digit [UK sort | ||
| * code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * | ||
| * **usRoutingNumber**: The 9-digit [routing | ||
| * number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or | ||
| * spaces. | ||
| */ | ||
| @JsonProperty(JSON_PROPERTY_TYPE) | ||
| @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
| public AdditionalBankIdentificationTypes getType() { | ||
| public TypeEnum getType() { | ||
| return type; | ||
| } | ||
|
|
||
| /** | ||
| * type | ||
| * The type of additional bank identification, depending on the country. Possible values: * | ||
| * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) | ||
| * code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * | ||
| * **caRoutingNumber**: The 9-digit [Canadian routing | ||
| * number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without | ||
| * separators or spaces. * **gbSortCode**: The 6-digit [UK sort | ||
| * code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * | ||
| * **usRoutingNumber**: The 9-digit [routing | ||
| * number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or | ||
| * spaces. | ||
| * | ||
| * @param type | ||
| * @param type The type of additional bank identification, depending on the country. Possible | ||
| * values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) | ||
| * code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * | ||
| * **caRoutingNumber**: The 9-digit [Canadian routing | ||
| * number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without | ||
| * separators or spaces. * **gbSortCode**: The 6-digit [UK sort | ||
| * code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * | ||
| * **usRoutingNumber**: The 9-digit [routing | ||
| * number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or | ||
| * spaces. | ||
| */ | ||
| @JsonProperty(JSON_PROPERTY_TYPE) | ||
| @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
| public void setType(AdditionalBankIdentificationTypes type) { | ||
| public void setType(TypeEnum type) { | ||
| this.type = type; | ||
| isSetType = true; // mark as set | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.