-
Notifications
You must be signed in to change notification settings - Fork 155
[balanceplatform] Code generation: update services and models #2016
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
Open
AdyenAutomationBot
wants to merge
1
commit into
main
Choose a base branch
from
sdk-automation/balanceplatform
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| { | ||
| "service": "balanceplatform", | ||
| "project": "java", | ||
| "generatedAt": "2026-07-21T12:28:58Z", | ||
| "openapiCommitSha": "c2ff0637d25d1c34aa1b19113e1b4e5eaa289960", | ||
| "generatedAt": "2026-07-23T13:25:41Z", | ||
| "openapiCommitSha": "06d031500a5565d326553c6b0d14c3c79d13a1eb", | ||
| "automationCommitSha": "0c108bd8050cf480d2710b78b770afdfbdd89397", | ||
| "libraryCommitSha": "5ff17f11a78b035f0dd862e1157bec9e026adcf1" | ||
| "libraryCommitSha": "7f01d8c3c98591abf7cf85a4db7b7ff76aa7e66b" | ||
| } |
234 changes: 234 additions & 0 deletions
234
src/main/java/com/adyen/model/balanceplatform/AmountDTO.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,234 @@ | ||
| /* | ||
| * Configuration API | ||
| * | ||
| * The version of the OpenAPI document: 2 | ||
| * | ||
| * | ||
| * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
| * https://openapi-generator.tech | ||
| * Do not edit the class manually. | ||
| */ | ||
|
|
||
| package com.adyen.model.balanceplatform; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
| 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.core.JsonProcessingException; | ||
| import java.util.*; | ||
|
|
||
| /** AmountDTO */ | ||
| @JsonPropertyOrder({AmountDTO.JSON_PROPERTY_CURRENCY, AmountDTO.JSON_PROPERTY_VALUE}) | ||
| public class AmountDTO { | ||
| public static final String JSON_PROPERTY_CURRENCY = "currency"; | ||
| private String currency; | ||
|
|
||
| /** Mark when the attribute has been explicitly set. */ | ||
| private boolean isSetCurrency = false; | ||
|
|
||
| public static final String JSON_PROPERTY_VALUE = "value"; | ||
| private Long value; | ||
|
|
||
| /** Mark when the attribute has been explicitly set. */ | ||
| private boolean isSetValue = false; | ||
|
|
||
| /** | ||
| * Sets whether attributes with null values should be explicitly included in the JSON payload. | ||
| * Default is false. | ||
| */ | ||
| @JsonIgnore private boolean includeNullValues = false; | ||
|
|
||
| public AmountDTO() {} | ||
|
Check failure on line 43 in src/main/java/com/adyen/model/balanceplatform/AmountDTO.java
|
||
|
|
||
| /** | ||
| * The three-character [ISO currency | ||
| * code](https://docs.adyen.com/development-resources/currency-codes). | ||
| * | ||
| * @param currency The three-character [ISO currency | ||
| * code](https://docs.adyen.com/development-resources/currency-codes). | ||
| * @return the current {@code AmountDTO} instance, allowing for method chaining | ||
| */ | ||
| public AmountDTO currency(String currency) { | ||
| this.currency = currency; | ||
| isSetCurrency = true; // mark as set | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * The three-character [ISO currency | ||
| * code](https://docs.adyen.com/development-resources/currency-codes). | ||
| * | ||
| * @return currency The three-character [ISO currency | ||
| * code](https://docs.adyen.com/development-resources/currency-codes). | ||
| */ | ||
| @JsonProperty(JSON_PROPERTY_CURRENCY) | ||
| @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
| public String getCurrency() { | ||
| return currency; | ||
| } | ||
|
|
||
| /** | ||
| * The three-character [ISO currency | ||
| * code](https://docs.adyen.com/development-resources/currency-codes). | ||
| * | ||
| * @param currency The three-character [ISO currency | ||
| * code](https://docs.adyen.com/development-resources/currency-codes). | ||
| */ | ||
| @JsonProperty(JSON_PROPERTY_CURRENCY) | ||
| @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
| public void setCurrency(String currency) { | ||
| this.currency = currency; | ||
| isSetCurrency = true; // mark as set | ||
| } | ||
|
|
||
| /** | ||
| * The amount of the transaction, in [minor | ||
| * units](https://docs.adyen.com/development-resources/currency-codes). | ||
| * | ||
| * @param value The amount of the transaction, in [minor | ||
| * units](https://docs.adyen.com/development-resources/currency-codes). | ||
| * @return the current {@code AmountDTO} instance, allowing for method chaining | ||
| */ | ||
| public AmountDTO value(Long value) { | ||
| this.value = value; | ||
| isSetValue = true; // mark as set | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * The amount of the transaction, in [minor | ||
| * units](https://docs.adyen.com/development-resources/currency-codes). | ||
| * | ||
| * @return value The amount of the transaction, in [minor | ||
| * units](https://docs.adyen.com/development-resources/currency-codes). | ||
| */ | ||
| @JsonProperty(JSON_PROPERTY_VALUE) | ||
| @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
| public Long getValue() { | ||
| return value; | ||
| } | ||
|
|
||
| /** | ||
| * The amount of the transaction, in [minor | ||
| * units](https://docs.adyen.com/development-resources/currency-codes). | ||
| * | ||
| * @param value The amount of the transaction, in [minor | ||
| * units](https://docs.adyen.com/development-resources/currency-codes). | ||
| */ | ||
| @JsonProperty(JSON_PROPERTY_VALUE) | ||
| @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
| public void setValue(Long value) { | ||
| this.value = value; | ||
| isSetValue = true; // mark as set | ||
| } | ||
|
|
||
| /** | ||
| * Configures whether null values are explicitly serialized in the JSON payload. Default is false. | ||
| */ | ||
| public AmountDTO includeNullValues(boolean includeNullValues) { | ||
| this.includeNullValues = includeNullValues; | ||
| return this; | ||
| } | ||
|
|
||
| /** Returns whether null values are explicitly serialized in the JSON payload. */ | ||
| public boolean isIncludeNullValues() { | ||
| return includeNullValues; | ||
| } | ||
|
|
||
| /** | ||
| * Sets whether null values should be explicitly serialized in the JSON payload. Default is false. | ||
| */ | ||
| public void setIncludeNullValues(boolean includeNullValues) { | ||
| this.includeNullValues = includeNullValues; | ||
| } | ||
|
|
||
| /** Return true if this AmountDTO object is equal to o. */ | ||
| @Override | ||
| public boolean equals(Object o) { | ||
| if (this == o) { | ||
| return true; | ||
| } | ||
| if (o == null || getClass() != o.getClass()) { | ||
| return false; | ||
| } | ||
| AmountDTO amountDTO = (AmountDTO) o; | ||
| return Objects.equals(this.currency, amountDTO.currency) | ||
| && Objects.equals(this.isSetCurrency, amountDTO.isSetCurrency) | ||
| && Objects.equals(this.value, amountDTO.value) | ||
| && Objects.equals(this.isSetValue, amountDTO.isSetValue); | ||
| } | ||
|
|
||
| @Override | ||
| public int hashCode() { | ||
| return Objects.hash(currency, isSetCurrency, value, isSetValue); | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| StringBuilder sb = new StringBuilder(); | ||
| sb.append("class AmountDTO {\n"); | ||
| sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); | ||
| sb.append(" value: ").append(toIndentedString(value)).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(Object o) { | ||
| if (o == null) { | ||
| return "null"; | ||
| } | ||
| return o.toString().replace("\n", "\n "); | ||
| } | ||
|
|
||
| /** Returns a map of properties to be merged into the JSON payload as explicit null values. */ | ||
| @JsonInclude(JsonInclude.Include.ALWAYS) | ||
| @JsonAnyGetter | ||
| public Map<String, Object> getExplicitNulls() { | ||
| if (!this.includeNullValues) { | ||
| return Collections.emptyMap(); | ||
| } | ||
|
|
||
| Map<String, Object> nulls = new HashMap<>(); | ||
|
|
||
| if (isSetCurrency) { | ||
| addIfNull(nulls, JSON_PROPERTY_CURRENCY, this.currency); | ||
| } | ||
| if (isSetValue) { | ||
| addIfNull(nulls, JSON_PROPERTY_VALUE, this.value); | ||
| } | ||
|
|
||
| return nulls; | ||
| } | ||
|
|
||
| // add to map when value is null | ||
| private void addIfNull(Map<String, Object> map, String key, Object value) { | ||
| if (value == null) { | ||
| map.put(key, null); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Create an instance of AmountDTO given an JSON string | ||
| * | ||
| * @param jsonString JSON string | ||
| * @return An instance of AmountDTO | ||
| * @throws JsonProcessingException if the JSON string is invalid with respect to AmountDTO | ||
| */ | ||
| public static AmountDTO fromJson(String jsonString) throws JsonProcessingException { | ||
| return JSON.getMapper().readValue(jsonString, AmountDTO.class); | ||
| } | ||
|
|
||
| /** | ||
| * Convert an instance of AmountDTO to an JSON string | ||
| * | ||
| * @return JSON string | ||
| */ | ||
| public String toJson() throws JsonProcessingException { | ||
| return JSON.getMapper().writeValueAsString(this); | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
Objects.equalson primitivebooleanfields likeisSetCurrencyandisSetValuecauses unnecessary boxing toBooleanobjects. For primitive fields, direct comparison using==is more efficient and idiomatic in Java.