From 4fcc124045b896fd729ec59a1e08b63bd03c1af8 Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Tue, 19 May 2026 14:56:25 +0000 Subject: [PATCH] [balanceplatform] Automated update from Adyen/adyen-openapi@e5eedc5 --- sdk-generation-log/balanceplatform.json | 6 +- .../BalanceAccountConfiguration.java | 1150 +++++++++++++++ .../BalanceAccountConfigurationRequest.java | 1035 +++++++++++++ .../BalanceAccountConfigurations.java | 251 ++++ .../BalancePlatformConfiguration.java | 1298 +++++++++++++++++ .../BalancePlatformConfigurations.java | 204 +++ .../balanceplatform/ExecutionResult.java | 60 + .../model/balanceplatform/ModelLocalTime.java | 323 ++++ ...bleBalanceAccountConfigurationRequest.java | 926 ++++++++++++ .../PayoutScheduleExecution.java | 331 +++++ .../PayoutScheduleExecutionDetails.java | 280 ++++ .../PayoutScheduleExecutions.java | 194 +++ .../balanceplatform/BalanceAccountsApi.java | 251 ---- .../CustomPayoutSchedulesSweepsApi.java | 304 ++++ .../ManagedPayoutSchedulesApi.java | 522 +++++++ 15 files changed, 6881 insertions(+), 254 deletions(-) create mode 100644 src/main/java/com/adyen/model/balanceplatform/BalanceAccountConfiguration.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/BalanceAccountConfigurationRequest.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/BalanceAccountConfigurations.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/BalancePlatformConfiguration.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/BalancePlatformConfigurations.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/ExecutionResult.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/ModelLocalTime.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/PatchableBalanceAccountConfigurationRequest.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/PayoutScheduleExecution.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/PayoutScheduleExecutionDetails.java create mode 100644 src/main/java/com/adyen/model/balanceplatform/PayoutScheduleExecutions.java create mode 100644 src/main/java/com/adyen/service/balanceplatform/CustomPayoutSchedulesSweepsApi.java create mode 100644 src/main/java/com/adyen/service/balanceplatform/ManagedPayoutSchedulesApi.java diff --git a/sdk-generation-log/balanceplatform.json b/sdk-generation-log/balanceplatform.json index 50a08b7f4..05406ec44 100644 --- a/sdk-generation-log/balanceplatform.json +++ b/sdk-generation-log/balanceplatform.json @@ -1,8 +1,8 @@ { "service": "balanceplatform", "project": "java", - "generatedAt": "2026-05-14T14:22:19Z", - "openapiCommitSha": "cbc5406a2df1f24d50e40742f18342f7ca7f21fc", + "generatedAt": "2026-05-19T14:56:24Z", + "openapiCommitSha": "e5eedc5cba69416331333d4b0e90cb4871715517", "automationCommitSha": "6f06b47d0661f0891defe6b85461d2c367fbd284", - "libraryCommitSha": "5790580db2f8a931a68baba2bff9760b8aed2067" + "libraryCommitSha": "d6d824f453954375b80996ebbb00aa72037b6cf0" } diff --git a/src/main/java/com/adyen/model/balanceplatform/BalanceAccountConfiguration.java b/src/main/java/com/adyen/model/balanceplatform/BalanceAccountConfiguration.java new file mode 100644 index 000000000..c6c300b5e --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/BalanceAccountConfiguration.java @@ -0,0 +1,1150 @@ +/* + * 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.time.OffsetDateTime; +import java.util.*; + +/** BalanceAccountConfiguration */ +@JsonPropertyOrder({ + BalanceAccountConfiguration.JSON_PROPERTY_BALANCE_ACCOUNT_ID, + BalanceAccountConfiguration.JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULE_ID, + BalanceAccountConfiguration.JSON_PROPERTY_CREATED_AT, + BalanceAccountConfiguration.JSON_PROPERTY_CURRENCY, + BalanceAccountConfiguration.JSON_PROPERTY_DESCRIPTION, + BalanceAccountConfiguration.JSON_PROPERTY_ENABLED, + BalanceAccountConfiguration.JSON_PROPERTY_FREQUENCY, + BalanceAccountConfiguration.JSON_PROPERTY_FREQUENCY_VALUE, + BalanceAccountConfiguration.JSON_PROPERTY_ID, + BalanceAccountConfiguration.JSON_PROPERTY_MAX_PAYOUT_AMOUNT, + BalanceAccountConfiguration.JSON_PROPERTY_MIN_PAYOUT_AMOUNT, + BalanceAccountConfiguration.JSON_PROPERTY_REFERENCE, + BalanceAccountConfiguration.JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY, + BalanceAccountConfiguration.JSON_PROPERTY_RETAINED_AMOUNT, + BalanceAccountConfiguration.JSON_PROPERTY_SALES_DAY_CLOSING_TIME, + BalanceAccountConfiguration.JSON_PROPERTY_TRANSFER_INSTRUMENT_ID, + BalanceAccountConfiguration.JSON_PROPERTY_UPDATED_AT +}) +public class BalanceAccountConfiguration { + public static final String JSON_PROPERTY_BALANCE_ACCOUNT_ID = "balanceAccountId"; + private String balanceAccountId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetBalanceAccountId = false; + + public static final String JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULE_ID = + "balancePlatformPayoutScheduleId"; + private String balancePlatformPayoutScheduleId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetBalancePlatformPayoutScheduleId = false; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCreatedAt = false; + + 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_DESCRIPTION = "description"; + private String description; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDescription = false; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetEnabled = false; + + public static final String JSON_PROPERTY_FREQUENCY = "frequency"; + private String frequency; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFrequency = false; + + public static final String JSON_PROPERTY_FREQUENCY_VALUE = "frequencyValue"; + private Integer frequencyValue; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFrequencyValue = false; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetId = false; + + public static final String JSON_PROPERTY_MAX_PAYOUT_AMOUNT = "maxPayoutAmount"; + private Long maxPayoutAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMaxPayoutAmount = false; + + public static final String JSON_PROPERTY_MIN_PAYOUT_AMOUNT = "minPayoutAmount"; + private Long minPayoutAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMinPayoutAmount = false; + + public static final String JSON_PROPERTY_REFERENCE = "reference"; + private String reference; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetReference = false; + + public static final String JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY = "referenceForBeneficiary"; + private String referenceForBeneficiary; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetReferenceForBeneficiary = false; + + public static final String JSON_PROPERTY_RETAINED_AMOUNT = "retainedAmount"; + private Long retainedAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRetainedAmount = false; + + public static final String JSON_PROPERTY_SALES_DAY_CLOSING_TIME = "salesDayClosingTime"; + /* deprecated */ + @Deprecated private String salesDayClosingTime; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetSalesDayClosingTime = false; + + public static final String JSON_PROPERTY_TRANSFER_INSTRUMENT_ID = "transferInstrumentId"; + private String transferInstrumentId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTransferInstrumentId = false; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetUpdatedAt = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public BalanceAccountConfiguration() {} + + /** + * The unique identifier of the balance account to which you apply the payout schedule. + * + * @param balanceAccountId The unique identifier of the balance account to which you apply the + * payout schedule. + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration balanceAccountId(String balanceAccountId) { + this.balanceAccountId = balanceAccountId; + isSetBalanceAccountId = true; // mark as set + return this; + } + + /** + * The unique identifier of the balance account to which you apply the payout schedule. + * + * @return balanceAccountId The unique identifier of the balance account to which you apply the + * payout schedule. + */ + @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBalanceAccountId() { + return balanceAccountId; + } + + /** + * The unique identifier of the balance account to which you apply the payout schedule. + * + * @param balanceAccountId The unique identifier of the balance account to which you apply the + * payout schedule. + */ + @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBalanceAccountId(String balanceAccountId) { + this.balanceAccountId = balanceAccountId; + isSetBalanceAccountId = true; // mark as set + } + + /** + * The unique identifier of the balance platform payout schedule that is applied to the balance + * account. + * + * @param balancePlatformPayoutScheduleId The unique identifier of the balance platform payout + * schedule that is applied to the balance account. + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration balancePlatformPayoutScheduleId( + String balancePlatformPayoutScheduleId) { + this.balancePlatformPayoutScheduleId = balancePlatformPayoutScheduleId; + isSetBalancePlatformPayoutScheduleId = true; // mark as set + return this; + } + + /** + * The unique identifier of the balance platform payout schedule that is applied to the balance + * account. + * + * @return balancePlatformPayoutScheduleId The unique identifier of the balance platform payout + * schedule that is applied to the balance account. + */ + @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBalancePlatformPayoutScheduleId() { + return balancePlatformPayoutScheduleId; + } + + /** + * The unique identifier of the balance platform payout schedule that is applied to the balance + * account. + * + * @param balancePlatformPayoutScheduleId The unique identifier of the balance platform payout + * schedule that is applied to the balance account. + */ + @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBalancePlatformPayoutScheduleId(String balancePlatformPayoutScheduleId) { + this.balancePlatformPayoutScheduleId = balancePlatformPayoutScheduleId; + isSetBalancePlatformPayoutScheduleId = true; // mark as set + } + + /** + * The date and time when the payout schedule was created. + * + * @param createdAt The date and time when the payout schedule was created. + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + isSetCreatedAt = true; // mark as set + return this; + } + + /** + * The date and time when the payout schedule was created. + * + * @return createdAt The date and time when the payout schedule was created. + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * The date and time when the payout schedule was created. + * + * @param createdAt The date and time when the payout schedule was created. + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + isSetCreatedAt = true; // mark as set + } + + /** + * The three-character [ISO code](https://docs.adyen.com/development-resources/currency-codes) of + * the currency used for this schedule. + * + * @param currency The three-character [ISO + * code](https://docs.adyen.com/development-resources/currency-codes) of the currency used for + * this schedule. + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration currency(String currency) { + this.currency = currency; + isSetCurrency = true; // mark as set + return this; + } + + /** + * The three-character [ISO code](https://docs.adyen.com/development-resources/currency-codes) of + * the currency used for this schedule. + * + * @return currency The three-character [ISO + * code](https://docs.adyen.com/development-resources/currency-codes) of the currency used for + * this schedule. + */ + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCurrency() { + return currency; + } + + /** + * The three-character [ISO code](https://docs.adyen.com/development-resources/currency-codes) of + * the currency used for this schedule. + * + * @param currency The three-character [ISO + * code](https://docs.adyen.com/development-resources/currency-codes) of the currency used for + * this schedule. + */ + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrency(String currency) { + this.currency = currency; + isSetCurrency = true; // mark as set + } + + /** + * The description used for all payouts initiated by this payout schedule. Maximum length: 140 + * characters. If your description is longer, it may be truncated. Default value: The + * `defaultDescription` from the balance platform schedule that you are applying. + * + * @param description The description used for all payouts initiated by this payout schedule. + * Maximum length: 140 characters. If your description is longer, it may be truncated. Default + * value: The `defaultDescription` from the balance platform schedule that you are + * applying. + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration description(String description) { + this.description = description; + isSetDescription = true; // mark as set + return this; + } + + /** + * The description used for all payouts initiated by this payout schedule. Maximum length: 140 + * characters. If your description is longer, it may be truncated. Default value: The + * `defaultDescription` from the balance platform schedule that you are applying. + * + * @return description The description used for all payouts initiated by this payout schedule. + * Maximum length: 140 characters. If your description is longer, it may be truncated. Default + * value: The `defaultDescription` from the balance platform schedule that you are + * applying. + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + /** + * The description used for all payouts initiated by this payout schedule. Maximum length: 140 + * characters. If your description is longer, it may be truncated. Default value: The + * `defaultDescription` from the balance platform schedule that you are applying. + * + * @param description The description used for all payouts initiated by this payout schedule. + * Maximum length: 140 characters. If your description is longer, it may be truncated. Default + * value: The `defaultDescription` from the balance platform schedule that you are + * applying. + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + isSetDescription = true; // mark as set + } + + /** + * Specifies whether the payout schedule is active. + * + * @param enabled Specifies whether the payout schedule is active. + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration enabled(Boolean enabled) { + this.enabled = enabled; + isSetEnabled = true; // mark as set + return this; + } + + /** + * Specifies whether the payout schedule is active. + * + * @return enabled Specifies whether the payout schedule is active. + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + /** + * Specifies whether the payout schedule is active. + * + * @param enabled Specifies whether the payout schedule is active. + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + isSetEnabled = true; // mark as set + } + + /** + * frequency + * + * @param frequency + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration frequency(String frequency) { + this.frequency = frequency; + isSetFrequency = true; // mark as set + return this; + } + + /** + * Get frequency + * + * @return frequency + */ + @JsonProperty(JSON_PROPERTY_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFrequency() { + return frequency; + } + + /** + * frequency + * + * @param frequency + */ + @JsonProperty(JSON_PROPERTY_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFrequency(String frequency) { + this.frequency = frequency; + isSetFrequency = true; // mark as set + } + + /** + * The date of the month or day of the week when payouts are initiated. Allowed only if + * `frequency` is **monthly** or **weekly**. Possible values if `frequency` is + * **monthly**: **[1 - 31]**. * If your specified date happens on a weekend, the payout is + * initiated on the next business day. * If your specified date (**29**, **30**, or **31**) does + * not exist in a month, the payout is initiated on the last day of that month. Possible values if + * `frequency` is **weekly**: **[1 - 5]**. Default value: The + * `defaultFrequencyValue` from the balance platform schedule that you are applying. + * + * @param frequencyValue The date of the month or day of the week when payouts are initiated. + * Allowed only if `frequency` is **monthly** or **weekly**. Possible values if + * `frequency` is **monthly**: **[1 - 31]**. * If your specified date happens on a + * weekend, the payout is initiated on the next business day. * If your specified date + * (**29**, **30**, or **31**) does not exist in a month, the payout is initiated on the last + * day of that month. Possible values if `frequency` is **weekly**: **[1 - 5]**. + * Default value: The `defaultFrequencyValue` from the balance platform schedule + * that you are applying. + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration frequencyValue(Integer frequencyValue) { + this.frequencyValue = frequencyValue; + isSetFrequencyValue = true; // mark as set + return this; + } + + /** + * The date of the month or day of the week when payouts are initiated. Allowed only if + * `frequency` is **monthly** or **weekly**. Possible values if `frequency` is + * **monthly**: **[1 - 31]**. * If your specified date happens on a weekend, the payout is + * initiated on the next business day. * If your specified date (**29**, **30**, or **31**) does + * not exist in a month, the payout is initiated on the last day of that month. Possible values if + * `frequency` is **weekly**: **[1 - 5]**. Default value: The + * `defaultFrequencyValue` from the balance platform schedule that you are applying. + * + * @return frequencyValue The date of the month or day of the week when payouts are initiated. + * Allowed only if `frequency` is **monthly** or **weekly**. Possible values if + * `frequency` is **monthly**: **[1 - 31]**. * If your specified date happens on a + * weekend, the payout is initiated on the next business day. * If your specified date + * (**29**, **30**, or **31**) does not exist in a month, the payout is initiated on the last + * day of that month. Possible values if `frequency` is **weekly**: **[1 - 5]**. + * Default value: The `defaultFrequencyValue` from the balance platform schedule + * that you are applying. + */ + @JsonProperty(JSON_PROPERTY_FREQUENCY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getFrequencyValue() { + return frequencyValue; + } + + /** + * The date of the month or day of the week when payouts are initiated. Allowed only if + * `frequency` is **monthly** or **weekly**. Possible values if `frequency` is + * **monthly**: **[1 - 31]**. * If your specified date happens on a weekend, the payout is + * initiated on the next business day. * If your specified date (**29**, **30**, or **31**) does + * not exist in a month, the payout is initiated on the last day of that month. Possible values if + * `frequency` is **weekly**: **[1 - 5]**. Default value: The + * `defaultFrequencyValue` from the balance platform schedule that you are applying. + * + * @param frequencyValue The date of the month or day of the week when payouts are initiated. + * Allowed only if `frequency` is **monthly** or **weekly**. Possible values if + * `frequency` is **monthly**: **[1 - 31]**. * If your specified date happens on a + * weekend, the payout is initiated on the next business day. * If your specified date + * (**29**, **30**, or **31**) does not exist in a month, the payout is initiated on the last + * day of that month. Possible values if `frequency` is **weekly**: **[1 - 5]**. + * Default value: The `defaultFrequencyValue` from the balance platform schedule + * that you are applying. + */ + @JsonProperty(JSON_PROPERTY_FREQUENCY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFrequencyValue(Integer frequencyValue) { + this.frequencyValue = frequencyValue; + isSetFrequencyValue = true; // mark as set + } + + /** + * The unique identifier of the payout schedule for the balance account. + * + * @param id The unique identifier of the payout schedule for the balance account. + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration id(String id) { + this.id = id; + isSetId = true; // mark as set + return this; + } + + /** + * The unique identifier of the payout schedule for the balance account. + * + * @return id The unique identifier of the payout schedule for the balance account. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + /** + * The unique identifier of the payout schedule for the balance account. + * + * @param id The unique identifier of the payout schedule for the balance account. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + isSetId = true; // mark as set + } + + /** + * The maximum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @param maxPayoutAmount The maximum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration maxPayoutAmount(Long maxPayoutAmount) { + this.maxPayoutAmount = maxPayoutAmount; + isSetMaxPayoutAmount = true; // mark as set + return this; + } + + /** + * The maximum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @return maxPayoutAmount The maximum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_MAX_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMaxPayoutAmount() { + return maxPayoutAmount; + } + + /** + * The maximum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @param maxPayoutAmount The maximum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_MAX_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxPayoutAmount(Long maxPayoutAmount) { + this.maxPayoutAmount = maxPayoutAmount; + isSetMaxPayoutAmount = true; // mark as set + } + + /** + * The minimum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @param minPayoutAmount The minimum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration minPayoutAmount(Long minPayoutAmount) { + this.minPayoutAmount = minPayoutAmount; + isSetMinPayoutAmount = true; // mark as set + return this; + } + + /** + * The minimum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @return minPayoutAmount The minimum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_MIN_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMinPayoutAmount() { + return minPayoutAmount; + } + + /** + * The minimum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @param minPayoutAmount The minimum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_MIN_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMinPayoutAmount(Long minPayoutAmount) { + this.minPayoutAmount = minPayoutAmount; + isSetMinPayoutAmount = true; // mark as set + } + + /** + * Your reference for the payout schedule. This reference does not appear on statements of payouts + * initiated by the payout schedule. + * + * @param reference Your reference for the payout schedule. This reference does not appear on + * statements of payouts initiated by the payout schedule. + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration reference(String reference) { + this.reference = reference; + isSetReference = true; // mark as set + return this; + } + + /** + * Your reference for the payout schedule. This reference does not appear on statements of payouts + * initiated by the payout schedule. + * + * @return reference Your reference for the payout schedule. This reference does not appear on + * statements of payouts initiated by the payout schedule. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReference() { + return reference; + } + + /** + * Your reference for the payout schedule. This reference does not appear on statements of payouts + * initiated by the payout schedule. + * + * @param reference Your reference for the payout schedule. This reference does not appear on + * statements of payouts initiated by the payout schedule. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReference(String reference) { + this.reference = reference; + isSetReference = true; // mark as set + } + + /** + * The reference for beneficiary used for all payouts initiated by this payout schedule. This + * reference is sent to the recipient of the payout and is included in all webhooks related to the + * payout. Supported characters: **a-z**, **A-Z**, **0-9**. Default value: The + * `defaultReferenceForBeneficiary` from the balance platform schedule that you are + * applying. + * + * @param referenceForBeneficiary The reference for beneficiary used for all payouts initiated by + * this payout schedule. This reference is sent to the recipient of the payout and is included + * in all webhooks related to the payout. Supported characters: **a-z**, **A-Z**, **0-9**. + * Default value: The `defaultReferenceForBeneficiary` from the balance platform + * schedule that you are applying. + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration referenceForBeneficiary(String referenceForBeneficiary) { + this.referenceForBeneficiary = referenceForBeneficiary; + isSetReferenceForBeneficiary = true; // mark as set + return this; + } + + /** + * The reference for beneficiary used for all payouts initiated by this payout schedule. This + * reference is sent to the recipient of the payout and is included in all webhooks related to the + * payout. Supported characters: **a-z**, **A-Z**, **0-9**. Default value: The + * `defaultReferenceForBeneficiary` from the balance platform schedule that you are + * applying. + * + * @return referenceForBeneficiary The reference for beneficiary used for all payouts initiated by + * this payout schedule. This reference is sent to the recipient of the payout and is included + * in all webhooks related to the payout. Supported characters: **a-z**, **A-Z**, **0-9**. + * Default value: The `defaultReferenceForBeneficiary` from the balance platform + * schedule that you are applying. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReferenceForBeneficiary() { + return referenceForBeneficiary; + } + + /** + * The reference for beneficiary used for all payouts initiated by this payout schedule. This + * reference is sent to the recipient of the payout and is included in all webhooks related to the + * payout. Supported characters: **a-z**, **A-Z**, **0-9**. Default value: The + * `defaultReferenceForBeneficiary` from the balance platform schedule that you are + * applying. + * + * @param referenceForBeneficiary The reference for beneficiary used for all payouts initiated by + * this payout schedule. This reference is sent to the recipient of the payout and is included + * in all webhooks related to the payout. Supported characters: **a-z**, **A-Z**, **0-9**. + * Default value: The `defaultReferenceForBeneficiary` from the balance platform + * schedule that you are applying. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReferenceForBeneficiary(String referenceForBeneficiary) { + this.referenceForBeneficiary = referenceForBeneficiary; + isSetReferenceForBeneficiary = true; // mark as set + } + + /** + * The amount of funds that must remain available in the balance account after an execution of the + * payout schedule. If the funds in the balance account are less than the retained amount, the + * execution is not initiated. Default value: **0** + * + * @param retainedAmount The amount of funds that must remain available in the balance account + * after an execution of the payout schedule. If the funds in the balance account are less + * than the retained amount, the execution is not initiated. Default value: **0** + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration retainedAmount(Long retainedAmount) { + this.retainedAmount = retainedAmount; + isSetRetainedAmount = true; // mark as set + return this; + } + + /** + * The amount of funds that must remain available in the balance account after an execution of the + * payout schedule. If the funds in the balance account are less than the retained amount, the + * execution is not initiated. Default value: **0** + * + * @return retainedAmount The amount of funds that must remain available in the balance account + * after an execution of the payout schedule. If the funds in the balance account are less + * than the retained amount, the execution is not initiated. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_RETAINED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getRetainedAmount() { + return retainedAmount; + } + + /** + * The amount of funds that must remain available in the balance account after an execution of the + * payout schedule. If the funds in the balance account are less than the retained amount, the + * execution is not initiated. Default value: **0** + * + * @param retainedAmount The amount of funds that must remain available in the balance account + * after an execution of the payout schedule. If the funds in the balance account are less + * than the retained amount, the execution is not initiated. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_RETAINED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRetainedAmount(Long retainedAmount) { + this.retainedAmount = retainedAmount; + isSetRetainedAmount = true; // mark as set + } + + /** + * The time of day when the sales day is closed in balance account time zone. The sales day + * closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * + * @param salesDayClosingTime The time of day when the sales day is closed in balance account time + * zone. The sales day closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + * @deprecated + */ + @Deprecated + public BalanceAccountConfiguration salesDayClosingTime(String salesDayClosingTime) { + this.salesDayClosingTime = salesDayClosingTime; + isSetSalesDayClosingTime = true; // mark as set + return this; + } + + /** + * The time of day when the sales day is closed in balance account time zone. The sales day + * closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * + * @return salesDayClosingTime The time of day when the sales day is closed in balance account + * time zone. The sales day closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * @deprecated + */ + @Deprecated + @JsonProperty(JSON_PROPERTY_SALES_DAY_CLOSING_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSalesDayClosingTime() { + return salesDayClosingTime; + } + + /** + * The time of day when the sales day is closed in balance account time zone. The sales day + * closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * + * @param salesDayClosingTime The time of day when the sales day is closed in balance account time + * zone. The sales day closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * @deprecated + */ + @Deprecated + @JsonProperty(JSON_PROPERTY_SALES_DAY_CLOSING_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSalesDayClosingTime(String salesDayClosingTime) { + this.salesDayClosingTime = salesDayClosingTime; + isSetSalesDayClosingTime = true; // mark as set + } + + /** + * The unique identifier of the transfer instrument to which the funds are paid out. + * + * @param transferInstrumentId The unique identifier of the transfer instrument to which the funds + * are paid out. + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration transferInstrumentId(String transferInstrumentId) { + this.transferInstrumentId = transferInstrumentId; + isSetTransferInstrumentId = true; // mark as set + return this; + } + + /** + * The unique identifier of the transfer instrument to which the funds are paid out. + * + * @return transferInstrumentId The unique identifier of the transfer instrument to which the + * funds are paid out. + */ + @JsonProperty(JSON_PROPERTY_TRANSFER_INSTRUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTransferInstrumentId() { + return transferInstrumentId; + } + + /** + * The unique identifier of the transfer instrument to which the funds are paid out. + * + * @param transferInstrumentId The unique identifier of the transfer instrument to which the funds + * are paid out. + */ + @JsonProperty(JSON_PROPERTY_TRANSFER_INSTRUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransferInstrumentId(String transferInstrumentId) { + this.transferInstrumentId = transferInstrumentId; + isSetTransferInstrumentId = true; // mark as set + } + + /** + * The date and time when the payout schedule was updated. + * + * @param updatedAt The date and time when the payout schedule was updated. + * @return the current {@code BalanceAccountConfiguration} instance, allowing for method chaining + */ + public BalanceAccountConfiguration updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + isSetUpdatedAt = true; // mark as set + return this; + } + + /** + * The date and time when the payout schedule was updated. + * + * @return updatedAt The date and time when the payout schedule was updated. + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + /** + * The date and time when the payout schedule was updated. + * + * @param updatedAt The date and time when the payout schedule was updated. + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + isSetUpdatedAt = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public BalanceAccountConfiguration 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 BalanceAccountConfiguration object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceAccountConfiguration balanceAccountConfiguration = (BalanceAccountConfiguration) o; + return Objects.equals(this.balanceAccountId, balanceAccountConfiguration.balanceAccountId) + && Objects.equals( + this.isSetBalanceAccountId, balanceAccountConfiguration.isSetBalanceAccountId) + && Objects.equals( + this.balancePlatformPayoutScheduleId, + balanceAccountConfiguration.balancePlatformPayoutScheduleId) + && Objects.equals( + this.isSetBalancePlatformPayoutScheduleId, + balanceAccountConfiguration.isSetBalancePlatformPayoutScheduleId) + && Objects.equals(this.createdAt, balanceAccountConfiguration.createdAt) + && Objects.equals(this.isSetCreatedAt, balanceAccountConfiguration.isSetCreatedAt) + && Objects.equals(this.currency, balanceAccountConfiguration.currency) + && Objects.equals(this.isSetCurrency, balanceAccountConfiguration.isSetCurrency) + && Objects.equals(this.description, balanceAccountConfiguration.description) + && Objects.equals(this.isSetDescription, balanceAccountConfiguration.isSetDescription) + && Objects.equals(this.enabled, balanceAccountConfiguration.enabled) + && Objects.equals(this.isSetEnabled, balanceAccountConfiguration.isSetEnabled) + && Objects.equals(this.frequency, balanceAccountConfiguration.frequency) + && Objects.equals(this.isSetFrequency, balanceAccountConfiguration.isSetFrequency) + && Objects.equals(this.frequencyValue, balanceAccountConfiguration.frequencyValue) + && Objects.equals(this.isSetFrequencyValue, balanceAccountConfiguration.isSetFrequencyValue) + && Objects.equals(this.id, balanceAccountConfiguration.id) + && Objects.equals(this.isSetId, balanceAccountConfiguration.isSetId) + && Objects.equals(this.maxPayoutAmount, balanceAccountConfiguration.maxPayoutAmount) + && Objects.equals( + this.isSetMaxPayoutAmount, balanceAccountConfiguration.isSetMaxPayoutAmount) + && Objects.equals(this.minPayoutAmount, balanceAccountConfiguration.minPayoutAmount) + && Objects.equals( + this.isSetMinPayoutAmount, balanceAccountConfiguration.isSetMinPayoutAmount) + && Objects.equals(this.reference, balanceAccountConfiguration.reference) + && Objects.equals(this.isSetReference, balanceAccountConfiguration.isSetReference) + && Objects.equals( + this.referenceForBeneficiary, balanceAccountConfiguration.referenceForBeneficiary) + && Objects.equals( + this.isSetReferenceForBeneficiary, + balanceAccountConfiguration.isSetReferenceForBeneficiary) + && Objects.equals(this.retainedAmount, balanceAccountConfiguration.retainedAmount) + && Objects.equals(this.isSetRetainedAmount, balanceAccountConfiguration.isSetRetainedAmount) + && Objects.equals(this.salesDayClosingTime, balanceAccountConfiguration.salesDayClosingTime) + && Objects.equals( + this.isSetSalesDayClosingTime, balanceAccountConfiguration.isSetSalesDayClosingTime) + && Objects.equals( + this.transferInstrumentId, balanceAccountConfiguration.transferInstrumentId) + && Objects.equals( + this.isSetTransferInstrumentId, balanceAccountConfiguration.isSetTransferInstrumentId) + && Objects.equals(this.updatedAt, balanceAccountConfiguration.updatedAt) + && Objects.equals(this.isSetUpdatedAt, balanceAccountConfiguration.isSetUpdatedAt); + } + + @Override + public int hashCode() { + return Objects.hash( + balanceAccountId, + isSetBalanceAccountId, + balancePlatformPayoutScheduleId, + isSetBalancePlatformPayoutScheduleId, + createdAt, + isSetCreatedAt, + currency, + isSetCurrency, + description, + isSetDescription, + enabled, + isSetEnabled, + frequency, + isSetFrequency, + frequencyValue, + isSetFrequencyValue, + id, + isSetId, + maxPayoutAmount, + isSetMaxPayoutAmount, + minPayoutAmount, + isSetMinPayoutAmount, + reference, + isSetReference, + referenceForBeneficiary, + isSetReferenceForBeneficiary, + retainedAmount, + isSetRetainedAmount, + salesDayClosingTime, + isSetSalesDayClosingTime, + transferInstrumentId, + isSetTransferInstrumentId, + updatedAt, + isSetUpdatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceAccountConfiguration {\n"); + sb.append(" balanceAccountId: ").append(toIndentedString(balanceAccountId)).append("\n"); + sb.append(" balancePlatformPayoutScheduleId: ") + .append(toIndentedString(balancePlatformPayoutScheduleId)) + .append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); + sb.append(" frequencyValue: ").append(toIndentedString(frequencyValue)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" maxPayoutAmount: ").append(toIndentedString(maxPayoutAmount)).append("\n"); + sb.append(" minPayoutAmount: ").append(toIndentedString(minPayoutAmount)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" referenceForBeneficiary: ") + .append(toIndentedString(referenceForBeneficiary)) + .append("\n"); + sb.append(" retainedAmount: ").append(toIndentedString(retainedAmount)).append("\n"); + sb.append(" salesDayClosingTime: ") + .append(toIndentedString(salesDayClosingTime)) + .append("\n"); + sb.append(" transferInstrumentId: ") + .append(toIndentedString(transferInstrumentId)) + .append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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 getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetBalanceAccountId) { + addIfNull(nulls, JSON_PROPERTY_BALANCE_ACCOUNT_ID, this.balanceAccountId); + } + if (isSetBalancePlatformPayoutScheduleId) { + addIfNull( + nulls, + JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULE_ID, + this.balancePlatformPayoutScheduleId); + } + if (isSetCreatedAt) { + addIfNull(nulls, JSON_PROPERTY_CREATED_AT, this.createdAt); + } + if (isSetCurrency) { + addIfNull(nulls, JSON_PROPERTY_CURRENCY, this.currency); + } + if (isSetDescription) { + addIfNull(nulls, JSON_PROPERTY_DESCRIPTION, this.description); + } + if (isSetEnabled) { + addIfNull(nulls, JSON_PROPERTY_ENABLED, this.enabled); + } + if (isSetFrequency) { + addIfNull(nulls, JSON_PROPERTY_FREQUENCY, this.frequency); + } + if (isSetFrequencyValue) { + addIfNull(nulls, JSON_PROPERTY_FREQUENCY_VALUE, this.frequencyValue); + } + if (isSetId) { + addIfNull(nulls, JSON_PROPERTY_ID, this.id); + } + if (isSetMaxPayoutAmount) { + addIfNull(nulls, JSON_PROPERTY_MAX_PAYOUT_AMOUNT, this.maxPayoutAmount); + } + if (isSetMinPayoutAmount) { + addIfNull(nulls, JSON_PROPERTY_MIN_PAYOUT_AMOUNT, this.minPayoutAmount); + } + if (isSetReference) { + addIfNull(nulls, JSON_PROPERTY_REFERENCE, this.reference); + } + if (isSetReferenceForBeneficiary) { + addIfNull(nulls, JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY, this.referenceForBeneficiary); + } + if (isSetRetainedAmount) { + addIfNull(nulls, JSON_PROPERTY_RETAINED_AMOUNT, this.retainedAmount); + } + if (isSetSalesDayClosingTime) { + addIfNull(nulls, JSON_PROPERTY_SALES_DAY_CLOSING_TIME, this.salesDayClosingTime); + } + if (isSetTransferInstrumentId) { + addIfNull(nulls, JSON_PROPERTY_TRANSFER_INSTRUMENT_ID, this.transferInstrumentId); + } + if (isSetUpdatedAt) { + addIfNull(nulls, JSON_PROPERTY_UPDATED_AT, this.updatedAt); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of BalanceAccountConfiguration given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalanceAccountConfiguration + * @throws JsonProcessingException if the JSON string is invalid with respect to + * BalanceAccountConfiguration + */ + public static BalanceAccountConfiguration fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BalanceAccountConfiguration.class); + } + + /** + * Convert an instance of BalanceAccountConfiguration to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/BalanceAccountConfigurationRequest.java b/src/main/java/com/adyen/model/balanceplatform/BalanceAccountConfigurationRequest.java new file mode 100644 index 000000000..e18cabb62 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/BalanceAccountConfigurationRequest.java @@ -0,0 +1,1035 @@ +/* + * 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.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; + +/** BalanceAccountConfigurationRequest */ +@JsonPropertyOrder({ + BalanceAccountConfigurationRequest.JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULE_ID, + BalanceAccountConfigurationRequest.JSON_PROPERTY_CURRENCY, + BalanceAccountConfigurationRequest.JSON_PROPERTY_DESCRIPTION, + BalanceAccountConfigurationRequest.JSON_PROPERTY_ENABLED, + BalanceAccountConfigurationRequest.JSON_PROPERTY_FREQUENCY, + BalanceAccountConfigurationRequest.JSON_PROPERTY_FREQUENCY_VALUE, + BalanceAccountConfigurationRequest.JSON_PROPERTY_MAX_PAYOUT_AMOUNT, + BalanceAccountConfigurationRequest.JSON_PROPERTY_MIN_PAYOUT_AMOUNT, + BalanceAccountConfigurationRequest.JSON_PROPERTY_REFERENCE, + BalanceAccountConfigurationRequest.JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY, + BalanceAccountConfigurationRequest.JSON_PROPERTY_RETAINED_AMOUNT, + BalanceAccountConfigurationRequest.JSON_PROPERTY_SALES_DAY_CLOSING_TIME, + BalanceAccountConfigurationRequest.JSON_PROPERTY_TRANSFER_INSTRUMENT_ID +}) +public class BalanceAccountConfigurationRequest { + public static final String JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULE_ID = + "balancePlatformPayoutScheduleId"; + private String balancePlatformPayoutScheduleId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetBalancePlatformPayoutScheduleId = false; + + 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_DESCRIPTION = "description"; + private String description; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDescription = false; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetEnabled = false; + + /** + * The frequency of payouts initiated by this payout schedule. Possible values: * daily * weekdays + * * weekly * monthly Default value: The `defaultFrequency` from the balance platform + * schedule that you are applying. + */ + public enum FrequencyEnum { + DAILY(String.valueOf("daily")), + + WEEKLY(String.valueOf("weekly")), + + WEEKDAYS(String.valueOf("weekdays")), + + MONTHLY(String.valueOf("monthly")); + + private static final Logger LOG = Logger.getLogger(FrequencyEnum.class.getName()); + + private String value; + + FrequencyEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FrequencyEnum fromValue(String value) { + for (FrequencyEnum b : FrequencyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "FrequencyEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(FrequencyEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_FREQUENCY = "frequency"; + private FrequencyEnum frequency; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFrequency = false; + + public static final String JSON_PROPERTY_FREQUENCY_VALUE = "frequencyValue"; + private Integer frequencyValue; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFrequencyValue = false; + + public static final String JSON_PROPERTY_MAX_PAYOUT_AMOUNT = "maxPayoutAmount"; + private Long maxPayoutAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMaxPayoutAmount = false; + + public static final String JSON_PROPERTY_MIN_PAYOUT_AMOUNT = "minPayoutAmount"; + private Long minPayoutAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMinPayoutAmount = false; + + public static final String JSON_PROPERTY_REFERENCE = "reference"; + private String reference; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetReference = false; + + public static final String JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY = "referenceForBeneficiary"; + private String referenceForBeneficiary; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetReferenceForBeneficiary = false; + + public static final String JSON_PROPERTY_RETAINED_AMOUNT = "retainedAmount"; + private Long retainedAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRetainedAmount = false; + + public static final String JSON_PROPERTY_SALES_DAY_CLOSING_TIME = "salesDayClosingTime"; + /* deprecated */ + @Deprecated private String salesDayClosingTime; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetSalesDayClosingTime = false; + + public static final String JSON_PROPERTY_TRANSFER_INSTRUMENT_ID = "transferInstrumentId"; + private String transferInstrumentId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTransferInstrumentId = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public BalanceAccountConfigurationRequest() {} + + /** + * The unique identifier of the payout schedule that is applied to the balance account. + * + * @param balancePlatformPayoutScheduleId The unique identifier of the payout schedule that is + * applied to the balance account. + * @return the current {@code BalanceAccountConfigurationRequest} instance, allowing for method + * chaining + */ + public BalanceAccountConfigurationRequest balancePlatformPayoutScheduleId( + String balancePlatformPayoutScheduleId) { + this.balancePlatformPayoutScheduleId = balancePlatformPayoutScheduleId; + isSetBalancePlatformPayoutScheduleId = true; // mark as set + return this; + } + + /** + * The unique identifier of the payout schedule that is applied to the balance account. + * + * @return balancePlatformPayoutScheduleId The unique identifier of the payout schedule that is + * applied to the balance account. + */ + @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBalancePlatformPayoutScheduleId() { + return balancePlatformPayoutScheduleId; + } + + /** + * The unique identifier of the payout schedule that is applied to the balance account. + * + * @param balancePlatformPayoutScheduleId The unique identifier of the payout schedule that is + * applied to the balance account. + */ + @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBalancePlatformPayoutScheduleId(String balancePlatformPayoutScheduleId) { + this.balancePlatformPayoutScheduleId = balancePlatformPayoutScheduleId; + isSetBalancePlatformPayoutScheduleId = true; // mark as set + } + + /** + * The three-character [ISO code](https://docs.adyen.com/development-resources/currency-codes) of + * the currency used for this schedule. + * + * @param currency The three-character [ISO + * code](https://docs.adyen.com/development-resources/currency-codes) of the currency used for + * this schedule. + * @return the current {@code BalanceAccountConfigurationRequest} instance, allowing for method + * chaining + */ + public BalanceAccountConfigurationRequest currency(String currency) { + this.currency = currency; + isSetCurrency = true; // mark as set + return this; + } + + /** + * The three-character [ISO code](https://docs.adyen.com/development-resources/currency-codes) of + * the currency used for this schedule. + * + * @return currency The three-character [ISO + * code](https://docs.adyen.com/development-resources/currency-codes) of the currency used for + * this schedule. + */ + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCurrency() { + return currency; + } + + /** + * The three-character [ISO code](https://docs.adyen.com/development-resources/currency-codes) of + * the currency used for this schedule. + * + * @param currency The three-character [ISO + * code](https://docs.adyen.com/development-resources/currency-codes) of the currency used for + * this schedule. + */ + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrency(String currency) { + this.currency = currency; + isSetCurrency = true; // mark as set + } + + /** + * The description used for all payouts initiated by this payout schedule. Maximum length: 140 + * characters. If your description is longer, it may be truncated. Default value: The + * `defaultDescription` from the balance platform schedule that you are applying. + * + * @param description The description used for all payouts initiated by this payout schedule. + * Maximum length: 140 characters. If your description is longer, it may be truncated. Default + * value: The `defaultDescription` from the balance platform schedule that you are + * applying. + * @return the current {@code BalanceAccountConfigurationRequest} instance, allowing for method + * chaining + */ + public BalanceAccountConfigurationRequest description(String description) { + this.description = description; + isSetDescription = true; // mark as set + return this; + } + + /** + * The description used for all payouts initiated by this payout schedule. Maximum length: 140 + * characters. If your description is longer, it may be truncated. Default value: The + * `defaultDescription` from the balance platform schedule that you are applying. + * + * @return description The description used for all payouts initiated by this payout schedule. + * Maximum length: 140 characters. If your description is longer, it may be truncated. Default + * value: The `defaultDescription` from the balance platform schedule that you are + * applying. + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + /** + * The description used for all payouts initiated by this payout schedule. Maximum length: 140 + * characters. If your description is longer, it may be truncated. Default value: The + * `defaultDescription` from the balance platform schedule that you are applying. + * + * @param description The description used for all payouts initiated by this payout schedule. + * Maximum length: 140 characters. If your description is longer, it may be truncated. Default + * value: The `defaultDescription` from the balance platform schedule that you are + * applying. + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + isSetDescription = true; // mark as set + } + + /** + * Specifies whether the payout schedule is enabled immediately after it is created. + * + * @param enabled Specifies whether the payout schedule is enabled immediately after it is + * created. + * @return the current {@code BalanceAccountConfigurationRequest} instance, allowing for method + * chaining + */ + public BalanceAccountConfigurationRequest enabled(Boolean enabled) { + this.enabled = enabled; + isSetEnabled = true; // mark as set + return this; + } + + /** + * Specifies whether the payout schedule is enabled immediately after it is created. + * + * @return enabled Specifies whether the payout schedule is enabled immediately after it is + * created. + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + /** + * Specifies whether the payout schedule is enabled immediately after it is created. + * + * @param enabled Specifies whether the payout schedule is enabled immediately after it is + * created. + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + isSetEnabled = true; // mark as set + } + + /** + * The frequency of payouts initiated by this payout schedule. Possible values: * daily * weekdays + * * weekly * monthly Default value: The `defaultFrequency` from the balance platform + * schedule that you are applying. + * + * @param frequency The frequency of payouts initiated by this payout schedule. Possible values: * + * daily * weekdays * weekly * monthly Default value: The `defaultFrequency` from + * the balance platform schedule that you are applying. + * @return the current {@code BalanceAccountConfigurationRequest} instance, allowing for method + * chaining + */ + public BalanceAccountConfigurationRequest frequency(FrequencyEnum frequency) { + this.frequency = frequency; + isSetFrequency = true; // mark as set + return this; + } + + /** + * The frequency of payouts initiated by this payout schedule. Possible values: * daily * weekdays + * * weekly * monthly Default value: The `defaultFrequency` from the balance platform + * schedule that you are applying. + * + * @return frequency The frequency of payouts initiated by this payout schedule. Possible values: + * * daily * weekdays * weekly * monthly Default value: The `defaultFrequency` from + * the balance platform schedule that you are applying. + */ + @JsonProperty(JSON_PROPERTY_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FrequencyEnum getFrequency() { + return frequency; + } + + /** + * The frequency of payouts initiated by this payout schedule. Possible values: * daily * weekdays + * * weekly * monthly Default value: The `defaultFrequency` from the balance platform + * schedule that you are applying. + * + * @param frequency The frequency of payouts initiated by this payout schedule. Possible values: * + * daily * weekdays * weekly * monthly Default value: The `defaultFrequency` from + * the balance platform schedule that you are applying. + */ + @JsonProperty(JSON_PROPERTY_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFrequency(FrequencyEnum frequency) { + this.frequency = frequency; + isSetFrequency = true; // mark as set + } + + /** + * The date of the month or day of the week when payouts are initiated. Allowed only if + * `frequency` is **monthly** or **weekly**. Possible values if `frequency` is + * **monthly**: **[1 - 31]**. * If your specified date happens on a weekend, the payout is + * initiated on the next business day. * If your specified date (**29**, **30**, or **31**) does + * not exist in a month, the payout is initiated on the last day of that month. Possible values if + * `frequency` is **weekly**: **[1 - 5]**. Default value: The + * `defaultFrequencyValue` from the balance platform schedule that you are applying. + * + * @param frequencyValue The date of the month or day of the week when payouts are initiated. + * Allowed only if `frequency` is **monthly** or **weekly**. Possible values if + * `frequency` is **monthly**: **[1 - 31]**. * If your specified date happens on a + * weekend, the payout is initiated on the next business day. * If your specified date + * (**29**, **30**, or **31**) does not exist in a month, the payout is initiated on the last + * day of that month. Possible values if `frequency` is **weekly**: **[1 - 5]**. + * Default value: The `defaultFrequencyValue` from the balance platform schedule + * that you are applying. + * @return the current {@code BalanceAccountConfigurationRequest} instance, allowing for method + * chaining + */ + public BalanceAccountConfigurationRequest frequencyValue(Integer frequencyValue) { + this.frequencyValue = frequencyValue; + isSetFrequencyValue = true; // mark as set + return this; + } + + /** + * The date of the month or day of the week when payouts are initiated. Allowed only if + * `frequency` is **monthly** or **weekly**. Possible values if `frequency` is + * **monthly**: **[1 - 31]**. * If your specified date happens on a weekend, the payout is + * initiated on the next business day. * If your specified date (**29**, **30**, or **31**) does + * not exist in a month, the payout is initiated on the last day of that month. Possible values if + * `frequency` is **weekly**: **[1 - 5]**. Default value: The + * `defaultFrequencyValue` from the balance platform schedule that you are applying. + * + * @return frequencyValue The date of the month or day of the week when payouts are initiated. + * Allowed only if `frequency` is **monthly** or **weekly**. Possible values if + * `frequency` is **monthly**: **[1 - 31]**. * If your specified date happens on a + * weekend, the payout is initiated on the next business day. * If your specified date + * (**29**, **30**, or **31**) does not exist in a month, the payout is initiated on the last + * day of that month. Possible values if `frequency` is **weekly**: **[1 - 5]**. + * Default value: The `defaultFrequencyValue` from the balance platform schedule + * that you are applying. + */ + @JsonProperty(JSON_PROPERTY_FREQUENCY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getFrequencyValue() { + return frequencyValue; + } + + /** + * The date of the month or day of the week when payouts are initiated. Allowed only if + * `frequency` is **monthly** or **weekly**. Possible values if `frequency` is + * **monthly**: **[1 - 31]**. * If your specified date happens on a weekend, the payout is + * initiated on the next business day. * If your specified date (**29**, **30**, or **31**) does + * not exist in a month, the payout is initiated on the last day of that month. Possible values if + * `frequency` is **weekly**: **[1 - 5]**. Default value: The + * `defaultFrequencyValue` from the balance platform schedule that you are applying. + * + * @param frequencyValue The date of the month or day of the week when payouts are initiated. + * Allowed only if `frequency` is **monthly** or **weekly**. Possible values if + * `frequency` is **monthly**: **[1 - 31]**. * If your specified date happens on a + * weekend, the payout is initiated on the next business day. * If your specified date + * (**29**, **30**, or **31**) does not exist in a month, the payout is initiated on the last + * day of that month. Possible values if `frequency` is **weekly**: **[1 - 5]**. + * Default value: The `defaultFrequencyValue` from the balance platform schedule + * that you are applying. + */ + @JsonProperty(JSON_PROPERTY_FREQUENCY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFrequencyValue(Integer frequencyValue) { + this.frequencyValue = frequencyValue; + isSetFrequencyValue = true; // mark as set + } + + /** + * The maximum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @param maxPayoutAmount The maximum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + * @return the current {@code BalanceAccountConfigurationRequest} instance, allowing for method + * chaining + */ + public BalanceAccountConfigurationRequest maxPayoutAmount(Long maxPayoutAmount) { + this.maxPayoutAmount = maxPayoutAmount; + isSetMaxPayoutAmount = true; // mark as set + return this; + } + + /** + * The maximum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @return maxPayoutAmount The maximum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_MAX_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMaxPayoutAmount() { + return maxPayoutAmount; + } + + /** + * The maximum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @param maxPayoutAmount The maximum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_MAX_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxPayoutAmount(Long maxPayoutAmount) { + this.maxPayoutAmount = maxPayoutAmount; + isSetMaxPayoutAmount = true; // mark as set + } + + /** + * The minimum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @param minPayoutAmount The minimum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + * @return the current {@code BalanceAccountConfigurationRequest} instance, allowing for method + * chaining + */ + public BalanceAccountConfigurationRequest minPayoutAmount(Long minPayoutAmount) { + this.minPayoutAmount = minPayoutAmount; + isSetMinPayoutAmount = true; // mark as set + return this; + } + + /** + * The minimum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @return minPayoutAmount The minimum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_MIN_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMinPayoutAmount() { + return minPayoutAmount; + } + + /** + * The minimum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @param minPayoutAmount The minimum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_MIN_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMinPayoutAmount(Long minPayoutAmount) { + this.minPayoutAmount = minPayoutAmount; + isSetMinPayoutAmount = true; // mark as set + } + + /** + * The merchant reference that will be shown only in the schedule. + * + * @param reference The merchant reference that will be shown only in the schedule. + * @return the current {@code BalanceAccountConfigurationRequest} instance, allowing for method + * chaining + */ + public BalanceAccountConfigurationRequest reference(String reference) { + this.reference = reference; + isSetReference = true; // mark as set + return this; + } + + /** + * The merchant reference that will be shown only in the schedule. + * + * @return reference The merchant reference that will be shown only in the schedule. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReference() { + return reference; + } + + /** + * The merchant reference that will be shown only in the schedule. + * + * @param reference The merchant reference that will be shown only in the schedule. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReference(String reference) { + this.reference = reference; + isSetReference = true; // mark as set + } + + /** + * The reference for beneficiary used for all payouts initiated by this payout schedule. This + * reference is sent to the recipient of the transfer and is included in all webhooks related to + * the payout. Supported characters: **a-z**, **A-Z**, **0-9**, **-** and space. Spaces might be + * replaced with **-** if the recipient bank or payment infrastructure does not allow spaces. + * Default value: The `defaultReferenceForBeneficiary` from the balance platform + * schedule that you are applying. + * + * @param referenceForBeneficiary The reference for beneficiary used for all payouts initiated by + * this payout schedule. This reference is sent to the recipient of the transfer and is + * included in all webhooks related to the payout. Supported characters: **a-z**, **A-Z**, + * **0-9**, **-** and space. Spaces might be replaced with **-** if the recipient bank or + * payment infrastructure does not allow spaces. Default value: The + * `defaultReferenceForBeneficiary` from the balance platform schedule that you are + * applying. + * @return the current {@code BalanceAccountConfigurationRequest} instance, allowing for method + * chaining + */ + public BalanceAccountConfigurationRequest referenceForBeneficiary( + String referenceForBeneficiary) { + this.referenceForBeneficiary = referenceForBeneficiary; + isSetReferenceForBeneficiary = true; // mark as set + return this; + } + + /** + * The reference for beneficiary used for all payouts initiated by this payout schedule. This + * reference is sent to the recipient of the transfer and is included in all webhooks related to + * the payout. Supported characters: **a-z**, **A-Z**, **0-9**, **-** and space. Spaces might be + * replaced with **-** if the recipient bank or payment infrastructure does not allow spaces. + * Default value: The `defaultReferenceForBeneficiary` from the balance platform + * schedule that you are applying. + * + * @return referenceForBeneficiary The reference for beneficiary used for all payouts initiated by + * this payout schedule. This reference is sent to the recipient of the transfer and is + * included in all webhooks related to the payout. Supported characters: **a-z**, **A-Z**, + * **0-9**, **-** and space. Spaces might be replaced with **-** if the recipient bank or + * payment infrastructure does not allow spaces. Default value: The + * `defaultReferenceForBeneficiary` from the balance platform schedule that you are + * applying. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReferenceForBeneficiary() { + return referenceForBeneficiary; + } + + /** + * The reference for beneficiary used for all payouts initiated by this payout schedule. This + * reference is sent to the recipient of the transfer and is included in all webhooks related to + * the payout. Supported characters: **a-z**, **A-Z**, **0-9**, **-** and space. Spaces might be + * replaced with **-** if the recipient bank or payment infrastructure does not allow spaces. + * Default value: The `defaultReferenceForBeneficiary` from the balance platform + * schedule that you are applying. + * + * @param referenceForBeneficiary The reference for beneficiary used for all payouts initiated by + * this payout schedule. This reference is sent to the recipient of the transfer and is + * included in all webhooks related to the payout. Supported characters: **a-z**, **A-Z**, + * **0-9**, **-** and space. Spaces might be replaced with **-** if the recipient bank or + * payment infrastructure does not allow spaces. Default value: The + * `defaultReferenceForBeneficiary` from the balance platform schedule that you are + * applying. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReferenceForBeneficiary(String referenceForBeneficiary) { + this.referenceForBeneficiary = referenceForBeneficiary; + isSetReferenceForBeneficiary = true; // mark as set + } + + /** + * The amount of funds that must remain available in the balance account after an execution of the + * payout schedule. If the funds in the balance account are less than the retained amount, the + * execution is not initiated. Default value: **0** + * + * @param retainedAmount The amount of funds that must remain available in the balance account + * after an execution of the payout schedule. If the funds in the balance account are less + * than the retained amount, the execution is not initiated. Default value: **0** + * @return the current {@code BalanceAccountConfigurationRequest} instance, allowing for method + * chaining + */ + public BalanceAccountConfigurationRequest retainedAmount(Long retainedAmount) { + this.retainedAmount = retainedAmount; + isSetRetainedAmount = true; // mark as set + return this; + } + + /** + * The amount of funds that must remain available in the balance account after an execution of the + * payout schedule. If the funds in the balance account are less than the retained amount, the + * execution is not initiated. Default value: **0** + * + * @return retainedAmount The amount of funds that must remain available in the balance account + * after an execution of the payout schedule. If the funds in the balance account are less + * than the retained amount, the execution is not initiated. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_RETAINED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getRetainedAmount() { + return retainedAmount; + } + + /** + * The amount of funds that must remain available in the balance account after an execution of the + * payout schedule. If the funds in the balance account are less than the retained amount, the + * execution is not initiated. Default value: **0** + * + * @param retainedAmount The amount of funds that must remain available in the balance account + * after an execution of the payout schedule. If the funds in the balance account are less + * than the retained amount, the execution is not initiated. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_RETAINED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRetainedAmount(Long retainedAmount) { + this.retainedAmount = retainedAmount; + isSetRetainedAmount = true; // mark as set + } + + /** + * The time of day when the sales day is closed in balance account time zone. The sales day + * closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * + * @param salesDayClosingTime The time of day when the sales day is closed in balance account time + * zone. The sales day closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * @return the current {@code BalanceAccountConfigurationRequest} instance, allowing for method + * chaining + * @deprecated + */ + @Deprecated + public BalanceAccountConfigurationRequest salesDayClosingTime(String salesDayClosingTime) { + this.salesDayClosingTime = salesDayClosingTime; + isSetSalesDayClosingTime = true; // mark as set + return this; + } + + /** + * The time of day when the sales day is closed in balance account time zone. The sales day + * closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * + * @return salesDayClosingTime The time of day when the sales day is closed in balance account + * time zone. The sales day closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * @deprecated + */ + @Deprecated + @JsonProperty(JSON_PROPERTY_SALES_DAY_CLOSING_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSalesDayClosingTime() { + return salesDayClosingTime; + } + + /** + * The time of day when the sales day is closed in balance account time zone. The sales day + * closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * + * @param salesDayClosingTime The time of day when the sales day is closed in balance account time + * zone. The sales day closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * @deprecated + */ + @Deprecated + @JsonProperty(JSON_PROPERTY_SALES_DAY_CLOSING_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSalesDayClosingTime(String salesDayClosingTime) { + this.salesDayClosingTime = salesDayClosingTime; + isSetSalesDayClosingTime = true; // mark as set + } + + /** + * The unique identifier of the transfer instrument to which the funds are paid out. + * + * @param transferInstrumentId The unique identifier of the transfer instrument to which the funds + * are paid out. + * @return the current {@code BalanceAccountConfigurationRequest} instance, allowing for method + * chaining + */ + public BalanceAccountConfigurationRequest transferInstrumentId(String transferInstrumentId) { + this.transferInstrumentId = transferInstrumentId; + isSetTransferInstrumentId = true; // mark as set + return this; + } + + /** + * The unique identifier of the transfer instrument to which the funds are paid out. + * + * @return transferInstrumentId The unique identifier of the transfer instrument to which the + * funds are paid out. + */ + @JsonProperty(JSON_PROPERTY_TRANSFER_INSTRUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTransferInstrumentId() { + return transferInstrumentId; + } + + /** + * The unique identifier of the transfer instrument to which the funds are paid out. + * + * @param transferInstrumentId The unique identifier of the transfer instrument to which the funds + * are paid out. + */ + @JsonProperty(JSON_PROPERTY_TRANSFER_INSTRUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransferInstrumentId(String transferInstrumentId) { + this.transferInstrumentId = transferInstrumentId; + isSetTransferInstrumentId = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public BalanceAccountConfigurationRequest 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 BalanceAccountConfigurationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceAccountConfigurationRequest balanceAccountConfigurationRequest = + (BalanceAccountConfigurationRequest) o; + return Objects.equals( + this.balancePlatformPayoutScheduleId, + balanceAccountConfigurationRequest.balancePlatformPayoutScheduleId) + && Objects.equals( + this.isSetBalancePlatformPayoutScheduleId, + balanceAccountConfigurationRequest.isSetBalancePlatformPayoutScheduleId) + && Objects.equals(this.currency, balanceAccountConfigurationRequest.currency) + && Objects.equals(this.isSetCurrency, balanceAccountConfigurationRequest.isSetCurrency) + && Objects.equals(this.description, balanceAccountConfigurationRequest.description) + && Objects.equals( + this.isSetDescription, balanceAccountConfigurationRequest.isSetDescription) + && Objects.equals(this.enabled, balanceAccountConfigurationRequest.enabled) + && Objects.equals(this.isSetEnabled, balanceAccountConfigurationRequest.isSetEnabled) + && Objects.equals(this.frequency, balanceAccountConfigurationRequest.frequency) + && Objects.equals(this.isSetFrequency, balanceAccountConfigurationRequest.isSetFrequency) + && Objects.equals(this.frequencyValue, balanceAccountConfigurationRequest.frequencyValue) + && Objects.equals( + this.isSetFrequencyValue, balanceAccountConfigurationRequest.isSetFrequencyValue) + && Objects.equals(this.maxPayoutAmount, balanceAccountConfigurationRequest.maxPayoutAmount) + && Objects.equals( + this.isSetMaxPayoutAmount, balanceAccountConfigurationRequest.isSetMaxPayoutAmount) + && Objects.equals(this.minPayoutAmount, balanceAccountConfigurationRequest.minPayoutAmount) + && Objects.equals( + this.isSetMinPayoutAmount, balanceAccountConfigurationRequest.isSetMinPayoutAmount) + && Objects.equals(this.reference, balanceAccountConfigurationRequest.reference) + && Objects.equals(this.isSetReference, balanceAccountConfigurationRequest.isSetReference) + && Objects.equals( + this.referenceForBeneficiary, + balanceAccountConfigurationRequest.referenceForBeneficiary) + && Objects.equals( + this.isSetReferenceForBeneficiary, + balanceAccountConfigurationRequest.isSetReferenceForBeneficiary) + && Objects.equals(this.retainedAmount, balanceAccountConfigurationRequest.retainedAmount) + && Objects.equals( + this.isSetRetainedAmount, balanceAccountConfigurationRequest.isSetRetainedAmount) + && Objects.equals( + this.salesDayClosingTime, balanceAccountConfigurationRequest.salesDayClosingTime) + && Objects.equals( + this.isSetSalesDayClosingTime, + balanceAccountConfigurationRequest.isSetSalesDayClosingTime) + && Objects.equals( + this.transferInstrumentId, balanceAccountConfigurationRequest.transferInstrumentId) + && Objects.equals( + this.isSetTransferInstrumentId, + balanceAccountConfigurationRequest.isSetTransferInstrumentId); + } + + @Override + public int hashCode() { + return Objects.hash( + balancePlatformPayoutScheduleId, + isSetBalancePlatformPayoutScheduleId, + currency, + isSetCurrency, + description, + isSetDescription, + enabled, + isSetEnabled, + frequency, + isSetFrequency, + frequencyValue, + isSetFrequencyValue, + maxPayoutAmount, + isSetMaxPayoutAmount, + minPayoutAmount, + isSetMinPayoutAmount, + reference, + isSetReference, + referenceForBeneficiary, + isSetReferenceForBeneficiary, + retainedAmount, + isSetRetainedAmount, + salesDayClosingTime, + isSetSalesDayClosingTime, + transferInstrumentId, + isSetTransferInstrumentId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceAccountConfigurationRequest {\n"); + sb.append(" balancePlatformPayoutScheduleId: ") + .append(toIndentedString(balancePlatformPayoutScheduleId)) + .append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); + sb.append(" frequencyValue: ").append(toIndentedString(frequencyValue)).append("\n"); + sb.append(" maxPayoutAmount: ").append(toIndentedString(maxPayoutAmount)).append("\n"); + sb.append(" minPayoutAmount: ").append(toIndentedString(minPayoutAmount)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" referenceForBeneficiary: ") + .append(toIndentedString(referenceForBeneficiary)) + .append("\n"); + sb.append(" retainedAmount: ").append(toIndentedString(retainedAmount)).append("\n"); + sb.append(" salesDayClosingTime: ") + .append(toIndentedString(salesDayClosingTime)) + .append("\n"); + sb.append(" transferInstrumentId: ") + .append(toIndentedString(transferInstrumentId)) + .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 getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetBalancePlatformPayoutScheduleId) { + addIfNull( + nulls, + JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULE_ID, + this.balancePlatformPayoutScheduleId); + } + if (isSetCurrency) { + addIfNull(nulls, JSON_PROPERTY_CURRENCY, this.currency); + } + if (isSetDescription) { + addIfNull(nulls, JSON_PROPERTY_DESCRIPTION, this.description); + } + if (isSetEnabled) { + addIfNull(nulls, JSON_PROPERTY_ENABLED, this.enabled); + } + if (isSetFrequency) { + addIfNull(nulls, JSON_PROPERTY_FREQUENCY, this.frequency); + } + if (isSetFrequencyValue) { + addIfNull(nulls, JSON_PROPERTY_FREQUENCY_VALUE, this.frequencyValue); + } + if (isSetMaxPayoutAmount) { + addIfNull(nulls, JSON_PROPERTY_MAX_PAYOUT_AMOUNT, this.maxPayoutAmount); + } + if (isSetMinPayoutAmount) { + addIfNull(nulls, JSON_PROPERTY_MIN_PAYOUT_AMOUNT, this.minPayoutAmount); + } + if (isSetReference) { + addIfNull(nulls, JSON_PROPERTY_REFERENCE, this.reference); + } + if (isSetReferenceForBeneficiary) { + addIfNull(nulls, JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY, this.referenceForBeneficiary); + } + if (isSetRetainedAmount) { + addIfNull(nulls, JSON_PROPERTY_RETAINED_AMOUNT, this.retainedAmount); + } + if (isSetSalesDayClosingTime) { + addIfNull(nulls, JSON_PROPERTY_SALES_DAY_CLOSING_TIME, this.salesDayClosingTime); + } + if (isSetTransferInstrumentId) { + addIfNull(nulls, JSON_PROPERTY_TRANSFER_INSTRUMENT_ID, this.transferInstrumentId); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of BalanceAccountConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalanceAccountConfigurationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to + * BalanceAccountConfigurationRequest + */ + public static BalanceAccountConfigurationRequest fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BalanceAccountConfigurationRequest.class); + } + + /** + * Convert an instance of BalanceAccountConfigurationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/BalanceAccountConfigurations.java b/src/main/java/com/adyen/model/balanceplatform/BalanceAccountConfigurations.java new file mode 100644 index 000000000..ce294232e --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/BalanceAccountConfigurations.java @@ -0,0 +1,251 @@ +/* + * 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.*; +import java.util.ArrayList; +import java.util.List; + +/** BalanceAccountConfigurations */ +@JsonPropertyOrder({ + BalanceAccountConfigurations.JSON_PROPERTY_BALANCE_ACCOUNT_PAYOUT_SCHEDULES, + BalanceAccountConfigurations.JSON_PROPERTY_LINK +}) +public class BalanceAccountConfigurations { + public static final String JSON_PROPERTY_BALANCE_ACCOUNT_PAYOUT_SCHEDULES = + "balanceAccountPayoutSchedules"; + private List balanceAccountPayoutSchedules; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetBalanceAccountPayoutSchedules = false; + + public static final String JSON_PROPERTY_LINK = "link"; + private Link link; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetLink = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public BalanceAccountConfigurations() {} + + /** + * Contains a list of the Balance Account payout schedules. + * + * @param balanceAccountPayoutSchedules Contains a list of the Balance Account payout schedules. + * @return the current {@code BalanceAccountConfigurations} instance, allowing for method chaining + */ + public BalanceAccountConfigurations balanceAccountPayoutSchedules( + List balanceAccountPayoutSchedules) { + this.balanceAccountPayoutSchedules = balanceAccountPayoutSchedules; + isSetBalanceAccountPayoutSchedules = true; // mark as set + return this; + } + + public BalanceAccountConfigurations addBalanceAccountPayoutSchedulesItem( + BalanceAccountConfiguration balanceAccountPayoutSchedulesItem) { + if (this.balanceAccountPayoutSchedules == null) { + this.balanceAccountPayoutSchedules = new ArrayList<>(); + } + this.balanceAccountPayoutSchedules.add(balanceAccountPayoutSchedulesItem); + return this; + } + + /** + * Contains a list of the Balance Account payout schedules. + * + * @return balanceAccountPayoutSchedules Contains a list of the Balance Account payout schedules. + */ + @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_PAYOUT_SCHEDULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getBalanceAccountPayoutSchedules() { + return balanceAccountPayoutSchedules; + } + + /** + * Contains a list of the Balance Account payout schedules. + * + * @param balanceAccountPayoutSchedules Contains a list of the Balance Account payout schedules. + */ + @JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_PAYOUT_SCHEDULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBalanceAccountPayoutSchedules( + List balanceAccountPayoutSchedules) { + this.balanceAccountPayoutSchedules = balanceAccountPayoutSchedules; + isSetBalanceAccountPayoutSchedules = true; // mark as set + } + + /** + * link + * + * @param link + * @return the current {@code BalanceAccountConfigurations} instance, allowing for method chaining + */ + public BalanceAccountConfigurations link(Link link) { + this.link = link; + isSetLink = true; // mark as set + return this; + } + + /** + * Get link + * + * @return link + */ + @JsonProperty(JSON_PROPERTY_LINK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Link getLink() { + return link; + } + + /** + * link + * + * @param link + */ + @JsonProperty(JSON_PROPERTY_LINK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLink(Link link) { + this.link = link; + isSetLink = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public BalanceAccountConfigurations 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 BalanceAccountConfigurations object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceAccountConfigurations balanceAccountConfigurations = (BalanceAccountConfigurations) o; + return Objects.equals( + this.balanceAccountPayoutSchedules, + balanceAccountConfigurations.balanceAccountPayoutSchedules) + && Objects.equals( + this.isSetBalanceAccountPayoutSchedules, + balanceAccountConfigurations.isSetBalanceAccountPayoutSchedules) + && Objects.equals(this.link, balanceAccountConfigurations.link) + && Objects.equals(this.isSetLink, balanceAccountConfigurations.isSetLink); + } + + @Override + public int hashCode() { + return Objects.hash( + balanceAccountPayoutSchedules, isSetBalanceAccountPayoutSchedules, link, isSetLink); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceAccountConfigurations {\n"); + sb.append(" balanceAccountPayoutSchedules: ") + .append(toIndentedString(balanceAccountPayoutSchedules)) + .append("\n"); + sb.append(" link: ").append(toIndentedString(link)).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 getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetBalanceAccountPayoutSchedules) { + addIfNull( + nulls, + JSON_PROPERTY_BALANCE_ACCOUNT_PAYOUT_SCHEDULES, + this.balanceAccountPayoutSchedules); + } + if (isSetLink) { + addIfNull(nulls, JSON_PROPERTY_LINK, this.link); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of BalanceAccountConfigurations given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalanceAccountConfigurations + * @throws JsonProcessingException if the JSON string is invalid with respect to + * BalanceAccountConfigurations + */ + public static BalanceAccountConfigurations fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BalanceAccountConfigurations.class); + } + + /** + * Convert an instance of BalanceAccountConfigurations to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/BalancePlatformConfiguration.java b/src/main/java/com/adyen/model/balanceplatform/BalancePlatformConfiguration.java new file mode 100644 index 000000000..c103c0c63 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/BalancePlatformConfiguration.java @@ -0,0 +1,1298 @@ +/* + * 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.time.OffsetDateTime; +import java.util.*; + +/** BalancePlatformConfiguration */ +@JsonPropertyOrder({ + BalancePlatformConfiguration.JSON_PROPERTY_AUTOMATIC_APPLICATION, + BalancePlatformConfiguration.JSON_PROPERTY_BALANCE_PLATFORM_ID, + BalancePlatformConfiguration.JSON_PROPERTY_COUNTRY_CODE, + BalancePlatformConfiguration.JSON_PROPERTY_CREATED_AT, + BalancePlatformConfiguration.JSON_PROPERTY_CURRENCY, + BalancePlatformConfiguration.JSON_PROPERTY_DEFAULT_DESCRIPTION, + BalancePlatformConfiguration.JSON_PROPERTY_DEFAULT_FREQUENCY, + BalancePlatformConfiguration.JSON_PROPERTY_DEFAULT_FREQUENCY_VALUE, + BalancePlatformConfiguration.JSON_PROPERTY_DEFAULT_REFERENCE, + BalancePlatformConfiguration.JSON_PROPERTY_DEFAULT_REFERENCE_FOR_BENEFICIARY, + BalancePlatformConfiguration.JSON_PROPERTY_ENABLED, + BalancePlatformConfiguration.JSON_PROPERTY_ID, + BalancePlatformConfiguration.JSON_PROPERTY_MAX_PAYOUT_AMOUNT, + BalancePlatformConfiguration.JSON_PROPERTY_MIN_PAYOUT_AMOUNT, + BalancePlatformConfiguration.JSON_PROPERTY_PAYOUT_SCHEDULE_DESCRIPTION, + BalancePlatformConfiguration.JSON_PROPERTY_RETAINED_AMOUNT, + BalancePlatformConfiguration.JSON_PROPERTY_UPDATED_AT, + BalancePlatformConfiguration.JSON_PROPERTY_USER_SETTLEMENT_DELAY, + BalancePlatformConfiguration.JSON_PROPERTY_USER_SETTLEMENT_TIME, + BalancePlatformConfiguration.JSON_PROPERTY_USER_SETTLEMENT_TIME_ZONE +}) +public class BalancePlatformConfiguration { + public static final String JSON_PROPERTY_AUTOMATIC_APPLICATION = "automaticApplication"; + private Boolean automaticApplication; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetAutomaticApplication = false; + + public static final String JSON_PROPERTY_BALANCE_PLATFORM_ID = "balancePlatformId"; + private String balancePlatformId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetBalancePlatformId = false; + + public static final String JSON_PROPERTY_COUNTRY_CODE = "countryCode"; + private String countryCode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCountryCode = false; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + private OffsetDateTime createdAt; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetCreatedAt = false; + + 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_DEFAULT_DESCRIPTION = "defaultDescription"; + private String defaultDescription; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDefaultDescription = false; + + public static final String JSON_PROPERTY_DEFAULT_FREQUENCY = "defaultFrequency"; + private String defaultFrequency; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDefaultFrequency = false; + + public static final String JSON_PROPERTY_DEFAULT_FREQUENCY_VALUE = "defaultFrequencyValue"; + private Integer defaultFrequencyValue; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDefaultFrequencyValue = false; + + public static final String JSON_PROPERTY_DEFAULT_REFERENCE = "defaultReference"; + private String defaultReference; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDefaultReference = false; + + public static final String JSON_PROPERTY_DEFAULT_REFERENCE_FOR_BENEFICIARY = + "defaultReferenceForBeneficiary"; + private String defaultReferenceForBeneficiary; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDefaultReferenceForBeneficiary = false; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetEnabled = false; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetId = false; + + public static final String JSON_PROPERTY_MAX_PAYOUT_AMOUNT = "maxPayoutAmount"; + private Long maxPayoutAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMaxPayoutAmount = false; + + public static final String JSON_PROPERTY_MIN_PAYOUT_AMOUNT = "minPayoutAmount"; + private Long minPayoutAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMinPayoutAmount = false; + + public static final String JSON_PROPERTY_PAYOUT_SCHEDULE_DESCRIPTION = + "payoutScheduleDescription"; + private String payoutScheduleDescription; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPayoutScheduleDescription = false; + + public static final String JSON_PROPERTY_RETAINED_AMOUNT = "retainedAmount"; + private Long retainedAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRetainedAmount = false; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + private OffsetDateTime updatedAt; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetUpdatedAt = false; + + public static final String JSON_PROPERTY_USER_SETTLEMENT_DELAY = "userSettlementDelay"; + private Integer userSettlementDelay; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetUserSettlementDelay = false; + + public static final String JSON_PROPERTY_USER_SETTLEMENT_TIME = "userSettlementTime"; + private ModelLocalTime userSettlementTime; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetUserSettlementTime = false; + + public static final String JSON_PROPERTY_USER_SETTLEMENT_TIME_ZONE = "userSettlementTimeZone"; + private String userSettlementTimeZone; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetUserSettlementTimeZone = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public BalancePlatformConfiguration() {} + + /** + * Specifies whether this payout schedule is automatically applied to new balance accounts. + * + * @param automaticApplication Specifies whether this payout schedule is automatically applied to + * new balance accounts. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration automaticApplication(Boolean automaticApplication) { + this.automaticApplication = automaticApplication; + isSetAutomaticApplication = true; // mark as set + return this; + } + + /** + * Specifies whether this payout schedule is automatically applied to new balance accounts. + * + * @return automaticApplication Specifies whether this payout schedule is automatically applied to + * new balance accounts. + */ + @JsonProperty(JSON_PROPERTY_AUTOMATIC_APPLICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAutomaticApplication() { + return automaticApplication; + } + + /** + * Specifies whether this payout schedule is automatically applied to new balance accounts. + * + * @param automaticApplication Specifies whether this payout schedule is automatically applied to + * new balance accounts. + */ + @JsonProperty(JSON_PROPERTY_AUTOMATIC_APPLICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAutomaticApplication(Boolean automaticApplication) { + this.automaticApplication = automaticApplication; + isSetAutomaticApplication = true; // mark as set + } + + /** + * The balance platform to which the payout schedule applies. + * + * @param balancePlatformId The balance platform to which the payout schedule applies. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration balancePlatformId(String balancePlatformId) { + this.balancePlatformId = balancePlatformId; + isSetBalancePlatformId = true; // mark as set + return this; + } + + /** + * The balance platform to which the payout schedule applies. + * + * @return balancePlatformId The balance platform to which the payout schedule applies. + */ + @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBalancePlatformId() { + return balancePlatformId; + } + + /** + * The balance platform to which the payout schedule applies. + * + * @param balancePlatformId The balance platform to which the payout schedule applies. + */ + @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBalancePlatformId(String balancePlatformId) { + this.balancePlatformId = balancePlatformId; + isSetBalancePlatformId = true; // mark as set + } + + /** + * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of + * the country to which the payout schedule applies. + * + * @param countryCode The two-letter [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of the country to which the + * payout schedule applies. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration countryCode(String countryCode) { + this.countryCode = countryCode; + isSetCountryCode = true; // mark as set + return this; + } + + /** + * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of + * the country to which the payout schedule applies. + * + * @return countryCode The two-letter [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of the country to which the + * payout schedule applies. + */ + @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCountryCode() { + return countryCode; + } + + /** + * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of + * the country to which the payout schedule applies. + * + * @param countryCode The two-letter [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of the country to which the + * payout schedule applies. + */ + @JsonProperty(JSON_PROPERTY_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + isSetCountryCode = true; // mark as set + } + + /** + * The date when the payout schedule was created. + * + * @param createdAt The date when the payout schedule was created. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + isSetCreatedAt = true; // mark as set + return this; + } + + /** + * The date when the payout schedule was created. + * + * @return createdAt The date when the payout schedule was created. + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * The date when the payout schedule was created. + * + * @param createdAt The date when the payout schedule was created. + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + isSetCreatedAt = true; // mark as set + } + + /** + * The three-character [ISO code](https://docs.adyen.com/development-resources/currency-codes) of + * the currency used for the payout schedule. + * + * @param currency The three-character [ISO + * code](https://docs.adyen.com/development-resources/currency-codes) of the currency used for + * the payout schedule. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration currency(String currency) { + this.currency = currency; + isSetCurrency = true; // mark as set + return this; + } + + /** + * The three-character [ISO code](https://docs.adyen.com/development-resources/currency-codes) of + * the currency used for the payout schedule. + * + * @return currency The three-character [ISO + * code](https://docs.adyen.com/development-resources/currency-codes) of the currency used for + * the payout schedule. + */ + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCurrency() { + return currency; + } + + /** + * The three-character [ISO code](https://docs.adyen.com/development-resources/currency-codes) of + * the currency used for the payout schedule. + * + * @param currency The three-character [ISO + * code](https://docs.adyen.com/development-resources/currency-codes) of the currency used for + * the payout schedule. + */ + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrency(String currency) { + this.currency = currency; + isSetCurrency = true; // mark as set + } + + /** + * The default description for payouts initiated by this payout schedule. + * + * @param defaultDescription The default description for payouts initiated by this payout + * schedule. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration defaultDescription(String defaultDescription) { + this.defaultDescription = defaultDescription; + isSetDefaultDescription = true; // mark as set + return this; + } + + /** + * The default description for payouts initiated by this payout schedule. + * + * @return defaultDescription The default description for payouts initiated by this payout + * schedule. + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDefaultDescription() { + return defaultDescription; + } + + /** + * The default description for payouts initiated by this payout schedule. + * + * @param defaultDescription The default description for payouts initiated by this payout + * schedule. + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefaultDescription(String defaultDescription) { + this.defaultDescription = defaultDescription; + isSetDefaultDescription = true; // mark as set + } + + /** + * defaultFrequency + * + * @param defaultFrequency + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration defaultFrequency(String defaultFrequency) { + this.defaultFrequency = defaultFrequency; + isSetDefaultFrequency = true; // mark as set + return this; + } + + /** + * Get defaultFrequency + * + * @return defaultFrequency + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDefaultFrequency() { + return defaultFrequency; + } + + /** + * defaultFrequency + * + * @param defaultFrequency + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefaultFrequency(String defaultFrequency) { + this.defaultFrequency = defaultFrequency; + isSetDefaultFrequency = true; // mark as set + } + + /** + * The default value for date of the month or day of the week when payouts are initiated. Allowed + * only if `defaultFrequency` is **monthly** or **weekly**. Possible values if + * `defaultFrequency` is **monthly**: **[1 - 31]**. * If your specified date happens on + * a weekend, the payout is initiated on the next business day. * If your specified date (**29**, + * **30**, or **31**) does not exist in a month, the payout is initiated on the last day of that + * month. Possible values if `defaultFrequency` is **weekly**: **[1 - 5]**. + * + * @param defaultFrequencyValue The default value for date of the month or day of the week when + * payouts are initiated. Allowed only if `defaultFrequency` is **monthly** or + * **weekly**. Possible values if `defaultFrequency` is **monthly**: **[1 - 31]**. * + * If your specified date happens on a weekend, the payout is initiated on the next business + * day. * If your specified date (**29**, **30**, or **31**) does not exist in a month, the + * payout is initiated on the last day of that month. Possible values if + * `defaultFrequency` is **weekly**: **[1 - 5]**. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration defaultFrequencyValue(Integer defaultFrequencyValue) { + this.defaultFrequencyValue = defaultFrequencyValue; + isSetDefaultFrequencyValue = true; // mark as set + return this; + } + + /** + * The default value for date of the month or day of the week when payouts are initiated. Allowed + * only if `defaultFrequency` is **monthly** or **weekly**. Possible values if + * `defaultFrequency` is **monthly**: **[1 - 31]**. * If your specified date happens on + * a weekend, the payout is initiated on the next business day. * If your specified date (**29**, + * **30**, or **31**) does not exist in a month, the payout is initiated on the last day of that + * month. Possible values if `defaultFrequency` is **weekly**: **[1 - 5]**. + * + * @return defaultFrequencyValue The default value for date of the month or day of the week when + * payouts are initiated. Allowed only if `defaultFrequency` is **monthly** or + * **weekly**. Possible values if `defaultFrequency` is **monthly**: **[1 - 31]**. * + * If your specified date happens on a weekend, the payout is initiated on the next business + * day. * If your specified date (**29**, **30**, or **31**) does not exist in a month, the + * payout is initiated on the last day of that month. Possible values if + * `defaultFrequency` is **weekly**: **[1 - 5]**. + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_FREQUENCY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getDefaultFrequencyValue() { + return defaultFrequencyValue; + } + + /** + * The default value for date of the month or day of the week when payouts are initiated. Allowed + * only if `defaultFrequency` is **monthly** or **weekly**. Possible values if + * `defaultFrequency` is **monthly**: **[1 - 31]**. * If your specified date happens on + * a weekend, the payout is initiated on the next business day. * If your specified date (**29**, + * **30**, or **31**) does not exist in a month, the payout is initiated on the last day of that + * month. Possible values if `defaultFrequency` is **weekly**: **[1 - 5]**. + * + * @param defaultFrequencyValue The default value for date of the month or day of the week when + * payouts are initiated. Allowed only if `defaultFrequency` is **monthly** or + * **weekly**. Possible values if `defaultFrequency` is **monthly**: **[1 - 31]**. * + * If your specified date happens on a weekend, the payout is initiated on the next business + * day. * If your specified date (**29**, **30**, or **31**) does not exist in a month, the + * payout is initiated on the last day of that month. Possible values if + * `defaultFrequency` is **weekly**: **[1 - 5]**. + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_FREQUENCY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefaultFrequencyValue(Integer defaultFrequencyValue) { + this.defaultFrequencyValue = defaultFrequencyValue; + isSetDefaultFrequencyValue = true; // mark as set + } + + /** + * Your internal default reference for the payout schedule.When the payout schedule is applied to + * a balance account, this reference is also used for that payout schedule. + * + * @param defaultReference Your internal default reference for the payout schedule.When the payout + * schedule is applied to a balance account, this reference is also used for that payout + * schedule. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration defaultReference(String defaultReference) { + this.defaultReference = defaultReference; + isSetDefaultReference = true; // mark as set + return this; + } + + /** + * Your internal default reference for the payout schedule.When the payout schedule is applied to + * a balance account, this reference is also used for that payout schedule. + * + * @return defaultReference Your internal default reference for the payout schedule.When the + * payout schedule is applied to a balance account, this reference is also used for that + * payout schedule. + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDefaultReference() { + return defaultReference; + } + + /** + * Your internal default reference for the payout schedule.When the payout schedule is applied to + * a balance account, this reference is also used for that payout schedule. + * + * @param defaultReference Your internal default reference for the payout schedule.When the payout + * schedule is applied to a balance account, this reference is also used for that payout + * schedule. + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefaultReference(String defaultReference) { + this.defaultReference = defaultReference; + isSetDefaultReference = true; // mark as set + } + + /** + * The default reference for beneficiary for payouts initiated by this payout schedule. + * + * @param defaultReferenceForBeneficiary The default reference for beneficiary for payouts + * initiated by this payout schedule. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration defaultReferenceForBeneficiary( + String defaultReferenceForBeneficiary) { + this.defaultReferenceForBeneficiary = defaultReferenceForBeneficiary; + isSetDefaultReferenceForBeneficiary = true; // mark as set + return this; + } + + /** + * The default reference for beneficiary for payouts initiated by this payout schedule. + * + * @return defaultReferenceForBeneficiary The default reference for beneficiary for payouts + * initiated by this payout schedule. + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_REFERENCE_FOR_BENEFICIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDefaultReferenceForBeneficiary() { + return defaultReferenceForBeneficiary; + } + + /** + * The default reference for beneficiary for payouts initiated by this payout schedule. + * + * @param defaultReferenceForBeneficiary The default reference for beneficiary for payouts + * initiated by this payout schedule. + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_REFERENCE_FOR_BENEFICIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDefaultReferenceForBeneficiary(String defaultReferenceForBeneficiary) { + this.defaultReferenceForBeneficiary = defaultReferenceForBeneficiary; + isSetDefaultReferenceForBeneficiary = true; // mark as set + } + + /** + * Specifies whether the payout schedule is enabled immediately after it is created. + * + * @param enabled Specifies whether the payout schedule is enabled immediately after it is + * created. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration enabled(Boolean enabled) { + this.enabled = enabled; + isSetEnabled = true; // mark as set + return this; + } + + /** + * Specifies whether the payout schedule is enabled immediately after it is created. + * + * @return enabled Specifies whether the payout schedule is enabled immediately after it is + * created. + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + /** + * Specifies whether the payout schedule is enabled immediately after it is created. + * + * @param enabled Specifies whether the payout schedule is enabled immediately after it is + * created. + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + isSetEnabled = true; // mark as set + } + + /** + * The unique identifier of the payout schedule for your balance platform. + * + * @param id The unique identifier of the payout schedule for your balance platform. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration id(String id) { + this.id = id; + isSetId = true; // mark as set + return this; + } + + /** + * The unique identifier of the payout schedule for your balance platform. + * + * @return id The unique identifier of the payout schedule for your balance platform. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + /** + * The unique identifier of the payout schedule for your balance platform. + * + * @param id The unique identifier of the payout schedule for your balance platform. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + isSetId = true; // mark as set + } + + /** + * The maximum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0**, which means that there is no maximum limit. + * + * @param maxPayoutAmount The maximum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0**, which means that there is no maximum limit. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration maxPayoutAmount(Long maxPayoutAmount) { + this.maxPayoutAmount = maxPayoutAmount; + isSetMaxPayoutAmount = true; // mark as set + return this; + } + + /** + * The maximum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0**, which means that there is no maximum limit. + * + * @return maxPayoutAmount The maximum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0**, which means that there is no maximum limit. + */ + @JsonProperty(JSON_PROPERTY_MAX_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMaxPayoutAmount() { + return maxPayoutAmount; + } + + /** + * The maximum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0**, which means that there is no maximum limit. + * + * @param maxPayoutAmount The maximum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0**, which means that there is no maximum limit. + */ + @JsonProperty(JSON_PROPERTY_MAX_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxPayoutAmount(Long maxPayoutAmount) { + this.maxPayoutAmount = maxPayoutAmount; + isSetMaxPayoutAmount = true; // mark as set + } + + /** + * The minimum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0**. + * + * @param minPayoutAmount The minimum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0**. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration minPayoutAmount(Long minPayoutAmount) { + this.minPayoutAmount = minPayoutAmount; + isSetMinPayoutAmount = true; // mark as set + return this; + } + + /** + * The minimum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0**. + * + * @return minPayoutAmount The minimum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0**. + */ + @JsonProperty(JSON_PROPERTY_MIN_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMinPayoutAmount() { + return minPayoutAmount; + } + + /** + * The minimum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0**. + * + * @param minPayoutAmount The minimum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0**. + */ + @JsonProperty(JSON_PROPERTY_MIN_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMinPayoutAmount(Long minPayoutAmount) { + this.minPayoutAmount = minPayoutAmount; + isSetMinPayoutAmount = true; // mark as set + } + + /** + * The type of payout schedule. This type indicates how fast funds are paid out to your user. + * Possible values: - **Standard**: The funds arrive in your user's transfer instrument two + * days after the funds are settled. - **Accelerated**: The funds arrive to your user's + * transfer instrument the day after the funds are settled. + * + * @param payoutScheduleDescription The type of payout schedule. This type indicates how fast + * funds are paid out to your user. Possible values: - **Standard**: The funds arrive in your + * user's transfer instrument two days after the funds are settled. - **Accelerated**: The + * funds arrive to your user's transfer instrument the day after the funds are settled. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration payoutScheduleDescription(String payoutScheduleDescription) { + this.payoutScheduleDescription = payoutScheduleDescription; + isSetPayoutScheduleDescription = true; // mark as set + return this; + } + + /** + * The type of payout schedule. This type indicates how fast funds are paid out to your user. + * Possible values: - **Standard**: The funds arrive in your user's transfer instrument two + * days after the funds are settled. - **Accelerated**: The funds arrive to your user's + * transfer instrument the day after the funds are settled. + * + * @return payoutScheduleDescription The type of payout schedule. This type indicates how fast + * funds are paid out to your user. Possible values: - **Standard**: The funds arrive in your + * user's transfer instrument two days after the funds are settled. - **Accelerated**: The + * funds arrive to your user's transfer instrument the day after the funds are settled. + */ + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPayoutScheduleDescription() { + return payoutScheduleDescription; + } + + /** + * The type of payout schedule. This type indicates how fast funds are paid out to your user. + * Possible values: - **Standard**: The funds arrive in your user's transfer instrument two + * days after the funds are settled. - **Accelerated**: The funds arrive to your user's + * transfer instrument the day after the funds are settled. + * + * @param payoutScheduleDescription The type of payout schedule. This type indicates how fast + * funds are paid out to your user. Possible values: - **Standard**: The funds arrive in your + * user's transfer instrument two days after the funds are settled. - **Accelerated**: The + * funds arrive to your user's transfer instrument the day after the funds are settled. + */ + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutScheduleDescription(String payoutScheduleDescription) { + this.payoutScheduleDescription = payoutScheduleDescription; + isSetPayoutScheduleDescription = true; // mark as set + } + + /** + * The amount of funds that must remain available in a balance account after an execution of the + * payout schedule. If the funds in the balance account are less than the retained amount, the + * execution is not initiated. Default value: **0** + * + * @param retainedAmount The amount of funds that must remain available in a balance account after + * an execution of the payout schedule. If the funds in the balance account are less than the + * retained amount, the execution is not initiated. Default value: **0** + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration retainedAmount(Long retainedAmount) { + this.retainedAmount = retainedAmount; + isSetRetainedAmount = true; // mark as set + return this; + } + + /** + * The amount of funds that must remain available in a balance account after an execution of the + * payout schedule. If the funds in the balance account are less than the retained amount, the + * execution is not initiated. Default value: **0** + * + * @return retainedAmount The amount of funds that must remain available in a balance account + * after an execution of the payout schedule. If the funds in the balance account are less + * than the retained amount, the execution is not initiated. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_RETAINED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getRetainedAmount() { + return retainedAmount; + } + + /** + * The amount of funds that must remain available in a balance account after an execution of the + * payout schedule. If the funds in the balance account are less than the retained amount, the + * execution is not initiated. Default value: **0** + * + * @param retainedAmount The amount of funds that must remain available in a balance account after + * an execution of the payout schedule. If the funds in the balance account are less than the + * retained amount, the execution is not initiated. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_RETAINED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRetainedAmount(Long retainedAmount) { + this.retainedAmount = retainedAmount; + isSetRetainedAmount = true; // mark as set + } + + /** + * The date when the payout schedule was updated. + * + * @param updatedAt The date when the payout schedule was updated. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + isSetUpdatedAt = true; // mark as set + return this; + } + + /** + * The date when the payout schedule was updated. + * + * @return updatedAt The date when the payout schedule was updated. + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + /** + * The date when the payout schedule was updated. + * + * @param updatedAt The date when the payout schedule was updated. + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + isSetUpdatedAt = true; // mark as set + } + + /** + * The default [settlement delay](https://docs.adyen.com/platforms/settle-funds/#settlement-delay) + * for this payout schedule. + * + * @param userSettlementDelay The default [settlement + * delay](https://docs.adyen.com/platforms/settle-funds/#settlement-delay) for this payout + * schedule. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration userSettlementDelay(Integer userSettlementDelay) { + this.userSettlementDelay = userSettlementDelay; + isSetUserSettlementDelay = true; // mark as set + return this; + } + + /** + * The default [settlement delay](https://docs.adyen.com/platforms/settle-funds/#settlement-delay) + * for this payout schedule. + * + * @return userSettlementDelay The default [settlement + * delay](https://docs.adyen.com/platforms/settle-funds/#settlement-delay) for this payout + * schedule. + */ + @JsonProperty(JSON_PROPERTY_USER_SETTLEMENT_DELAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getUserSettlementDelay() { + return userSettlementDelay; + } + + /** + * The default [settlement delay](https://docs.adyen.com/platforms/settle-funds/#settlement-delay) + * for this payout schedule. + * + * @param userSettlementDelay The default [settlement + * delay](https://docs.adyen.com/platforms/settle-funds/#settlement-delay) for this payout + * schedule. + */ + @JsonProperty(JSON_PROPERTY_USER_SETTLEMENT_DELAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserSettlementDelay(Integer userSettlementDelay) { + this.userSettlementDelay = userSettlementDelay; + isSetUserSettlementDelay = true; // mark as set + } + + /** + * userSettlementTime + * + * @param userSettlementTime + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration userSettlementTime(ModelLocalTime userSettlementTime) { + this.userSettlementTime = userSettlementTime; + isSetUserSettlementTime = true; // mark as set + return this; + } + + /** + * Get userSettlementTime + * + * @return userSettlementTime + */ + @JsonProperty(JSON_PROPERTY_USER_SETTLEMENT_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ModelLocalTime getUserSettlementTime() { + return userSettlementTime; + } + + /** + * userSettlementTime + * + * @param userSettlementTime + */ + @JsonProperty(JSON_PROPERTY_USER_SETTLEMENT_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserSettlementTime(ModelLocalTime userSettlementTime) { + this.userSettlementTime = userSettlementTime; + isSetUserSettlementTime = true; // mark as set + } + + /** + * The timezone of the `userSettlementTime`. + * + * @param userSettlementTimeZone The timezone of the `userSettlementTime`. + * @return the current {@code BalancePlatformConfiguration} instance, allowing for method chaining + */ + public BalancePlatformConfiguration userSettlementTimeZone(String userSettlementTimeZone) { + this.userSettlementTimeZone = userSettlementTimeZone; + isSetUserSettlementTimeZone = true; // mark as set + return this; + } + + /** + * The timezone of the `userSettlementTime`. + * + * @return userSettlementTimeZone The timezone of the `userSettlementTime`. + */ + @JsonProperty(JSON_PROPERTY_USER_SETTLEMENT_TIME_ZONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUserSettlementTimeZone() { + return userSettlementTimeZone; + } + + /** + * The timezone of the `userSettlementTime`. + * + * @param userSettlementTimeZone The timezone of the `userSettlementTime`. + */ + @JsonProperty(JSON_PROPERTY_USER_SETTLEMENT_TIME_ZONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUserSettlementTimeZone(String userSettlementTimeZone) { + this.userSettlementTimeZone = userSettlementTimeZone; + isSetUserSettlementTimeZone = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public BalancePlatformConfiguration 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 BalancePlatformConfiguration object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalancePlatformConfiguration balancePlatformConfiguration = (BalancePlatformConfiguration) o; + return Objects.equals( + this.automaticApplication, balancePlatformConfiguration.automaticApplication) + && Objects.equals( + this.isSetAutomaticApplication, balancePlatformConfiguration.isSetAutomaticApplication) + && Objects.equals(this.balancePlatformId, balancePlatformConfiguration.balancePlatformId) + && Objects.equals( + this.isSetBalancePlatformId, balancePlatformConfiguration.isSetBalancePlatformId) + && Objects.equals(this.countryCode, balancePlatformConfiguration.countryCode) + && Objects.equals(this.isSetCountryCode, balancePlatformConfiguration.isSetCountryCode) + && Objects.equals(this.createdAt, balancePlatformConfiguration.createdAt) + && Objects.equals(this.isSetCreatedAt, balancePlatformConfiguration.isSetCreatedAt) + && Objects.equals(this.currency, balancePlatformConfiguration.currency) + && Objects.equals(this.isSetCurrency, balancePlatformConfiguration.isSetCurrency) + && Objects.equals(this.defaultDescription, balancePlatformConfiguration.defaultDescription) + && Objects.equals( + this.isSetDefaultDescription, balancePlatformConfiguration.isSetDefaultDescription) + && Objects.equals(this.defaultFrequency, balancePlatformConfiguration.defaultFrequency) + && Objects.equals( + this.isSetDefaultFrequency, balancePlatformConfiguration.isSetDefaultFrequency) + && Objects.equals( + this.defaultFrequencyValue, balancePlatformConfiguration.defaultFrequencyValue) + && Objects.equals( + this.isSetDefaultFrequencyValue, + balancePlatformConfiguration.isSetDefaultFrequencyValue) + && Objects.equals(this.defaultReference, balancePlatformConfiguration.defaultReference) + && Objects.equals( + this.isSetDefaultReference, balancePlatformConfiguration.isSetDefaultReference) + && Objects.equals( + this.defaultReferenceForBeneficiary, + balancePlatformConfiguration.defaultReferenceForBeneficiary) + && Objects.equals( + this.isSetDefaultReferenceForBeneficiary, + balancePlatformConfiguration.isSetDefaultReferenceForBeneficiary) + && Objects.equals(this.enabled, balancePlatformConfiguration.enabled) + && Objects.equals(this.isSetEnabled, balancePlatformConfiguration.isSetEnabled) + && Objects.equals(this.id, balancePlatformConfiguration.id) + && Objects.equals(this.isSetId, balancePlatformConfiguration.isSetId) + && Objects.equals(this.maxPayoutAmount, balancePlatformConfiguration.maxPayoutAmount) + && Objects.equals( + this.isSetMaxPayoutAmount, balancePlatformConfiguration.isSetMaxPayoutAmount) + && Objects.equals(this.minPayoutAmount, balancePlatformConfiguration.minPayoutAmount) + && Objects.equals( + this.isSetMinPayoutAmount, balancePlatformConfiguration.isSetMinPayoutAmount) + && Objects.equals( + this.payoutScheduleDescription, balancePlatformConfiguration.payoutScheduleDescription) + && Objects.equals( + this.isSetPayoutScheduleDescription, + balancePlatformConfiguration.isSetPayoutScheduleDescription) + && Objects.equals(this.retainedAmount, balancePlatformConfiguration.retainedAmount) + && Objects.equals( + this.isSetRetainedAmount, balancePlatformConfiguration.isSetRetainedAmount) + && Objects.equals(this.updatedAt, balancePlatformConfiguration.updatedAt) + && Objects.equals(this.isSetUpdatedAt, balancePlatformConfiguration.isSetUpdatedAt) + && Objects.equals( + this.userSettlementDelay, balancePlatformConfiguration.userSettlementDelay) + && Objects.equals( + this.isSetUserSettlementDelay, balancePlatformConfiguration.isSetUserSettlementDelay) + && Objects.equals(this.userSettlementTime, balancePlatformConfiguration.userSettlementTime) + && Objects.equals( + this.isSetUserSettlementTime, balancePlatformConfiguration.isSetUserSettlementTime) + && Objects.equals( + this.userSettlementTimeZone, balancePlatformConfiguration.userSettlementTimeZone) + && Objects.equals( + this.isSetUserSettlementTimeZone, + balancePlatformConfiguration.isSetUserSettlementTimeZone); + } + + @Override + public int hashCode() { + return Objects.hash( + automaticApplication, + isSetAutomaticApplication, + balancePlatformId, + isSetBalancePlatformId, + countryCode, + isSetCountryCode, + createdAt, + isSetCreatedAt, + currency, + isSetCurrency, + defaultDescription, + isSetDefaultDescription, + defaultFrequency, + isSetDefaultFrequency, + defaultFrequencyValue, + isSetDefaultFrequencyValue, + defaultReference, + isSetDefaultReference, + defaultReferenceForBeneficiary, + isSetDefaultReferenceForBeneficiary, + enabled, + isSetEnabled, + id, + isSetId, + maxPayoutAmount, + isSetMaxPayoutAmount, + minPayoutAmount, + isSetMinPayoutAmount, + payoutScheduleDescription, + isSetPayoutScheduleDescription, + retainedAmount, + isSetRetainedAmount, + updatedAt, + isSetUpdatedAt, + userSettlementDelay, + isSetUserSettlementDelay, + userSettlementTime, + isSetUserSettlementTime, + userSettlementTimeZone, + isSetUserSettlementTimeZone); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalancePlatformConfiguration {\n"); + sb.append(" automaticApplication: ") + .append(toIndentedString(automaticApplication)) + .append("\n"); + sb.append(" balancePlatformId: ").append(toIndentedString(balancePlatformId)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" defaultDescription: ").append(toIndentedString(defaultDescription)).append("\n"); + sb.append(" defaultFrequency: ").append(toIndentedString(defaultFrequency)).append("\n"); + sb.append(" defaultFrequencyValue: ") + .append(toIndentedString(defaultFrequencyValue)) + .append("\n"); + sb.append(" defaultReference: ").append(toIndentedString(defaultReference)).append("\n"); + sb.append(" defaultReferenceForBeneficiary: ") + .append(toIndentedString(defaultReferenceForBeneficiary)) + .append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" maxPayoutAmount: ").append(toIndentedString(maxPayoutAmount)).append("\n"); + sb.append(" minPayoutAmount: ").append(toIndentedString(minPayoutAmount)).append("\n"); + sb.append(" payoutScheduleDescription: ") + .append(toIndentedString(payoutScheduleDescription)) + .append("\n"); + sb.append(" retainedAmount: ").append(toIndentedString(retainedAmount)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" userSettlementDelay: ") + .append(toIndentedString(userSettlementDelay)) + .append("\n"); + sb.append(" userSettlementTime: ").append(toIndentedString(userSettlementTime)).append("\n"); + sb.append(" userSettlementTimeZone: ") + .append(toIndentedString(userSettlementTimeZone)) + .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 getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetAutomaticApplication) { + addIfNull(nulls, JSON_PROPERTY_AUTOMATIC_APPLICATION, this.automaticApplication); + } + if (isSetBalancePlatformId) { + addIfNull(nulls, JSON_PROPERTY_BALANCE_PLATFORM_ID, this.balancePlatformId); + } + if (isSetCountryCode) { + addIfNull(nulls, JSON_PROPERTY_COUNTRY_CODE, this.countryCode); + } + if (isSetCreatedAt) { + addIfNull(nulls, JSON_PROPERTY_CREATED_AT, this.createdAt); + } + if (isSetCurrency) { + addIfNull(nulls, JSON_PROPERTY_CURRENCY, this.currency); + } + if (isSetDefaultDescription) { + addIfNull(nulls, JSON_PROPERTY_DEFAULT_DESCRIPTION, this.defaultDescription); + } + if (isSetDefaultFrequency) { + addIfNull(nulls, JSON_PROPERTY_DEFAULT_FREQUENCY, this.defaultFrequency); + } + if (isSetDefaultFrequencyValue) { + addIfNull(nulls, JSON_PROPERTY_DEFAULT_FREQUENCY_VALUE, this.defaultFrequencyValue); + } + if (isSetDefaultReference) { + addIfNull(nulls, JSON_PROPERTY_DEFAULT_REFERENCE, this.defaultReference); + } + if (isSetDefaultReferenceForBeneficiary) { + addIfNull( + nulls, + JSON_PROPERTY_DEFAULT_REFERENCE_FOR_BENEFICIARY, + this.defaultReferenceForBeneficiary); + } + if (isSetEnabled) { + addIfNull(nulls, JSON_PROPERTY_ENABLED, this.enabled); + } + if (isSetId) { + addIfNull(nulls, JSON_PROPERTY_ID, this.id); + } + if (isSetMaxPayoutAmount) { + addIfNull(nulls, JSON_PROPERTY_MAX_PAYOUT_AMOUNT, this.maxPayoutAmount); + } + if (isSetMinPayoutAmount) { + addIfNull(nulls, JSON_PROPERTY_MIN_PAYOUT_AMOUNT, this.minPayoutAmount); + } + if (isSetPayoutScheduleDescription) { + addIfNull(nulls, JSON_PROPERTY_PAYOUT_SCHEDULE_DESCRIPTION, this.payoutScheduleDescription); + } + if (isSetRetainedAmount) { + addIfNull(nulls, JSON_PROPERTY_RETAINED_AMOUNT, this.retainedAmount); + } + if (isSetUpdatedAt) { + addIfNull(nulls, JSON_PROPERTY_UPDATED_AT, this.updatedAt); + } + if (isSetUserSettlementDelay) { + addIfNull(nulls, JSON_PROPERTY_USER_SETTLEMENT_DELAY, this.userSettlementDelay); + } + if (isSetUserSettlementTime) { + addIfNull(nulls, JSON_PROPERTY_USER_SETTLEMENT_TIME, this.userSettlementTime); + } + if (isSetUserSettlementTimeZone) { + addIfNull(nulls, JSON_PROPERTY_USER_SETTLEMENT_TIME_ZONE, this.userSettlementTimeZone); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of BalancePlatformConfiguration given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalancePlatformConfiguration + * @throws JsonProcessingException if the JSON string is invalid with respect to + * BalancePlatformConfiguration + */ + public static BalancePlatformConfiguration fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BalancePlatformConfiguration.class); + } + + /** + * Convert an instance of BalancePlatformConfiguration to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/BalancePlatformConfigurations.java b/src/main/java/com/adyen/model/balanceplatform/BalancePlatformConfigurations.java new file mode 100644 index 000000000..515f76952 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/BalancePlatformConfigurations.java @@ -0,0 +1,204 @@ +/* + * 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.*; +import java.util.ArrayList; +import java.util.List; + +/** BalancePlatformConfigurations */ +@JsonPropertyOrder({BalancePlatformConfigurations.JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULES}) +public class BalancePlatformConfigurations { + public static final String JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULES = + "balancePlatformPayoutSchedules"; + private List balancePlatformPayoutSchedules; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetBalancePlatformPayoutSchedules = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public BalancePlatformConfigurations() {} + + /** + * Contains a list of the payout schedules configured in your balance platform. + * + * @param balancePlatformPayoutSchedules Contains a list of the payout schedules configured in + * your balance platform. + * @return the current {@code BalancePlatformConfigurations} instance, allowing for method + * chaining + */ + public BalancePlatformConfigurations balancePlatformPayoutSchedules( + List balancePlatformPayoutSchedules) { + this.balancePlatformPayoutSchedules = balancePlatformPayoutSchedules; + isSetBalancePlatformPayoutSchedules = true; // mark as set + return this; + } + + public BalancePlatformConfigurations addBalancePlatformPayoutSchedulesItem( + BalancePlatformConfiguration balancePlatformPayoutSchedulesItem) { + if (this.balancePlatformPayoutSchedules == null) { + this.balancePlatformPayoutSchedules = new ArrayList<>(); + } + this.balancePlatformPayoutSchedules.add(balancePlatformPayoutSchedulesItem); + return this; + } + + /** + * Contains a list of the payout schedules configured in your balance platform. + * + * @return balancePlatformPayoutSchedules Contains a list of the payout schedules configured in + * your balance platform. + */ + @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getBalancePlatformPayoutSchedules() { + return balancePlatformPayoutSchedules; + } + + /** + * Contains a list of the payout schedules configured in your balance platform. + * + * @param balancePlatformPayoutSchedules Contains a list of the payout schedules configured in + * your balance platform. + */ + @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBalancePlatformPayoutSchedules( + List balancePlatformPayoutSchedules) { + this.balancePlatformPayoutSchedules = balancePlatformPayoutSchedules; + isSetBalancePlatformPayoutSchedules = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public BalancePlatformConfigurations 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 BalancePlatformConfigurations object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalancePlatformConfigurations balancePlatformConfigurations = (BalancePlatformConfigurations) o; + return Objects.equals( + this.balancePlatformPayoutSchedules, + balancePlatformConfigurations.balancePlatformPayoutSchedules) + && Objects.equals( + this.isSetBalancePlatformPayoutSchedules, + balancePlatformConfigurations.isSetBalancePlatformPayoutSchedules); + } + + @Override + public int hashCode() { + return Objects.hash(balancePlatformPayoutSchedules, isSetBalancePlatformPayoutSchedules); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalancePlatformConfigurations {\n"); + sb.append(" balancePlatformPayoutSchedules: ") + .append(toIndentedString(balancePlatformPayoutSchedules)) + .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 getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetBalancePlatformPayoutSchedules) { + addIfNull( + nulls, + JSON_PROPERTY_BALANCE_PLATFORM_PAYOUT_SCHEDULES, + this.balancePlatformPayoutSchedules); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of BalancePlatformConfigurations given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalancePlatformConfigurations + * @throws JsonProcessingException if the JSON string is invalid with respect to + * BalancePlatformConfigurations + */ + public static BalancePlatformConfigurations fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BalancePlatformConfigurations.class); + } + + /** + * Convert an instance of BalancePlatformConfigurations to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/ExecutionResult.java b/src/main/java/com/adyen/model/balanceplatform/ExecutionResult.java new file mode 100644 index 000000000..152b1ea45 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/ExecutionResult.java @@ -0,0 +1,60 @@ +/* + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.*; +import java.util.logging.Logger; + +/** Gets or Sets ExecutionResult */ +public enum ExecutionResult { + FAILED("failed"), + + SUCCEEDED("succeeded"), + + SKIPPED("skipped"); + + private static final Logger LOG = Logger.getLogger(ExecutionResult.class.getName()); + + private String value; + + ExecutionResult(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ExecutionResult fromValue(String value) { + for (ExecutionResult b : ExecutionResult.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "ExecutionResult: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(ExecutionResult.values())); + return null; + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/ModelLocalTime.java b/src/main/java/com/adyen/model/balanceplatform/ModelLocalTime.java new file mode 100644 index 000000000..82e847105 --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/ModelLocalTime.java @@ -0,0 +1,323 @@ +/* + * 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.annotation.JsonTypeName; +import com.fasterxml.jackson.core.JsonProcessingException; +import java.util.*; + +/** ModelLocalTime */ +@JsonPropertyOrder({ + ModelLocalTime.JSON_PROPERTY_HOUR, + ModelLocalTime.JSON_PROPERTY_MINUTE, + ModelLocalTime.JSON_PROPERTY_NANO, + ModelLocalTime.JSON_PROPERTY_SECOND +}) +@JsonTypeName("LocalTime") +public class ModelLocalTime { + public static final String JSON_PROPERTY_HOUR = "hour"; + private Integer hour; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetHour = false; + + public static final String JSON_PROPERTY_MINUTE = "minute"; + private Integer minute; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMinute = false; + + public static final String JSON_PROPERTY_NANO = "nano"; + private Integer nano; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetNano = false; + + public static final String JSON_PROPERTY_SECOND = "second"; + private Integer second; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetSecond = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public ModelLocalTime() {} + + /** + * hour + * + * @param hour + * @return the current {@code ModelLocalTime} instance, allowing for method chaining + */ + public ModelLocalTime hour(Integer hour) { + this.hour = hour; + isSetHour = true; // mark as set + return this; + } + + /** + * Get hour + * + * @return hour + */ + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getHour() { + return hour; + } + + /** + * hour + * + * @param hour + */ + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHour(Integer hour) { + this.hour = hour; + isSetHour = true; // mark as set + } + + /** + * minute + * + * @param minute + * @return the current {@code ModelLocalTime} instance, allowing for method chaining + */ + public ModelLocalTime minute(Integer minute) { + this.minute = minute; + isSetMinute = true; // mark as set + return this; + } + + /** + * Get minute + * + * @return minute + */ + @JsonProperty(JSON_PROPERTY_MINUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMinute() { + return minute; + } + + /** + * minute + * + * @param minute + */ + @JsonProperty(JSON_PROPERTY_MINUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMinute(Integer minute) { + this.minute = minute; + isSetMinute = true; // mark as set + } + + /** + * nano + * + * @param nano + * @return the current {@code ModelLocalTime} instance, allowing for method chaining + */ + public ModelLocalTime nano(Integer nano) { + this.nano = nano; + isSetNano = true; // mark as set + return this; + } + + /** + * Get nano + * + * @return nano + */ + @JsonProperty(JSON_PROPERTY_NANO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNano() { + return nano; + } + + /** + * nano + * + * @param nano + */ + @JsonProperty(JSON_PROPERTY_NANO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNano(Integer nano) { + this.nano = nano; + isSetNano = true; // mark as set + } + + /** + * second + * + * @param second + * @return the current {@code ModelLocalTime} instance, allowing for method chaining + */ + public ModelLocalTime second(Integer second) { + this.second = second; + isSetSecond = true; // mark as set + return this; + } + + /** + * Get second + * + * @return second + */ + @JsonProperty(JSON_PROPERTY_SECOND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getSecond() { + return second; + } + + /** + * second + * + * @param second + */ + @JsonProperty(JSON_PROPERTY_SECOND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSecond(Integer second) { + this.second = second; + isSetSecond = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public ModelLocalTime 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 LocalTime object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelLocalTime _localTime = (ModelLocalTime) o; + return Objects.equals(this.hour, _localTime.hour) + && Objects.equals(this.isSetHour, _localTime.isSetHour) + && Objects.equals(this.minute, _localTime.minute) + && Objects.equals(this.isSetMinute, _localTime.isSetMinute) + && Objects.equals(this.nano, _localTime.nano) + && Objects.equals(this.isSetNano, _localTime.isSetNano) + && Objects.equals(this.second, _localTime.second) + && Objects.equals(this.isSetSecond, _localTime.isSetSecond); + } + + @Override + public int hashCode() { + return Objects.hash(hour, isSetHour, minute, isSetMinute, nano, isSetNano, second, isSetSecond); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelLocalTime {\n"); + sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); + sb.append(" minute: ").append(toIndentedString(minute)).append("\n"); + sb.append(" nano: ").append(toIndentedString(nano)).append("\n"); + sb.append(" second: ").append(toIndentedString(second)).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 getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetHour) { + addIfNull(nulls, JSON_PROPERTY_HOUR, this.hour); + } + if (isSetMinute) { + addIfNull(nulls, JSON_PROPERTY_MINUTE, this.minute); + } + if (isSetNano) { + addIfNull(nulls, JSON_PROPERTY_NANO, this.nano); + } + if (isSetSecond) { + addIfNull(nulls, JSON_PROPERTY_SECOND, this.second); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of ModelLocalTime given an JSON string + * + * @param jsonString JSON string + * @return An instance of ModelLocalTime + * @throws JsonProcessingException if the JSON string is invalid with respect to ModelLocalTime + */ + public static ModelLocalTime fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ModelLocalTime.class); + } + + /** + * Convert an instance of ModelLocalTime to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/PatchableBalanceAccountConfigurationRequest.java b/src/main/java/com/adyen/model/balanceplatform/PatchableBalanceAccountConfigurationRequest.java new file mode 100644 index 000000000..810a821fb --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/PatchableBalanceAccountConfigurationRequest.java @@ -0,0 +1,926 @@ +/* + * 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.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; + +/** PatchableBalanceAccountConfigurationRequest */ +@JsonPropertyOrder({ + PatchableBalanceAccountConfigurationRequest.JSON_PROPERTY_DESCRIPTION, + PatchableBalanceAccountConfigurationRequest.JSON_PROPERTY_ENABLED, + PatchableBalanceAccountConfigurationRequest.JSON_PROPERTY_FREQUENCY, + PatchableBalanceAccountConfigurationRequest.JSON_PROPERTY_FREQUENCY_VALUE, + PatchableBalanceAccountConfigurationRequest.JSON_PROPERTY_MAX_PAYOUT_AMOUNT, + PatchableBalanceAccountConfigurationRequest.JSON_PROPERTY_MIN_PAYOUT_AMOUNT, + PatchableBalanceAccountConfigurationRequest.JSON_PROPERTY_REFERENCE, + PatchableBalanceAccountConfigurationRequest.JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY, + PatchableBalanceAccountConfigurationRequest.JSON_PROPERTY_RETAINED_AMOUNT, + PatchableBalanceAccountConfigurationRequest.JSON_PROPERTY_SALES_DAY_CLOSING_TIME, + PatchableBalanceAccountConfigurationRequest.JSON_PROPERTY_TRANSFER_INSTRUMENT_ID +}) +public class PatchableBalanceAccountConfigurationRequest { + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private Object description; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetDescription = false; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Object enabled; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetEnabled = false; + + /** + * The frequency of payouts initiated by this payout schedule. Possible values: * daily * weekdays + * * weekly * monthly Default value: The `defaultFrequency` from the balance platform + * schedule that you are applying. + */ + public enum FrequencyEnum { + DAILY(String.valueOf("daily")), + + WEEKLY(String.valueOf("weekly")), + + WEEKDAYS(String.valueOf("weekdays")), + + MONTHLY(String.valueOf("monthly")); + + private static final Logger LOG = Logger.getLogger(FrequencyEnum.class.getName()); + + private String value; + + FrequencyEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FrequencyEnum fromValue(String value) { + for (FrequencyEnum b : FrequencyEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + // handling unexpected value + LOG.warning( + "FrequencyEnum: unexpected enum value '" + + value + + "' - Supported values are " + + Arrays.toString(FrequencyEnum.values())); + return null; + } + } + + public static final String JSON_PROPERTY_FREQUENCY = "frequency"; + private FrequencyEnum frequency; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFrequency = false; + + public static final String JSON_PROPERTY_FREQUENCY_VALUE = "frequencyValue"; + private Object frequencyValue; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetFrequencyValue = false; + + public static final String JSON_PROPERTY_MAX_PAYOUT_AMOUNT = "maxPayoutAmount"; + private Object maxPayoutAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMaxPayoutAmount = false; + + public static final String JSON_PROPERTY_MIN_PAYOUT_AMOUNT = "minPayoutAmount"; + private Object minPayoutAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetMinPayoutAmount = false; + + public static final String JSON_PROPERTY_REFERENCE = "reference"; + private Object reference; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetReference = false; + + public static final String JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY = "referenceForBeneficiary"; + private Object referenceForBeneficiary; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetReferenceForBeneficiary = false; + + public static final String JSON_PROPERTY_RETAINED_AMOUNT = "retainedAmount"; + private Object retainedAmount; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetRetainedAmount = false; + + public static final String JSON_PROPERTY_SALES_DAY_CLOSING_TIME = "salesDayClosingTime"; + /* deprecated */ + @Deprecated private String salesDayClosingTime; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetSalesDayClosingTime = false; + + public static final String JSON_PROPERTY_TRANSFER_INSTRUMENT_ID = "transferInstrumentId"; + private String transferInstrumentId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTransferInstrumentId = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public PatchableBalanceAccountConfigurationRequest() {} + + /** + * The description used for all payouts initiated by this payout schedule. Maximum length: 140 + * characters. If your description is longer, it may be truncated. Default value: The + * `defaultDescription` from the balance platform schedule that you are applying. + * + * @param description The description used for all payouts initiated by this payout schedule. + * Maximum length: 140 characters. If your description is longer, it may be truncated. Default + * value: The `defaultDescription` from the balance platform schedule that you are + * applying. + * @return the current {@code PatchableBalanceAccountConfigurationRequest} instance, allowing for + * method chaining + */ + public PatchableBalanceAccountConfigurationRequest description(Object description) { + this.description = description; + isSetDescription = true; // mark as set + return this; + } + + /** + * The description used for all payouts initiated by this payout schedule. Maximum length: 140 + * characters. If your description is longer, it may be truncated. Default value: The + * `defaultDescription` from the balance platform schedule that you are applying. + * + * @return description The description used for all payouts initiated by this payout schedule. + * Maximum length: 140 characters. If your description is longer, it may be truncated. Default + * value: The `defaultDescription` from the balance platform schedule that you are + * applying. + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Object getDescription() { + return description; + } + + /** + * The description used for all payouts initiated by this payout schedule. Maximum length: 140 + * characters. If your description is longer, it may be truncated. Default value: The + * `defaultDescription` from the balance platform schedule that you are applying. + * + * @param description The description used for all payouts initiated by this payout schedule. + * Maximum length: 140 characters. If your description is longer, it may be truncated. Default + * value: The `defaultDescription` from the balance platform schedule that you are + * applying. + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(Object description) { + this.description = description; + isSetDescription = true; // mark as set + } + + /** + * Specifies whether the payout schedule is enabled immediately after it is created. + * + * @param enabled Specifies whether the payout schedule is enabled immediately after it is + * created. + * @return the current {@code PatchableBalanceAccountConfigurationRequest} instance, allowing for + * method chaining + */ + public PatchableBalanceAccountConfigurationRequest enabled(Object enabled) { + this.enabled = enabled; + isSetEnabled = true; // mark as set + return this; + } + + /** + * Specifies whether the payout schedule is enabled immediately after it is created. + * + * @return enabled Specifies whether the payout schedule is enabled immediately after it is + * created. + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Object getEnabled() { + return enabled; + } + + /** + * Specifies whether the payout schedule is enabled immediately after it is created. + * + * @param enabled Specifies whether the payout schedule is enabled immediately after it is + * created. + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnabled(Object enabled) { + this.enabled = enabled; + isSetEnabled = true; // mark as set + } + + /** + * The frequency of payouts initiated by this payout schedule. Possible values: * daily * weekdays + * * weekly * monthly Default value: The `defaultFrequency` from the balance platform + * schedule that you are applying. + * + * @param frequency The frequency of payouts initiated by this payout schedule. Possible values: * + * daily * weekdays * weekly * monthly Default value: The `defaultFrequency` from + * the balance platform schedule that you are applying. + * @return the current {@code PatchableBalanceAccountConfigurationRequest} instance, allowing for + * method chaining + */ + public PatchableBalanceAccountConfigurationRequest frequency(FrequencyEnum frequency) { + this.frequency = frequency; + isSetFrequency = true; // mark as set + return this; + } + + /** + * The frequency of payouts initiated by this payout schedule. Possible values: * daily * weekdays + * * weekly * monthly Default value: The `defaultFrequency` from the balance platform + * schedule that you are applying. + * + * @return frequency The frequency of payouts initiated by this payout schedule. Possible values: + * * daily * weekdays * weekly * monthly Default value: The `defaultFrequency` from + * the balance platform schedule that you are applying. + */ + @JsonProperty(JSON_PROPERTY_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FrequencyEnum getFrequency() { + return frequency; + } + + /** + * The frequency of payouts initiated by this payout schedule. Possible values: * daily * weekdays + * * weekly * monthly Default value: The `defaultFrequency` from the balance platform + * schedule that you are applying. + * + * @param frequency The frequency of payouts initiated by this payout schedule. Possible values: * + * daily * weekdays * weekly * monthly Default value: The `defaultFrequency` from + * the balance platform schedule that you are applying. + */ + @JsonProperty(JSON_PROPERTY_FREQUENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFrequency(FrequencyEnum frequency) { + this.frequency = frequency; + isSetFrequency = true; // mark as set + } + + /** + * The date of the month or day of the week when payouts are initiated. Allowed only if + * `frequency` is **monthly** or **weekly**. Possible values if `frequency` is + * **monthly**: **[1 - 31]**. * If your specified date happens on a weekend, the payout is + * initiated on the next business day. * If your specified date (**29**, **30**, or **31**) does + * not exist in a month, the payout is initiated on the last day of that month. Possible values if + * `frequency` is **weekly**: **[1 - 5]**. Default value: The + * `defaultFrequencyValue` from the balance platform schedule that you are applying. + * + * @param frequencyValue The date of the month or day of the week when payouts are initiated. + * Allowed only if `frequency` is **monthly** or **weekly**. Possible values if + * `frequency` is **monthly**: **[1 - 31]**. * If your specified date happens on a + * weekend, the payout is initiated on the next business day. * If your specified date + * (**29**, **30**, or **31**) does not exist in a month, the payout is initiated on the last + * day of that month. Possible values if `frequency` is **weekly**: **[1 - 5]**. + * Default value: The `defaultFrequencyValue` from the balance platform schedule + * that you are applying. + * @return the current {@code PatchableBalanceAccountConfigurationRequest} instance, allowing for + * method chaining + */ + public PatchableBalanceAccountConfigurationRequest frequencyValue(Object frequencyValue) { + this.frequencyValue = frequencyValue; + isSetFrequencyValue = true; // mark as set + return this; + } + + /** + * The date of the month or day of the week when payouts are initiated. Allowed only if + * `frequency` is **monthly** or **weekly**. Possible values if `frequency` is + * **monthly**: **[1 - 31]**. * If your specified date happens on a weekend, the payout is + * initiated on the next business day. * If your specified date (**29**, **30**, or **31**) does + * not exist in a month, the payout is initiated on the last day of that month. Possible values if + * `frequency` is **weekly**: **[1 - 5]**. Default value: The + * `defaultFrequencyValue` from the balance platform schedule that you are applying. + * + * @return frequencyValue The date of the month or day of the week when payouts are initiated. + * Allowed only if `frequency` is **monthly** or **weekly**. Possible values if + * `frequency` is **monthly**: **[1 - 31]**. * If your specified date happens on a + * weekend, the payout is initiated on the next business day. * If your specified date + * (**29**, **30**, or **31**) does not exist in a month, the payout is initiated on the last + * day of that month. Possible values if `frequency` is **weekly**: **[1 - 5]**. + * Default value: The `defaultFrequencyValue` from the balance platform schedule + * that you are applying. + */ + @JsonProperty(JSON_PROPERTY_FREQUENCY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Object getFrequencyValue() { + return frequencyValue; + } + + /** + * The date of the month or day of the week when payouts are initiated. Allowed only if + * `frequency` is **monthly** or **weekly**. Possible values if `frequency` is + * **monthly**: **[1 - 31]**. * If your specified date happens on a weekend, the payout is + * initiated on the next business day. * If your specified date (**29**, **30**, or **31**) does + * not exist in a month, the payout is initiated on the last day of that month. Possible values if + * `frequency` is **weekly**: **[1 - 5]**. Default value: The + * `defaultFrequencyValue` from the balance platform schedule that you are applying. + * + * @param frequencyValue The date of the month or day of the week when payouts are initiated. + * Allowed only if `frequency` is **monthly** or **weekly**. Possible values if + * `frequency` is **monthly**: **[1 - 31]**. * If your specified date happens on a + * weekend, the payout is initiated on the next business day. * If your specified date + * (**29**, **30**, or **31**) does not exist in a month, the payout is initiated on the last + * day of that month. Possible values if `frequency` is **weekly**: **[1 - 5]**. + * Default value: The `defaultFrequencyValue` from the balance platform schedule + * that you are applying. + */ + @JsonProperty(JSON_PROPERTY_FREQUENCY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFrequencyValue(Object frequencyValue) { + this.frequencyValue = frequencyValue; + isSetFrequencyValue = true; // mark as set + } + + /** + * The maximum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @param maxPayoutAmount The maximum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + * @return the current {@code PatchableBalanceAccountConfigurationRequest} instance, allowing for + * method chaining + */ + public PatchableBalanceAccountConfigurationRequest maxPayoutAmount(Object maxPayoutAmount) { + this.maxPayoutAmount = maxPayoutAmount; + isSetMaxPayoutAmount = true; // mark as set + return this; + } + + /** + * The maximum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @return maxPayoutAmount The maximum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_MAX_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Object getMaxPayoutAmount() { + return maxPayoutAmount; + } + + /** + * The maximum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @param maxPayoutAmount The maximum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_MAX_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxPayoutAmount(Object maxPayoutAmount) { + this.maxPayoutAmount = maxPayoutAmount; + isSetMaxPayoutAmount = true; // mark as set + } + + /** + * The minimum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @param minPayoutAmount The minimum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + * @return the current {@code PatchableBalanceAccountConfigurationRequest} instance, allowing for + * method chaining + */ + public PatchableBalanceAccountConfigurationRequest minPayoutAmount(Object minPayoutAmount) { + this.minPayoutAmount = minPayoutAmount; + isSetMinPayoutAmount = true; // mark as set + return this; + } + + /** + * The minimum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @return minPayoutAmount The minimum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_MIN_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Object getMinPayoutAmount() { + return minPayoutAmount; + } + + /** + * The minimum amount that can be paid out from balance accounts that use this payout schedule. + * Default value: **0** + * + * @param minPayoutAmount The minimum amount that can be paid out from balance accounts that use + * this payout schedule. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_MIN_PAYOUT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMinPayoutAmount(Object minPayoutAmount) { + this.minPayoutAmount = minPayoutAmount; + isSetMinPayoutAmount = true; // mark as set + } + + /** + * The merchant reference that will be shown only in the schedule. + * + * @param reference The merchant reference that will be shown only in the schedule. + * @return the current {@code PatchableBalanceAccountConfigurationRequest} instance, allowing for + * method chaining + */ + public PatchableBalanceAccountConfigurationRequest reference(Object reference) { + this.reference = reference; + isSetReference = true; // mark as set + return this; + } + + /** + * The merchant reference that will be shown only in the schedule. + * + * @return reference The merchant reference that will be shown only in the schedule. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Object getReference() { + return reference; + } + + /** + * The merchant reference that will be shown only in the schedule. + * + * @param reference The merchant reference that will be shown only in the schedule. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReference(Object reference) { + this.reference = reference; + isSetReference = true; // mark as set + } + + /** + * The reference for beneficiary used for all payouts initiated by this payout schedule. This + * reference is sent to the recipient of the transfer and is included in all webhooks related to + * the payout. Supported characters: **a-z**, **A-Z**, **0-9**, **-** and space. Spaces might be + * replaced with **-** if the recipient bank or payment infrastructure does not allow spaces. + * Default value: The `defaultReferenceForBeneficiary` from the balance platform + * schedule that you are applying. + * + * @param referenceForBeneficiary The reference for beneficiary used for all payouts initiated by + * this payout schedule. This reference is sent to the recipient of the transfer and is + * included in all webhooks related to the payout. Supported characters: **a-z**, **A-Z**, + * **0-9**, **-** and space. Spaces might be replaced with **-** if the recipient bank or + * payment infrastructure does not allow spaces. Default value: The + * `defaultReferenceForBeneficiary` from the balance platform schedule that you are + * applying. + * @return the current {@code PatchableBalanceAccountConfigurationRequest} instance, allowing for + * method chaining + */ + public PatchableBalanceAccountConfigurationRequest referenceForBeneficiary( + Object referenceForBeneficiary) { + this.referenceForBeneficiary = referenceForBeneficiary; + isSetReferenceForBeneficiary = true; // mark as set + return this; + } + + /** + * The reference for beneficiary used for all payouts initiated by this payout schedule. This + * reference is sent to the recipient of the transfer and is included in all webhooks related to + * the payout. Supported characters: **a-z**, **A-Z**, **0-9**, **-** and space. Spaces might be + * replaced with **-** if the recipient bank or payment infrastructure does not allow spaces. + * Default value: The `defaultReferenceForBeneficiary` from the balance platform + * schedule that you are applying. + * + * @return referenceForBeneficiary The reference for beneficiary used for all payouts initiated by + * this payout schedule. This reference is sent to the recipient of the transfer and is + * included in all webhooks related to the payout. Supported characters: **a-z**, **A-Z**, + * **0-9**, **-** and space. Spaces might be replaced with **-** if the recipient bank or + * payment infrastructure does not allow spaces. Default value: The + * `defaultReferenceForBeneficiary` from the balance platform schedule that you are + * applying. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Object getReferenceForBeneficiary() { + return referenceForBeneficiary; + } + + /** + * The reference for beneficiary used for all payouts initiated by this payout schedule. This + * reference is sent to the recipient of the transfer and is included in all webhooks related to + * the payout. Supported characters: **a-z**, **A-Z**, **0-9**, **-** and space. Spaces might be + * replaced with **-** if the recipient bank or payment infrastructure does not allow spaces. + * Default value: The `defaultReferenceForBeneficiary` from the balance platform + * schedule that you are applying. + * + * @param referenceForBeneficiary The reference for beneficiary used for all payouts initiated by + * this payout schedule. This reference is sent to the recipient of the transfer and is + * included in all webhooks related to the payout. Supported characters: **a-z**, **A-Z**, + * **0-9**, **-** and space. Spaces might be replaced with **-** if the recipient bank or + * payment infrastructure does not allow spaces. Default value: The + * `defaultReferenceForBeneficiary` from the balance platform schedule that you are + * applying. + */ + @JsonProperty(JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReferenceForBeneficiary(Object referenceForBeneficiary) { + this.referenceForBeneficiary = referenceForBeneficiary; + isSetReferenceForBeneficiary = true; // mark as set + } + + /** + * The amount of funds that must remain available in the balance account after an execution of the + * payout schedule. If the funds in the balance account are less than the retained amount, the + * execution is not initiated. Default value: **0** + * + * @param retainedAmount The amount of funds that must remain available in the balance account + * after an execution of the payout schedule. If the funds in the balance account are less + * than the retained amount, the execution is not initiated. Default value: **0** + * @return the current {@code PatchableBalanceAccountConfigurationRequest} instance, allowing for + * method chaining + */ + public PatchableBalanceAccountConfigurationRequest retainedAmount(Object retainedAmount) { + this.retainedAmount = retainedAmount; + isSetRetainedAmount = true; // mark as set + return this; + } + + /** + * The amount of funds that must remain available in the balance account after an execution of the + * payout schedule. If the funds in the balance account are less than the retained amount, the + * execution is not initiated. Default value: **0** + * + * @return retainedAmount The amount of funds that must remain available in the balance account + * after an execution of the payout schedule. If the funds in the balance account are less + * than the retained amount, the execution is not initiated. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_RETAINED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Object getRetainedAmount() { + return retainedAmount; + } + + /** + * The amount of funds that must remain available in the balance account after an execution of the + * payout schedule. If the funds in the balance account are less than the retained amount, the + * execution is not initiated. Default value: **0** + * + * @param retainedAmount The amount of funds that must remain available in the balance account + * after an execution of the payout schedule. If the funds in the balance account are less + * than the retained amount, the execution is not initiated. Default value: **0** + */ + @JsonProperty(JSON_PROPERTY_RETAINED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRetainedAmount(Object retainedAmount) { + this.retainedAmount = retainedAmount; + isSetRetainedAmount = true; // mark as set + } + + /** + * The time of day when the sales day is closed in balance account time zone. The sales day + * closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * + * @param salesDayClosingTime The time of day when the sales day is closed in balance account time + * zone. The sales day closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * @return the current {@code PatchableBalanceAccountConfigurationRequest} instance, allowing for + * method chaining + * @deprecated + */ + @Deprecated + public PatchableBalanceAccountConfigurationRequest salesDayClosingTime( + String salesDayClosingTime) { + this.salesDayClosingTime = salesDayClosingTime; + isSetSalesDayClosingTime = true; // mark as set + return this; + } + + /** + * The time of day when the sales day is closed in balance account time zone. The sales day + * closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * + * @return salesDayClosingTime The time of day when the sales day is closed in balance account + * time zone. The sales day closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * @deprecated + */ + @Deprecated + @JsonProperty(JSON_PROPERTY_SALES_DAY_CLOSING_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSalesDayClosingTime() { + return salesDayClosingTime; + } + + /** + * The time of day when the sales day is closed in balance account time zone. The sales day + * closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * + * @param salesDayClosingTime The time of day when the sales day is closed in balance account time + * zone. The sales day closing time can be between 00:00 to 07:00. Format: **HH:mm:ss** + * @deprecated + */ + @Deprecated + @JsonProperty(JSON_PROPERTY_SALES_DAY_CLOSING_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSalesDayClosingTime(String salesDayClosingTime) { + this.salesDayClosingTime = salesDayClosingTime; + isSetSalesDayClosingTime = true; // mark as set + } + + /** + * The unique identifier of the transfer instrument to which the funds are paid out. + * + * @param transferInstrumentId The unique identifier of the transfer instrument to which the funds + * are paid out. + * @return the current {@code PatchableBalanceAccountConfigurationRequest} instance, allowing for + * method chaining + */ + public PatchableBalanceAccountConfigurationRequest transferInstrumentId( + String transferInstrumentId) { + this.transferInstrumentId = transferInstrumentId; + isSetTransferInstrumentId = true; // mark as set + return this; + } + + /** + * The unique identifier of the transfer instrument to which the funds are paid out. + * + * @return transferInstrumentId The unique identifier of the transfer instrument to which the + * funds are paid out. + */ + @JsonProperty(JSON_PROPERTY_TRANSFER_INSTRUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTransferInstrumentId() { + return transferInstrumentId; + } + + /** + * The unique identifier of the transfer instrument to which the funds are paid out. + * + * @param transferInstrumentId The unique identifier of the transfer instrument to which the funds + * are paid out. + */ + @JsonProperty(JSON_PROPERTY_TRANSFER_INSTRUMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransferInstrumentId(String transferInstrumentId) { + this.transferInstrumentId = transferInstrumentId; + isSetTransferInstrumentId = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public PatchableBalanceAccountConfigurationRequest 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 PatchableBalanceAccountConfigurationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchableBalanceAccountConfigurationRequest patchableBalanceAccountConfigurationRequest = + (PatchableBalanceAccountConfigurationRequest) o; + return Objects.equals(this.description, patchableBalanceAccountConfigurationRequest.description) + && Objects.equals( + this.isSetDescription, patchableBalanceAccountConfigurationRequest.isSetDescription) + && Objects.equals(this.enabled, patchableBalanceAccountConfigurationRequest.enabled) + && Objects.equals( + this.isSetEnabled, patchableBalanceAccountConfigurationRequest.isSetEnabled) + && Objects.equals(this.frequency, patchableBalanceAccountConfigurationRequest.frequency) + && Objects.equals( + this.isSetFrequency, patchableBalanceAccountConfigurationRequest.isSetFrequency) + && Objects.equals( + this.frequencyValue, patchableBalanceAccountConfigurationRequest.frequencyValue) + && Objects.equals( + this.isSetFrequencyValue, + patchableBalanceAccountConfigurationRequest.isSetFrequencyValue) + && Objects.equals( + this.maxPayoutAmount, patchableBalanceAccountConfigurationRequest.maxPayoutAmount) + && Objects.equals( + this.isSetMaxPayoutAmount, + patchableBalanceAccountConfigurationRequest.isSetMaxPayoutAmount) + && Objects.equals( + this.minPayoutAmount, patchableBalanceAccountConfigurationRequest.minPayoutAmount) + && Objects.equals( + this.isSetMinPayoutAmount, + patchableBalanceAccountConfigurationRequest.isSetMinPayoutAmount) + && Objects.equals(this.reference, patchableBalanceAccountConfigurationRequest.reference) + && Objects.equals( + this.isSetReference, patchableBalanceAccountConfigurationRequest.isSetReference) + && Objects.equals( + this.referenceForBeneficiary, + patchableBalanceAccountConfigurationRequest.referenceForBeneficiary) + && Objects.equals( + this.isSetReferenceForBeneficiary, + patchableBalanceAccountConfigurationRequest.isSetReferenceForBeneficiary) + && Objects.equals( + this.retainedAmount, patchableBalanceAccountConfigurationRequest.retainedAmount) + && Objects.equals( + this.isSetRetainedAmount, + patchableBalanceAccountConfigurationRequest.isSetRetainedAmount) + && Objects.equals( + this.salesDayClosingTime, + patchableBalanceAccountConfigurationRequest.salesDayClosingTime) + && Objects.equals( + this.isSetSalesDayClosingTime, + patchableBalanceAccountConfigurationRequest.isSetSalesDayClosingTime) + && Objects.equals( + this.transferInstrumentId, + patchableBalanceAccountConfigurationRequest.transferInstrumentId) + && Objects.equals( + this.isSetTransferInstrumentId, + patchableBalanceAccountConfigurationRequest.isSetTransferInstrumentId); + } + + @Override + public int hashCode() { + return Objects.hash( + description, + isSetDescription, + enabled, + isSetEnabled, + frequency, + isSetFrequency, + frequencyValue, + isSetFrequencyValue, + maxPayoutAmount, + isSetMaxPayoutAmount, + minPayoutAmount, + isSetMinPayoutAmount, + reference, + isSetReference, + referenceForBeneficiary, + isSetReferenceForBeneficiary, + retainedAmount, + isSetRetainedAmount, + salesDayClosingTime, + isSetSalesDayClosingTime, + transferInstrumentId, + isSetTransferInstrumentId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchableBalanceAccountConfigurationRequest {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n"); + sb.append(" frequencyValue: ").append(toIndentedString(frequencyValue)).append("\n"); + sb.append(" maxPayoutAmount: ").append(toIndentedString(maxPayoutAmount)).append("\n"); + sb.append(" minPayoutAmount: ").append(toIndentedString(minPayoutAmount)).append("\n"); + sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); + sb.append(" referenceForBeneficiary: ") + .append(toIndentedString(referenceForBeneficiary)) + .append("\n"); + sb.append(" retainedAmount: ").append(toIndentedString(retainedAmount)).append("\n"); + sb.append(" salesDayClosingTime: ") + .append(toIndentedString(salesDayClosingTime)) + .append("\n"); + sb.append(" transferInstrumentId: ") + .append(toIndentedString(transferInstrumentId)) + .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 getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetDescription) { + addIfNull(nulls, JSON_PROPERTY_DESCRIPTION, this.description); + } + if (isSetEnabled) { + addIfNull(nulls, JSON_PROPERTY_ENABLED, this.enabled); + } + if (isSetFrequency) { + addIfNull(nulls, JSON_PROPERTY_FREQUENCY, this.frequency); + } + if (isSetFrequencyValue) { + addIfNull(nulls, JSON_PROPERTY_FREQUENCY_VALUE, this.frequencyValue); + } + if (isSetMaxPayoutAmount) { + addIfNull(nulls, JSON_PROPERTY_MAX_PAYOUT_AMOUNT, this.maxPayoutAmount); + } + if (isSetMinPayoutAmount) { + addIfNull(nulls, JSON_PROPERTY_MIN_PAYOUT_AMOUNT, this.minPayoutAmount); + } + if (isSetReference) { + addIfNull(nulls, JSON_PROPERTY_REFERENCE, this.reference); + } + if (isSetReferenceForBeneficiary) { + addIfNull(nulls, JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY, this.referenceForBeneficiary); + } + if (isSetRetainedAmount) { + addIfNull(nulls, JSON_PROPERTY_RETAINED_AMOUNT, this.retainedAmount); + } + if (isSetSalesDayClosingTime) { + addIfNull(nulls, JSON_PROPERTY_SALES_DAY_CLOSING_TIME, this.salesDayClosingTime); + } + if (isSetTransferInstrumentId) { + addIfNull(nulls, JSON_PROPERTY_TRANSFER_INSTRUMENT_ID, this.transferInstrumentId); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of PatchableBalanceAccountConfigurationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PatchableBalanceAccountConfigurationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to + * PatchableBalanceAccountConfigurationRequest + */ + public static PatchableBalanceAccountConfigurationRequest fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper() + .readValue(jsonString, PatchableBalanceAccountConfigurationRequest.class); + } + + /** + * Convert an instance of PatchableBalanceAccountConfigurationRequest to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/PayoutScheduleExecution.java b/src/main/java/com/adyen/model/balanceplatform/PayoutScheduleExecution.java new file mode 100644 index 000000000..e46eefc2b --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/PayoutScheduleExecution.java @@ -0,0 +1,331 @@ +/* + * 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.time.OffsetDateTime; +import java.util.*; + +/** PayoutScheduleExecution */ +@JsonPropertyOrder({ + PayoutScheduleExecution.JSON_PROPERTY_ID, + PayoutScheduleExecution.JSON_PROPERTY_RESULT, + PayoutScheduleExecution.JSON_PROPERTY_RESULT_DETAILS, + PayoutScheduleExecution.JSON_PROPERTY_TRIGGERED_AT +}) +public class PayoutScheduleExecution { + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetId = false; + + public static final String JSON_PROPERTY_RESULT = "result"; + private ExecutionResult result; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetResult = false; + + public static final String JSON_PROPERTY_RESULT_DETAILS = "resultDetails"; + private PayoutScheduleExecutionDetails resultDetails; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetResultDetails = false; + + public static final String JSON_PROPERTY_TRIGGERED_AT = "triggeredAt"; + private OffsetDateTime triggeredAt; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTriggeredAt = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public PayoutScheduleExecution() {} + + /** + * The unique identifier of the payout execution. + * + * @param id The unique identifier of the payout execution. + * @return the current {@code PayoutScheduleExecution} instance, allowing for method chaining + */ + public PayoutScheduleExecution id(String id) { + this.id = id; + isSetId = true; // mark as set + return this; + } + + /** + * The unique identifier of the payout execution. + * + * @return id The unique identifier of the payout execution. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + /** + * The unique identifier of the payout execution. + * + * @param id The unique identifier of the payout execution. + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + isSetId = true; // mark as set + } + + /** + * result + * + * @param result + * @return the current {@code PayoutScheduleExecution} instance, allowing for method chaining + */ + public PayoutScheduleExecution result(ExecutionResult result) { + this.result = result; + isSetResult = true; // mark as set + return this; + } + + /** + * Get result + * + * @return result + */ + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExecutionResult getResult() { + return result; + } + + /** + * result + * + * @param result + */ + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResult(ExecutionResult result) { + this.result = result; + isSetResult = true; // mark as set + } + + /** + * resultDetails + * + * @param resultDetails + * @return the current {@code PayoutScheduleExecution} instance, allowing for method chaining + */ + public PayoutScheduleExecution resultDetails(PayoutScheduleExecutionDetails resultDetails) { + this.resultDetails = resultDetails; + isSetResultDetails = true; // mark as set + return this; + } + + /** + * Get resultDetails + * + * @return resultDetails + */ + @JsonProperty(JSON_PROPERTY_RESULT_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PayoutScheduleExecutionDetails getResultDetails() { + return resultDetails; + } + + /** + * resultDetails + * + * @param resultDetails + */ + @JsonProperty(JSON_PROPERTY_RESULT_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setResultDetails(PayoutScheduleExecutionDetails resultDetails) { + this.resultDetails = resultDetails; + isSetResultDetails = true; // mark as set + } + + /** + * The date and time when the payout execution was initiated. + * + * @param triggeredAt The date and time when the payout execution was initiated. + * @return the current {@code PayoutScheduleExecution} instance, allowing for method chaining + */ + public PayoutScheduleExecution triggeredAt(OffsetDateTime triggeredAt) { + this.triggeredAt = triggeredAt; + isSetTriggeredAt = true; // mark as set + return this; + } + + /** + * The date and time when the payout execution was initiated. + * + * @return triggeredAt The date and time when the payout execution was initiated. + */ + @JsonProperty(JSON_PROPERTY_TRIGGERED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getTriggeredAt() { + return triggeredAt; + } + + /** + * The date and time when the payout execution was initiated. + * + * @param triggeredAt The date and time when the payout execution was initiated. + */ + @JsonProperty(JSON_PROPERTY_TRIGGERED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTriggeredAt(OffsetDateTime triggeredAt) { + this.triggeredAt = triggeredAt; + isSetTriggeredAt = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public PayoutScheduleExecution 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 PayoutScheduleExecution object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayoutScheduleExecution payoutScheduleExecution = (PayoutScheduleExecution) o; + return Objects.equals(this.id, payoutScheduleExecution.id) + && Objects.equals(this.isSetId, payoutScheduleExecution.isSetId) + && Objects.equals(this.result, payoutScheduleExecution.result) + && Objects.equals(this.isSetResult, payoutScheduleExecution.isSetResult) + && Objects.equals(this.resultDetails, payoutScheduleExecution.resultDetails) + && Objects.equals(this.isSetResultDetails, payoutScheduleExecution.isSetResultDetails) + && Objects.equals(this.triggeredAt, payoutScheduleExecution.triggeredAt) + && Objects.equals(this.isSetTriggeredAt, payoutScheduleExecution.isSetTriggeredAt); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + isSetId, + result, + isSetResult, + resultDetails, + isSetResultDetails, + triggeredAt, + isSetTriggeredAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayoutScheduleExecution {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" resultDetails: ").append(toIndentedString(resultDetails)).append("\n"); + sb.append(" triggeredAt: ").append(toIndentedString(triggeredAt)).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 getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetId) { + addIfNull(nulls, JSON_PROPERTY_ID, this.id); + } + if (isSetResult) { + addIfNull(nulls, JSON_PROPERTY_RESULT, this.result); + } + if (isSetResultDetails) { + addIfNull(nulls, JSON_PROPERTY_RESULT_DETAILS, this.resultDetails); + } + if (isSetTriggeredAt) { + addIfNull(nulls, JSON_PROPERTY_TRIGGERED_AT, this.triggeredAt); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of PayoutScheduleExecution given an JSON string + * + * @param jsonString JSON string + * @return An instance of PayoutScheduleExecution + * @throws JsonProcessingException if the JSON string is invalid with respect to + * PayoutScheduleExecution + */ + public static PayoutScheduleExecution fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PayoutScheduleExecution.class); + } + + /** + * Convert an instance of PayoutScheduleExecution to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/PayoutScheduleExecutionDetails.java b/src/main/java/com/adyen/model/balanceplatform/PayoutScheduleExecutionDetails.java new file mode 100644 index 000000000..21d30db4a --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/PayoutScheduleExecutionDetails.java @@ -0,0 +1,280 @@ +/* + * 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.*; + +/** PayoutScheduleExecutionDetails */ +@JsonPropertyOrder({ + PayoutScheduleExecutionDetails.JSON_PROPERTY_REASON, + PayoutScheduleExecutionDetails.JSON_PROPERTY_REASON_CODE, + PayoutScheduleExecutionDetails.JSON_PROPERTY_TRANSFER_ID +}) +public class PayoutScheduleExecutionDetails { + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetReason = false; + + public static final String JSON_PROPERTY_REASON_CODE = "reasonCode"; + private String reasonCode; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetReasonCode = false; + + public static final String JSON_PROPERTY_TRANSFER_ID = "transferId"; + private String transferId; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetTransferId = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public PayoutScheduleExecutionDetails() {} + + /** + * Human readable reason for why execution was not successful if applicable. + * + * @param reason Human readable reason for why execution was not successful if applicable. + * @return the current {@code PayoutScheduleExecutionDetails} instance, allowing for method + * chaining + */ + public PayoutScheduleExecutionDetails reason(String reason) { + this.reason = reason; + isSetReason = true; // mark as set + return this; + } + + /** + * Human readable reason for why execution was not successful if applicable. + * + * @return reason Human readable reason for why execution was not successful if applicable. + */ + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReason() { + return reason; + } + + /** + * Human readable reason for why execution was not successful if applicable. + * + * @param reason Human readable reason for why execution was not successful if applicable. + */ + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReason(String reason) { + this.reason = reason; + isSetReason = true; // mark as set + } + + /** + * Reason Code for why execution was not successful if applicable. + * + * @param reasonCode Reason Code for why execution was not successful if applicable. + * @return the current {@code PayoutScheduleExecutionDetails} instance, allowing for method + * chaining + */ + public PayoutScheduleExecutionDetails reasonCode(String reasonCode) { + this.reasonCode = reasonCode; + isSetReasonCode = true; // mark as set + return this; + } + + /** + * Reason Code for why execution was not successful if applicable. + * + * @return reasonCode Reason Code for why execution was not successful if applicable. + */ + @JsonProperty(JSON_PROPERTY_REASON_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReasonCode() { + return reasonCode; + } + + /** + * Reason Code for why execution was not successful if applicable. + * + * @param reasonCode Reason Code for why execution was not successful if applicable. + */ + @JsonProperty(JSON_PROPERTY_REASON_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReasonCode(String reasonCode) { + this.reasonCode = reasonCode; + isSetReasonCode = true; // mark as set + } + + /** + * The id of the transfer from executing the payout. + * + * @param transferId The id of the transfer from executing the payout. + * @return the current {@code PayoutScheduleExecutionDetails} instance, allowing for method + * chaining + */ + public PayoutScheduleExecutionDetails transferId(String transferId) { + this.transferId = transferId; + isSetTransferId = true; // mark as set + return this; + } + + /** + * The id of the transfer from executing the payout. + * + * @return transferId The id of the transfer from executing the payout. + */ + @JsonProperty(JSON_PROPERTY_TRANSFER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTransferId() { + return transferId; + } + + /** + * The id of the transfer from executing the payout. + * + * @param transferId The id of the transfer from executing the payout. + */ + @JsonProperty(JSON_PROPERTY_TRANSFER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransferId(String transferId) { + this.transferId = transferId; + isSetTransferId = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public PayoutScheduleExecutionDetails 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 PayoutScheduleExecutionDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayoutScheduleExecutionDetails payoutScheduleExecutionDetails = + (PayoutScheduleExecutionDetails) o; + return Objects.equals(this.reason, payoutScheduleExecutionDetails.reason) + && Objects.equals(this.isSetReason, payoutScheduleExecutionDetails.isSetReason) + && Objects.equals(this.reasonCode, payoutScheduleExecutionDetails.reasonCode) + && Objects.equals(this.isSetReasonCode, payoutScheduleExecutionDetails.isSetReasonCode) + && Objects.equals(this.transferId, payoutScheduleExecutionDetails.transferId) + && Objects.equals(this.isSetTransferId, payoutScheduleExecutionDetails.isSetTransferId); + } + + @Override + public int hashCode() { + return Objects.hash( + reason, isSetReason, reasonCode, isSetReasonCode, transferId, isSetTransferId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayoutScheduleExecutionDetails {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" reasonCode: ").append(toIndentedString(reasonCode)).append("\n"); + sb.append(" transferId: ").append(toIndentedString(transferId)).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 getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetReason) { + addIfNull(nulls, JSON_PROPERTY_REASON, this.reason); + } + if (isSetReasonCode) { + addIfNull(nulls, JSON_PROPERTY_REASON_CODE, this.reasonCode); + } + if (isSetTransferId) { + addIfNull(nulls, JSON_PROPERTY_TRANSFER_ID, this.transferId); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of PayoutScheduleExecutionDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of PayoutScheduleExecutionDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to + * PayoutScheduleExecutionDetails + */ + public static PayoutScheduleExecutionDetails fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PayoutScheduleExecutionDetails.class); + } + + /** + * Convert an instance of PayoutScheduleExecutionDetails to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/balanceplatform/PayoutScheduleExecutions.java b/src/main/java/com/adyen/model/balanceplatform/PayoutScheduleExecutions.java new file mode 100644 index 000000000..9ec2cdbcb --- /dev/null +++ b/src/main/java/com/adyen/model/balanceplatform/PayoutScheduleExecutions.java @@ -0,0 +1,194 @@ +/* + * 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.*; +import java.util.ArrayList; +import java.util.List; + +/** PayoutScheduleExecutions */ +@JsonPropertyOrder({PayoutScheduleExecutions.JSON_PROPERTY_PAYOUT_SCHEDULE_EXECUTIONS}) +public class PayoutScheduleExecutions { + public static final String JSON_PROPERTY_PAYOUT_SCHEDULE_EXECUTIONS = "payoutScheduleExecutions"; + private List payoutScheduleExecutions; + + /** Mark when the attribute has been explicitly set. */ + private boolean isSetPayoutScheduleExecutions = false; + + /** + * Sets whether attributes with null values should be explicitly included in the JSON payload. + * Default is false. + */ + @JsonIgnore private boolean includeNullValues = false; + + public PayoutScheduleExecutions() {} + + /** + * Contains a list of executions of the payout schedule. + * + * @param payoutScheduleExecutions Contains a list of executions of the payout schedule. + * @return the current {@code PayoutScheduleExecutions} instance, allowing for method chaining + */ + public PayoutScheduleExecutions payoutScheduleExecutions( + List payoutScheduleExecutions) { + this.payoutScheduleExecutions = payoutScheduleExecutions; + isSetPayoutScheduleExecutions = true; // mark as set + return this; + } + + public PayoutScheduleExecutions addPayoutScheduleExecutionsItem( + PayoutScheduleExecution payoutScheduleExecutionsItem) { + if (this.payoutScheduleExecutions == null) { + this.payoutScheduleExecutions = new ArrayList<>(); + } + this.payoutScheduleExecutions.add(payoutScheduleExecutionsItem); + return this; + } + + /** + * Contains a list of executions of the payout schedule. + * + * @return payoutScheduleExecutions Contains a list of executions of the payout schedule. + */ + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE_EXECUTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPayoutScheduleExecutions() { + return payoutScheduleExecutions; + } + + /** + * Contains a list of executions of the payout schedule. + * + * @param payoutScheduleExecutions Contains a list of executions of the payout schedule. + */ + @JsonProperty(JSON_PROPERTY_PAYOUT_SCHEDULE_EXECUTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPayoutScheduleExecutions(List payoutScheduleExecutions) { + this.payoutScheduleExecutions = payoutScheduleExecutions; + isSetPayoutScheduleExecutions = true; // mark as set + } + + /** + * Configures whether null values are explicitly serialized in the JSON payload. Default is false. + */ + public PayoutScheduleExecutions 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 PayoutScheduleExecutions object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayoutScheduleExecutions payoutScheduleExecutions = (PayoutScheduleExecutions) o; + return Objects.equals( + this.payoutScheduleExecutions, payoutScheduleExecutions.payoutScheduleExecutions) + && Objects.equals( + this.isSetPayoutScheduleExecutions, + payoutScheduleExecutions.isSetPayoutScheduleExecutions); + } + + @Override + public int hashCode() { + return Objects.hash(payoutScheduleExecutions, isSetPayoutScheduleExecutions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayoutScheduleExecutions {\n"); + sb.append(" payoutScheduleExecutions: ") + .append(toIndentedString(payoutScheduleExecutions)) + .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 getExplicitNulls() { + if (!this.includeNullValues) { + return Collections.emptyMap(); + } + + Map nulls = new HashMap<>(); + + if (isSetPayoutScheduleExecutions) { + addIfNull(nulls, JSON_PROPERTY_PAYOUT_SCHEDULE_EXECUTIONS, this.payoutScheduleExecutions); + } + + return nulls; + } + + // add to map when value is null + private void addIfNull(Map map, String key, Object value) { + if (value == null) { + map.put(key, null); + } + } + + /** + * Create an instance of PayoutScheduleExecutions given an JSON string + * + * @param jsonString JSON string + * @return An instance of PayoutScheduleExecutions + * @throws JsonProcessingException if the JSON string is invalid with respect to + * PayoutScheduleExecutions + */ + public static PayoutScheduleExecutions fromJson(String jsonString) + throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PayoutScheduleExecutions.class); + } + + /** + * Convert an instance of PayoutScheduleExecutions to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/service/balanceplatform/BalanceAccountsApi.java b/src/main/java/com/adyen/service/balanceplatform/BalanceAccountsApi.java index f1c818454..eb04715ee 100644 --- a/src/main/java/com/adyen/service/balanceplatform/BalanceAccountsApi.java +++ b/src/main/java/com/adyen/service/balanceplatform/BalanceAccountsApi.java @@ -18,12 +18,8 @@ import com.adyen.model.balanceplatform.BalanceAccount; import com.adyen.model.balanceplatform.BalanceAccountInfo; import com.adyen.model.balanceplatform.BalanceAccountUpdateRequest; -import com.adyen.model.balanceplatform.BalanceSweepConfigurationsResponse; -import com.adyen.model.balanceplatform.CreateSweepConfigurationV2; import com.adyen.model.balanceplatform.PaginatedPaymentInstrumentsResponse; -import com.adyen.model.balanceplatform.SweepConfigurationV2; import com.adyen.model.balanceplatform.TransactionRulesResponse; -import com.adyen.model.balanceplatform.UpdateSweepConfigurationV2; import com.adyen.service.exception.ApiException; import com.adyen.service.resource.Resource; import java.io.IOException; @@ -90,149 +86,6 @@ public BalanceAccount createBalanceAccount( return BalanceAccount.fromJson(jsonResult); } - /** - * Create a sweep - * - * @param balanceAccountId {@link String } The unique identifier of the balance account. - * (required) - * @param createSweepConfigurationV2 {@link CreateSweepConfigurationV2 } (required) - * @return {@link SweepConfigurationV2 } - * @throws ApiException if fails to make API call - */ - public SweepConfigurationV2 createSweep( - String balanceAccountId, CreateSweepConfigurationV2 createSweepConfigurationV2) - throws ApiException, IOException { - return createSweep(balanceAccountId, createSweepConfigurationV2, null); - } - - /** - * Create a sweep - * - * @param balanceAccountId {@link String } The unique identifier of the balance account. - * (required) - * @param createSweepConfigurationV2 {@link CreateSweepConfigurationV2 } (required) - * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as - * idempotency-keys (optional) - * @return {@link SweepConfigurationV2 } - * @throws ApiException if fails to make API call - */ - public SweepConfigurationV2 createSweep( - String balanceAccountId, - CreateSweepConfigurationV2 createSweepConfigurationV2, - RequestOptions requestOptions) - throws ApiException, IOException { - // Add path params - Map pathParams = new HashMap<>(); - if (balanceAccountId == null) { - throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); - } - pathParams.put("balanceAccountId", balanceAccountId); - - String requestBody = createSweepConfigurationV2.toJson(); - Resource resource = - new Resource(this, this.baseURL + "/balanceAccounts/{balanceAccountId}/sweeps", null); - String jsonResult = - resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); - return SweepConfigurationV2.fromJson(jsonResult); - } - - /** - * Delete a sweep - * - * @param balanceAccountId {@link String } The unique identifier of the balance account. - * (required) - * @param sweepId {@link String } The unique identifier of the sweep. (required) - * @throws ApiException if fails to make API call - */ - public void deleteSweep(String balanceAccountId, String sweepId) - throws ApiException, IOException { - deleteSweep(balanceAccountId, sweepId, null); - } - - /** - * Delete a sweep - * - * @param balanceAccountId {@link String } The unique identifier of the balance account. - * (required) - * @param sweepId {@link String } The unique identifier of the sweep. (required) - * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as - * idempotency-keys (optional) - * @throws ApiException if fails to make API call - */ - public void deleteSweep(String balanceAccountId, String sweepId, RequestOptions requestOptions) - throws ApiException, IOException { - // Add path params - Map pathParams = new HashMap<>(); - if (balanceAccountId == null) { - throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); - } - pathParams.put("balanceAccountId", balanceAccountId); - if (sweepId == null) { - throw new IllegalArgumentException("Please provide the sweepId path parameter"); - } - pathParams.put("sweepId", sweepId); - - String requestBody = null; - Resource resource = - new Resource( - this, this.baseURL + "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}", null); - resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.DELETE, pathParams); - } - - /** - * Get all sweeps for a balance account - * - * @param balanceAccountId {@link String } The unique identifier of the balance account. - * (required) - * @return {@link BalanceSweepConfigurationsResponse } - * @throws ApiException if fails to make API call - */ - public BalanceSweepConfigurationsResponse getAllSweepsForBalanceAccount(String balanceAccountId) - throws ApiException, IOException { - return getAllSweepsForBalanceAccount(balanceAccountId, null, null, null); - } - - /** - * Get all sweeps for a balance account - * - * @param balanceAccountId {@link String } The unique identifier of the balance account. - * (required) - * @param offset {@link Integer } Query: The number of items that you want to skip. (optional) - * @param limit {@link Integer } Query: The number of items returned per page, maximum 100 items. - * By default, the response returns 10 items per page. (optional) - * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as - * idempotency-keys (optional) - * @return {@link BalanceSweepConfigurationsResponse } - * @throws ApiException if fails to make API call - */ - public BalanceSweepConfigurationsResponse getAllSweepsForBalanceAccount( - String balanceAccountId, Integer offset, Integer limit, RequestOptions requestOptions) - throws ApiException, IOException { - // Add path params - Map pathParams = new HashMap<>(); - if (balanceAccountId == null) { - throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); - } - pathParams.put("balanceAccountId", balanceAccountId); - - // Add query params - Map queryParams = new HashMap<>(); - if (offset != null) { - queryParams.put("offset", offset.toString()); - } - if (limit != null) { - queryParams.put("limit", limit.toString()); - } - - String requestBody = null; - Resource resource = - new Resource(this, this.baseURL + "/balanceAccounts/{balanceAccountId}/sweeps", null); - String jsonResult = - resource.request( - requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams); - return BalanceSweepConfigurationsResponse.fromJson(jsonResult); - } - /** * Get all transaction rules for a balance account * @@ -364,54 +217,6 @@ public PaginatedPaymentInstrumentsResponse getPaymentInstrumentsLinkedToBalanceA return PaginatedPaymentInstrumentsResponse.fromJson(jsonResult); } - /** - * Get a sweep - * - * @param balanceAccountId {@link String } The unique identifier of the balance account. - * (required) - * @param sweepId {@link String } The unique identifier of the sweep. (required) - * @return {@link SweepConfigurationV2 } - * @throws ApiException if fails to make API call - */ - public SweepConfigurationV2 getSweep(String balanceAccountId, String sweepId) - throws ApiException, IOException { - return getSweep(balanceAccountId, sweepId, null); - } - - /** - * Get a sweep - * - * @param balanceAccountId {@link String } The unique identifier of the balance account. - * (required) - * @param sweepId {@link String } The unique identifier of the sweep. (required) - * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as - * idempotency-keys (optional) - * @return {@link SweepConfigurationV2 } - * @throws ApiException if fails to make API call - */ - public SweepConfigurationV2 getSweep( - String balanceAccountId, String sweepId, RequestOptions requestOptions) - throws ApiException, IOException { - // Add path params - Map pathParams = new HashMap<>(); - if (balanceAccountId == null) { - throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); - } - pathParams.put("balanceAccountId", balanceAccountId); - if (sweepId == null) { - throw new IllegalArgumentException("Please provide the sweepId path parameter"); - } - pathParams.put("sweepId", sweepId); - - String requestBody = null; - Resource resource = - new Resource( - this, this.baseURL + "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}", null); - String jsonResult = - resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams); - return SweepConfigurationV2.fromJson(jsonResult); - } - /** * Update a balance account * @@ -454,60 +259,4 @@ public BalanceAccount updateBalanceAccount( resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams); return BalanceAccount.fromJson(jsonResult); } - - /** - * Update a sweep - * - * @param balanceAccountId {@link String } The unique identifier of the balance account. - * (required) - * @param sweepId {@link String } The unique identifier of the sweep. (required) - * @param updateSweepConfigurationV2 {@link UpdateSweepConfigurationV2 } (required) - * @return {@link SweepConfigurationV2 } - * @throws ApiException if fails to make API call - */ - public SweepConfigurationV2 updateSweep( - String balanceAccountId, - String sweepId, - UpdateSweepConfigurationV2 updateSweepConfigurationV2) - throws ApiException, IOException { - return updateSweep(balanceAccountId, sweepId, updateSweepConfigurationV2, null); - } - - /** - * Update a sweep - * - * @param balanceAccountId {@link String } The unique identifier of the balance account. - * (required) - * @param sweepId {@link String } The unique identifier of the sweep. (required) - * @param updateSweepConfigurationV2 {@link UpdateSweepConfigurationV2 } (required) - * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as - * idempotency-keys (optional) - * @return {@link SweepConfigurationV2 } - * @throws ApiException if fails to make API call - */ - public SweepConfigurationV2 updateSweep( - String balanceAccountId, - String sweepId, - UpdateSweepConfigurationV2 updateSweepConfigurationV2, - RequestOptions requestOptions) - throws ApiException, IOException { - // Add path params - Map pathParams = new HashMap<>(); - if (balanceAccountId == null) { - throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); - } - pathParams.put("balanceAccountId", balanceAccountId); - if (sweepId == null) { - throw new IllegalArgumentException("Please provide the sweepId path parameter"); - } - pathParams.put("sweepId", sweepId); - - String requestBody = updateSweepConfigurationV2.toJson(); - Resource resource = - new Resource( - this, this.baseURL + "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}", null); - String jsonResult = - resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams); - return SweepConfigurationV2.fromJson(jsonResult); - } } diff --git a/src/main/java/com/adyen/service/balanceplatform/CustomPayoutSchedulesSweepsApi.java b/src/main/java/com/adyen/service/balanceplatform/CustomPayoutSchedulesSweepsApi.java new file mode 100644 index 000000000..f77ec3850 --- /dev/null +++ b/src/main/java/com/adyen/service/balanceplatform/CustomPayoutSchedulesSweepsApi.java @@ -0,0 +1,304 @@ +/* + * 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.service.balanceplatform; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.RequestOptions; +import com.adyen.model.balanceplatform.BalanceSweepConfigurationsResponse; +import com.adyen.model.balanceplatform.CreateSweepConfigurationV2; +import com.adyen.model.balanceplatform.SweepConfigurationV2; +import com.adyen.model.balanceplatform.UpdateSweepConfigurationV2; +import com.adyen.service.exception.ApiException; +import com.adyen.service.resource.Resource; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class CustomPayoutSchedulesSweepsApi extends Service { + + public static final String API_VERSION = "2"; + + protected String baseURL; + + /** + * Custom payout schedules (sweeps) constructor in {@link com.adyen.service.balanceplatform + * package}. + * + * @param client {@link Client } (required) + */ + public CustomPayoutSchedulesSweepsApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://balanceplatform-api-test.adyen.com/bcl/v2"); + } + + /** + * Custom payout schedules (sweeps) constructor in {@link com.adyen.service.balanceplatform + * package}. Please use this constructor only if you would like to pass along your own url for + * routing or testing purposes. The latest API version is defined in this class as a constant. + * + * @param client {@link Client } (required) + * @param baseURL {@link String } (required) + */ + public CustomPayoutSchedulesSweepsApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Create a sweep + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param createSweepConfigurationV2 {@link CreateSweepConfigurationV2 } (required) + * @return {@link SweepConfigurationV2 } + * @throws ApiException if fails to make API call + */ + public SweepConfigurationV2 createSweep( + String balanceAccountId, CreateSweepConfigurationV2 createSweepConfigurationV2) + throws ApiException, IOException { + return createSweep(balanceAccountId, createSweepConfigurationV2, null); + } + + /** + * Create a sweep + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param createSweepConfigurationV2 {@link CreateSweepConfigurationV2 } (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link SweepConfigurationV2 } + * @throws ApiException if fails to make API call + */ + public SweepConfigurationV2 createSweep( + String balanceAccountId, + CreateSweepConfigurationV2 createSweepConfigurationV2, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (balanceAccountId == null) { + throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); + } + pathParams.put("balanceAccountId", balanceAccountId); + + String requestBody = createSweepConfigurationV2.toJson(); + Resource resource = + new Resource(this, this.baseURL + "/balanceAccounts/{balanceAccountId}/sweeps", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + return SweepConfigurationV2.fromJson(jsonResult); + } + + /** + * Delete a sweep + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param sweepId {@link String } The unique identifier of the sweep. (required) + * @throws ApiException if fails to make API call + */ + public void deleteSweep(String balanceAccountId, String sweepId) + throws ApiException, IOException { + deleteSweep(balanceAccountId, sweepId, null); + } + + /** + * Delete a sweep + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param sweepId {@link String } The unique identifier of the sweep. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void deleteSweep(String balanceAccountId, String sweepId, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (balanceAccountId == null) { + throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); + } + pathParams.put("balanceAccountId", balanceAccountId); + if (sweepId == null) { + throw new IllegalArgumentException("Please provide the sweepId path parameter"); + } + pathParams.put("sweepId", sweepId); + + String requestBody = null; + Resource resource = + new Resource( + this, this.baseURL + "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.DELETE, pathParams); + } + + /** + * Get all sweeps for a balance account + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @return {@link BalanceSweepConfigurationsResponse } + * @throws ApiException if fails to make API call + */ + public BalanceSweepConfigurationsResponse getAllSweepsForBalanceAccount(String balanceAccountId) + throws ApiException, IOException { + return getAllSweepsForBalanceAccount(balanceAccountId, null, null, null); + } + + /** + * Get all sweeps for a balance account + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param offset {@link Integer } Query: The number of items that you want to skip. (optional) + * @param limit {@link Integer } Query: The number of items returned per page, maximum 100 items. + * By default, the response returns 10 items per page. (optional) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link BalanceSweepConfigurationsResponse } + * @throws ApiException if fails to make API call + */ + public BalanceSweepConfigurationsResponse getAllSweepsForBalanceAccount( + String balanceAccountId, Integer offset, Integer limit, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (balanceAccountId == null) { + throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); + } + pathParams.put("balanceAccountId", balanceAccountId); + + // Add query params + Map queryParams = new HashMap<>(); + if (offset != null) { + queryParams.put("offset", offset.toString()); + } + if (limit != null) { + queryParams.put("limit", limit.toString()); + } + + String requestBody = null; + Resource resource = + new Resource(this, this.baseURL + "/balanceAccounts/{balanceAccountId}/sweeps", null); + String jsonResult = + resource.request( + requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams); + return BalanceSweepConfigurationsResponse.fromJson(jsonResult); + } + + /** + * Get a sweep + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param sweepId {@link String } The unique identifier of the sweep. (required) + * @return {@link SweepConfigurationV2 } + * @throws ApiException if fails to make API call + */ + public SweepConfigurationV2 getSweep(String balanceAccountId, String sweepId) + throws ApiException, IOException { + return getSweep(balanceAccountId, sweepId, null); + } + + /** + * Get a sweep + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param sweepId {@link String } The unique identifier of the sweep. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link SweepConfigurationV2 } + * @throws ApiException if fails to make API call + */ + public SweepConfigurationV2 getSweep( + String balanceAccountId, String sweepId, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (balanceAccountId == null) { + throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); + } + pathParams.put("balanceAccountId", balanceAccountId); + if (sweepId == null) { + throw new IllegalArgumentException("Please provide the sweepId path parameter"); + } + pathParams.put("sweepId", sweepId); + + String requestBody = null; + Resource resource = + new Resource( + this, this.baseURL + "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams); + return SweepConfigurationV2.fromJson(jsonResult); + } + + /** + * Update a sweep + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param sweepId {@link String } The unique identifier of the sweep. (required) + * @param updateSweepConfigurationV2 {@link UpdateSweepConfigurationV2 } (required) + * @return {@link SweepConfigurationV2 } + * @throws ApiException if fails to make API call + */ + public SweepConfigurationV2 updateSweep( + String balanceAccountId, + String sweepId, + UpdateSweepConfigurationV2 updateSweepConfigurationV2) + throws ApiException, IOException { + return updateSweep(balanceAccountId, sweepId, updateSweepConfigurationV2, null); + } + + /** + * Update a sweep + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param sweepId {@link String } The unique identifier of the sweep. (required) + * @param updateSweepConfigurationV2 {@link UpdateSweepConfigurationV2 } (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link SweepConfigurationV2 } + * @throws ApiException if fails to make API call + */ + public SweepConfigurationV2 updateSweep( + String balanceAccountId, + String sweepId, + UpdateSweepConfigurationV2 updateSweepConfigurationV2, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (balanceAccountId == null) { + throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); + } + pathParams.put("balanceAccountId", balanceAccountId); + if (sweepId == null) { + throw new IllegalArgumentException("Please provide the sweepId path parameter"); + } + pathParams.put("sweepId", sweepId); + + String requestBody = updateSweepConfigurationV2.toJson(); + Resource resource = + new Resource( + this, this.baseURL + "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams); + return SweepConfigurationV2.fromJson(jsonResult); + } +} diff --git a/src/main/java/com/adyen/service/balanceplatform/ManagedPayoutSchedulesApi.java b/src/main/java/com/adyen/service/balanceplatform/ManagedPayoutSchedulesApi.java new file mode 100644 index 000000000..1e7788f1a --- /dev/null +++ b/src/main/java/com/adyen/service/balanceplatform/ManagedPayoutSchedulesApi.java @@ -0,0 +1,522 @@ +/* + * 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.service.balanceplatform; + +import com.adyen.Client; +import com.adyen.Service; +import com.adyen.constants.ApiConstants; +import com.adyen.model.RequestOptions; +import com.adyen.model.balanceplatform.BalanceAccountConfiguration; +import com.adyen.model.balanceplatform.BalanceAccountConfigurationRequest; +import com.adyen.model.balanceplatform.BalanceAccountConfigurations; +import com.adyen.model.balanceplatform.BalancePlatformConfiguration; +import com.adyen.model.balanceplatform.BalancePlatformConfigurations; +import com.adyen.model.balanceplatform.ExecutionResult; +import com.adyen.model.balanceplatform.PatchableBalanceAccountConfigurationRequest; +import com.adyen.model.balanceplatform.PayoutScheduleExecutions; +import com.adyen.service.exception.ApiException; +import com.adyen.service.resource.Resource; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class ManagedPayoutSchedulesApi extends Service { + + public static final String API_VERSION = "2"; + + protected String baseURL; + + /** + * Managed payout schedules constructor in {@link com.adyen.service.balanceplatform package}. + * + * @param client {@link Client } (required) + */ + public ManagedPayoutSchedulesApi(Client client) { + super(client); + this.baseURL = createBaseURL("https://balanceplatform-api-test.adyen.com/bcl/v2"); + } + + /** + * Managed payout schedules constructor in {@link com.adyen.service.balanceplatform package}. + * Please use this constructor only if you would like to pass along your own url for routing or + * testing purposes. The latest API version is defined in this class as a constant. + * + * @param client {@link Client } (required) + * @param baseURL {@link String } (required) + */ + public ManagedPayoutSchedulesApi(Client client, String baseURL) { + super(client); + this.baseURL = baseURL; + } + + /** + * Apply a managed payout schedule to a balance account + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param balanceAccountConfigurationRequest {@link BalanceAccountConfigurationRequest } + * (required) + * @return {@link BalanceAccountConfiguration } + * @throws ApiException if fails to make API call + */ + public BalanceAccountConfiguration applyManagedSchedule( + String balanceAccountId, + BalanceAccountConfigurationRequest balanceAccountConfigurationRequest) + throws ApiException, IOException { + return applyManagedSchedule(balanceAccountId, balanceAccountConfigurationRequest, null); + } + + /** + * Apply a managed payout schedule to a balance account + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param balanceAccountConfigurationRequest {@link BalanceAccountConfigurationRequest } + * (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link BalanceAccountConfiguration } + * @throws ApiException if fails to make API call + */ + public BalanceAccountConfiguration applyManagedSchedule( + String balanceAccountId, + BalanceAccountConfigurationRequest balanceAccountConfigurationRequest, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (balanceAccountId == null) { + throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); + } + pathParams.put("balanceAccountId", balanceAccountId); + + String requestBody = balanceAccountConfigurationRequest.toJson(); + Resource resource = + new Resource( + this, this.baseURL + "/balanceAccounts/{balanceAccountId}/payoutSchedules", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + return BalanceAccountConfiguration.fromJson(jsonResult); + } + + /** + * Delete a managed payout schedule on a balance account + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param id {@link String } The unique identifier of the payout schedule applied to the balance + * account. (required) + * @throws ApiException if fails to make API call + */ + public void deleteBalanceAccountManagedSchedule(String balanceAccountId, String id) + throws ApiException, IOException { + deleteBalanceAccountManagedSchedule(balanceAccountId, id, null); + } + + /** + * Delete a managed payout schedule on a balance account + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param id {@link String } The unique identifier of the payout schedule applied to the balance + * account. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @throws ApiException if fails to make API call + */ + public void deleteBalanceAccountManagedSchedule( + String balanceAccountId, String id, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (balanceAccountId == null) { + throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); + } + pathParams.put("balanceAccountId", balanceAccountId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = null; + Resource resource = + new Resource( + this, this.baseURL + "/balanceAccounts/{balanceAccountId}/payoutSchedules/{id}", null); + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.DELETE, pathParams); + } + + /** + * Get a specific managed payout schedule on a balance account + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param id {@link String } The unique identifier of the payout schedule for the balance account. + * (required) + * @return {@link BalanceAccountConfiguration } + * @throws ApiException if fails to make API call + */ + public BalanceAccountConfiguration getBalanceAccountManagedScheduleById( + String balanceAccountId, String id) throws ApiException, IOException { + return getBalanceAccountManagedScheduleById(balanceAccountId, id, null); + } + + /** + * Get a specific managed payout schedule on a balance account + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param id {@link String } The unique identifier of the payout schedule for the balance account. + * (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link BalanceAccountConfiguration } + * @throws ApiException if fails to make API call + */ + public BalanceAccountConfiguration getBalanceAccountManagedScheduleById( + String balanceAccountId, String id, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (balanceAccountId == null) { + throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); + } + pathParams.put("balanceAccountId", balanceAccountId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = null; + Resource resource = + new Resource( + this, this.baseURL + "/balanceAccounts/{balanceAccountId}/payoutSchedules/{id}", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams); + return BalanceAccountConfiguration.fromJson(jsonResult); + } + + /** + * Get all managed payout schedules on a balance account + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @return {@link BalanceAccountConfigurations } + * @throws ApiException if fails to make API call + */ + public BalanceAccountConfigurations getBalanceAccountManagedSchedules(String balanceAccountId) + throws ApiException, IOException { + return getBalanceAccountManagedSchedules(balanceAccountId, null, null, null, null); + } + + /** + * Get all managed payout schedules on a balance account + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param currency {@link String } Query: The three-character [ISO currency + * code](https://docs.adyen.com/development-resources/currency-codes) of the currency used in + * the payout schedule. (optional) + * @param cursor {@link String } Query: The `cursor` returned in the links of the + * previous response. (optional) + * @param limit {@link Integer } Query: The number of items returned per page, maximum of 100 + * items. By default, the response returns 10 items per page. (optional, default to 10) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link BalanceAccountConfigurations } + * @throws ApiException if fails to make API call + */ + public BalanceAccountConfigurations getBalanceAccountManagedSchedules( + String balanceAccountId, + String currency, + String cursor, + Integer limit, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (balanceAccountId == null) { + throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); + } + pathParams.put("balanceAccountId", balanceAccountId); + + // Add query params + Map queryParams = new HashMap<>(); + if (currency != null) { + queryParams.put("currency", currency); + } + if (cursor != null) { + queryParams.put("cursor", cursor); + } + if (limit != null) { + queryParams.put("limit", limit.toString()); + } + + String requestBody = null; + Resource resource = + new Resource( + this, this.baseURL + "/balanceAccounts/{balanceAccountId}/payoutSchedules", null); + String jsonResult = + resource.request( + requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams); + return BalanceAccountConfigurations.fromJson(jsonResult); + } + + /** + * Get a specific managed payout schedule on your balance platform + * + * @param balancePlatformId {@link String } The unique identifier of the balance platform. + * (required) + * @param id {@link String } The unique identifier of the payout configuration for your balance + * platform. (required) + * @return {@link BalancePlatformConfiguration } + * @throws ApiException if fails to make API call + */ + public BalancePlatformConfiguration getBalancePlatformManagedScheduleById( + String balancePlatformId, String id) throws ApiException, IOException { + return getBalancePlatformManagedScheduleById(balancePlatformId, id, null); + } + + /** + * Get a specific managed payout schedule on your balance platform + * + * @param balancePlatformId {@link String } The unique identifier of the balance platform. + * (required) + * @param id {@link String } The unique identifier of the payout configuration for your balance + * platform. (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link BalancePlatformConfiguration } + * @throws ApiException if fails to make API call + */ + public BalancePlatformConfiguration getBalancePlatformManagedScheduleById( + String balancePlatformId, String id, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (balancePlatformId == null) { + throw new IllegalArgumentException("Please provide the balancePlatformId path parameter"); + } + pathParams.put("balancePlatformId", balancePlatformId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = null; + Resource resource = + new Resource( + this, + this.baseURL + "/balancePlatforms/{balancePlatformId}/payoutSchedules/{id}", + null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams); + return BalancePlatformConfiguration.fromJson(jsonResult); + } + + /** + * Get all managed payout schedules on your balance platform + * + * @param balancePlatformId {@link String } The unique identifier of the balance platform. + * (required) + * @return {@link BalancePlatformConfigurations } + * @throws ApiException if fails to make API call + */ + public BalancePlatformConfigurations getBalancePlatformManagedSchedules(String balancePlatformId) + throws ApiException, IOException { + return getBalancePlatformManagedSchedules(balancePlatformId, null, null, null); + } + + /** + * Get all managed payout schedules on your balance platform + * + * @param balancePlatformId {@link String } The unique identifier of the balance platform. + * (required) + * @param countryCode {@link String } Query: The two-letter [ISO 3166-1 + * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country to + * which the payout configuration applies. (optional) + * @param currency {@link String } Query: The three-character [ISO currency + * code](https://docs.adyen.com/development-resources/currency-codes) of the currency used in + * the payout configuration. (optional) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link BalancePlatformConfigurations } + * @throws ApiException if fails to make API call + */ + public BalancePlatformConfigurations getBalancePlatformManagedSchedules( + String balancePlatformId, String countryCode, String currency, RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (balancePlatformId == null) { + throw new IllegalArgumentException("Please provide the balancePlatformId path parameter"); + } + pathParams.put("balancePlatformId", balancePlatformId); + + // Add query params + Map queryParams = new HashMap<>(); + if (countryCode != null) { + queryParams.put("countryCode", countryCode); + } + if (currency != null) { + queryParams.put("currency", currency); + } + + String requestBody = null; + Resource resource = + new Resource( + this, this.baseURL + "/balancePlatforms/{balancePlatformId}/payoutSchedules", null); + String jsonResult = + resource.request( + requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams); + return BalancePlatformConfigurations.fromJson(jsonResult); + } + + /** + * View executions of a managed payout schedule + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param id {@link String } The unique identifier of the payout schedule on the balance account. + * (required) + * @param offset {@link Integer } Query: The page number to be returned. Default: **1** (required) + * @return {@link PayoutScheduleExecutions } + * @throws ApiException if fails to make API call + */ + public PayoutScheduleExecutions getPayoutScheduleExecutions( + String balanceAccountId, String id, Integer offset) throws ApiException, IOException { + return getPayoutScheduleExecutions(balanceAccountId, id, null, null, offset, null); + } + + /** + * View executions of a managed payout schedule + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param id {@link String } The unique identifier of the payout schedule on the balance account. + * (required) + * @param results {@link List<ExecutionResult> } Query: Contains a list of payout statuses. + * If included, the response returns only executed payouts that currently have one of the + * specified statuses. Possible statuses: - **succeeded**: The payout was sent successfully. - + * **failed**: The payout was not sent due to an error. - **skipped**: The payout was not + * triggered as expected. (optional + * @param limit {@link Integer } Query: The number of items returned per page. Default: **10** + * (optional) + * @param offset {@link Integer } Query: The page number to be returned. Default: **1** (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link PayoutScheduleExecutions } + * @throws ApiException if fails to make API call + */ + public PayoutScheduleExecutions getPayoutScheduleExecutions( + String balanceAccountId, + String id, + List results, + Integer limit, + Integer offset, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (balanceAccountId == null) { + throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); + } + pathParams.put("balanceAccountId", balanceAccountId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + // Add query params + Map queryParams = new HashMap<>(); + if (results != null) { + queryParams.put("results", results.toString()); + } + if (limit != null) { + queryParams.put("limit", limit.toString()); + } + if (offset != null) { + queryParams.put("offset", offset.toString()); + } + + String requestBody = null; + Resource resource = + new Resource( + this, + this.baseURL + "/balanceAccounts/{balanceAccountId}/payoutSchedules/{id}/executions", + null); + String jsonResult = + resource.request( + requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams, queryParams); + return PayoutScheduleExecutions.fromJson(jsonResult); + } + + /** + * Update a managed payout schedule on a balance account + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param id {@link String } The unique identifier of the payout schedule applied to the balance + * account. (required) + * @param patchableBalanceAccountConfigurationRequest {@link + * PatchableBalanceAccountConfigurationRequest } (required) + * @return {@link BalanceAccountConfiguration } + * @throws ApiException if fails to make API call + */ + public BalanceAccountConfiguration updateBalanceAccountManagedSchedule( + String balanceAccountId, + String id, + PatchableBalanceAccountConfigurationRequest patchableBalanceAccountConfigurationRequest) + throws ApiException, IOException { + return updateBalanceAccountManagedSchedule( + balanceAccountId, id, patchableBalanceAccountConfigurationRequest, null); + } + + /** + * Update a managed payout schedule on a balance account + * + * @param balanceAccountId {@link String } The unique identifier of the balance account. + * (required) + * @param id {@link String } The unique identifier of the payout schedule applied to the balance + * account. (required) + * @param patchableBalanceAccountConfigurationRequest {@link + * PatchableBalanceAccountConfigurationRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional HTTP headers such as + * idempotency-keys (optional) + * @return {@link BalanceAccountConfiguration } + * @throws ApiException if fails to make API call + */ + public BalanceAccountConfiguration updateBalanceAccountManagedSchedule( + String balanceAccountId, + String id, + PatchableBalanceAccountConfigurationRequest patchableBalanceAccountConfigurationRequest, + RequestOptions requestOptions) + throws ApiException, IOException { + // Add path params + Map pathParams = new HashMap<>(); + if (balanceAccountId == null) { + throw new IllegalArgumentException("Please provide the balanceAccountId path parameter"); + } + pathParams.put("balanceAccountId", balanceAccountId); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = patchableBalanceAccountConfigurationRequest.toJson(); + Resource resource = + new Resource( + this, this.baseURL + "/balanceAccounts/{balanceAccountId}/payoutSchedules/{id}", null); + String jsonResult = + resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.PATCH, pathParams); + return BalanceAccountConfiguration.fromJson(jsonResult); + } +}