Class SweepConfiguration
- java.lang.Object
-
- com.adyen.model.configurationwebhooks.SweepConfiguration
-
public class SweepConfiguration extends Object
SweepConfiguration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSweepConfiguration.CustomTypeAdapterFactorystatic classSweepConfiguration.StatusEnumThe status of the sweep.static classSweepConfiguration.TypeEnumThe direction of sweep, whether pushing out or pulling in funds to the balance account.
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_BALANCE_ACCOUNT_IDstatic StringSERIALIZED_NAME_IDstatic StringSERIALIZED_NAME_MERCHANT_ACCOUNTstatic StringSERIALIZED_NAME_SCHEDULEstatic StringSERIALIZED_NAME_STATUSstatic StringSERIALIZED_NAME_SWEEP_AMOUNTstatic StringSERIALIZED_NAME_TARGET_AMOUNTstatic StringSERIALIZED_NAME_TRANSFER_INSTRUMENT_IDstatic StringSERIALIZED_NAME_TRIGGER_AMOUNTstatic StringSERIALIZED_NAME_TYPE
-
Constructor Summary
Constructors Constructor Description SweepConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SweepConfigurationbalanceAccountId(String balanceAccountId)booleanequals(Object o)static SweepConfigurationfromJson(String jsonString)Create an instance of SweepConfiguration given an JSON stringStringgetBalanceAccountId()The unique identifier of the destination or source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id).StringgetId()The unique identifier of the sweep.StringgetMerchantAccount()The merchant account that will be the source of funds.SweepConfigurationSchedulegetSchedule()Get scheduleSweepConfiguration.StatusEnumgetStatus()The status of the sweep.AmountgetSweepAmount()Get sweepAmountAmountgetTargetAmount()Get targetAmountStringgetTransferInstrumentId()The unique identifier of the destination or source [transfer instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/transferInstruments__resParam_id).AmountgetTriggerAmount()Get triggerAmountSweepConfiguration.TypeEnumgetType()The direction of sweep, whether pushing out or pulling in funds to the balance account.inthashCode()SweepConfigurationid(String id)SweepConfigurationmerchantAccount(String merchantAccount)SweepConfigurationschedule(SweepConfigurationSchedule schedule)voidsetBalanceAccountId(String balanceAccountId)voidsetId(String id)voidsetMerchantAccount(String merchantAccount)voidsetSchedule(SweepConfigurationSchedule schedule)voidsetStatus(SweepConfiguration.StatusEnum status)voidsetSweepAmount(Amount sweepAmount)voidsetTargetAmount(Amount targetAmount)voidsetTransferInstrumentId(String transferInstrumentId)voidsetTriggerAmount(Amount triggerAmount)voidsetType(SweepConfiguration.TypeEnum type)SweepConfigurationstatus(SweepConfiguration.StatusEnum status)SweepConfigurationsweepAmount(Amount sweepAmount)SweepConfigurationtargetAmount(Amount targetAmount)StringtoJson()Convert an instance of SweepConfiguration to an JSON stringStringtoString()SweepConfigurationtransferInstrumentId(String transferInstrumentId)SweepConfigurationtriggerAmount(Amount triggerAmount)SweepConfigurationtype(SweepConfiguration.TypeEnum type)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_BALANCE_ACCOUNT_ID
public static final String SERIALIZED_NAME_BALANCE_ACCOUNT_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ID
public static final String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MERCHANT_ACCOUNT
public static final String SERIALIZED_NAME_MERCHANT_ACCOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SCHEDULE
public static final String SERIALIZED_NAME_SCHEDULE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STATUS
public static final String SERIALIZED_NAME_STATUS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SWEEP_AMOUNT
public static final String SERIALIZED_NAME_SWEEP_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TARGET_AMOUNT
public static final String SERIALIZED_NAME_TARGET_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TRANSFER_INSTRUMENT_ID
public static final String SERIALIZED_NAME_TRANSFER_INSTRUMENT_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TRIGGER_AMOUNT
public static final String SERIALIZED_NAME_TRIGGER_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TYPE
public static final String SERIALIZED_NAME_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
balanceAccountId
public SweepConfiguration balanceAccountId(String balanceAccountId)
-
getBalanceAccountId
public String getBalanceAccountId()
The unique identifier of the destination or source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). You can only use this for periodic sweep schedules such as `schedule.type` **daily** or **monthly**.- Returns:
- balanceAccountId
-
setBalanceAccountId
public void setBalanceAccountId(String balanceAccountId)
-
id
public SweepConfiguration id(String id)
-
getId
public String getId()
The unique identifier of the sweep.- Returns:
- id
-
setId
public void setId(String id)
-
merchantAccount
public SweepConfiguration merchantAccount(String merchantAccount)
-
getMerchantAccount
public String getMerchantAccount()
The merchant account that will be the source of funds. You can only use this if you are processing payments with Adyen. This can only be used for sweeps of `type` **pull** and `schedule.type` **balance**.- Returns:
- merchantAccount
-
setMerchantAccount
public void setMerchantAccount(String merchantAccount)
-
schedule
public SweepConfiguration schedule(SweepConfigurationSchedule schedule)
-
getSchedule
public SweepConfigurationSchedule getSchedule()
Get schedule- Returns:
- schedule
-
setSchedule
public void setSchedule(SweepConfigurationSchedule schedule)
-
status
public SweepConfiguration status(SweepConfiguration.StatusEnum status)
-
getStatus
public SweepConfiguration.StatusEnum getStatus()
The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered.- Returns:
- status
-
setStatus
public void setStatus(SweepConfiguration.StatusEnum status)
-
sweepAmount
public SweepConfiguration sweepAmount(Amount sweepAmount)
-
getSweepAmount
public Amount getSweepAmount()
Get sweepAmount- Returns:
- sweepAmount
-
setSweepAmount
public void setSweepAmount(Amount sweepAmount)
-
targetAmount
public SweepConfiguration targetAmount(Amount targetAmount)
-
getTargetAmount
public Amount getTargetAmount()
Get targetAmount- Returns:
- targetAmount
-
setTargetAmount
public void setTargetAmount(Amount targetAmount)
-
transferInstrumentId
public SweepConfiguration transferInstrumentId(String transferInstrumentId)
-
getTransferInstrumentId
public String getTransferInstrumentId()
The unique identifier of the destination or source [transfer instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/transferInstruments__resParam_id). You can also use this in combination with a `merchantAccount` and a `type` **pull** to start a direct debit request from the source transfer instrument. To use this feature, reach out to your Adyen contact.- Returns:
- transferInstrumentId
-
setTransferInstrumentId
public void setTransferInstrumentId(String transferInstrumentId)
-
triggerAmount
public SweepConfiguration triggerAmount(Amount triggerAmount)
-
getTriggerAmount
public Amount getTriggerAmount()
Get triggerAmount- Returns:
- triggerAmount
-
setTriggerAmount
public void setTriggerAmount(Amount triggerAmount)
-
type
public SweepConfiguration type(SweepConfiguration.TypeEnum type)
-
getType
public SweepConfiguration.TypeEnum getType()
The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account.- Returns:
- type
-
setType
public void setType(SweepConfiguration.TypeEnum type)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to SweepConfiguration
-
fromJson
public static SweepConfiguration fromJson(String jsonString) throws IOException
Create an instance of SweepConfiguration given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of SweepConfiguration
- Throws:
IOException- if the JSON string is invalid with respect to SweepConfiguration
-
toJson
public String toJson()
Convert an instance of SweepConfiguration to an JSON string- Returns:
- JSON string
-
-