Package com.adyen.model.checkout
Class BalanceCheckResponse
- java.lang.Object
-
- com.adyen.model.checkout.BalanceCheckResponse
-
public class BalanceCheckResponse extends Object
BalanceCheckResponse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBalanceCheckResponse.ResultCodeEnumThe result of the cancellation request.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_ADDITIONAL_DATAstatic StringJSON_PROPERTY_BALANCEstatic StringJSON_PROPERTY_FRAUD_RESULTstatic StringJSON_PROPERTY_PSP_REFERENCEstatic StringJSON_PROPERTY_REFUSAL_REASONstatic StringJSON_PROPERTY_RESULT_CODEstatic StringJSON_PROPERTY_TRANSACTION_LIMIT
-
Constructor Summary
Constructors Constructor Description BalanceCheckResponse()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BalanceCheckResponseadditionalData(Map<String,String> additionalData)Contains additional information about the payment.BalanceCheckResponsebalance(Amount balance)balancebooleanequals(Object o)Return true if this BalanceCheckResponse object is equal to o.BalanceCheckResponsefraudResult(FraudResult fraudResult)fraudResultstatic BalanceCheckResponsefromJson(String jsonString)Create an instance of BalanceCheckResponse given an JSON stringMap<String,String>getAdditionalData()Contains additional information about the payment.AmountgetBalance()balanceFraudResultgetFraudResult()fraudResultStringgetPspReference()Adyen's 16-character reference associated with the transaction/request.StringgetRefusalReason()If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error.BalanceCheckResponse.ResultCodeEnumgetResultCode()The result of the cancellation request.AmountgetTransactionLimit()transactionLimitinthashCode()BalanceCheckResponsepspReference(String pspReference)Adyen's 16-character reference associated with the transaction/request.BalanceCheckResponseputAdditionalDataItem(String key, String additionalDataItem)BalanceCheckResponserefusalReason(String refusalReason)If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error.BalanceCheckResponseresultCode(BalanceCheckResponse.ResultCodeEnum resultCode)The result of the cancellation request.voidsetAdditionalData(Map<String,String> additionalData)Contains additional information about the payment.voidsetBalance(Amount balance)balancevoidsetFraudResult(FraudResult fraudResult)fraudResultvoidsetPspReference(String pspReference)Adyen's 16-character reference associated with the transaction/request.voidsetRefusalReason(String refusalReason)If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error.voidsetResultCode(BalanceCheckResponse.ResultCodeEnum resultCode)The result of the cancellation request.voidsetTransactionLimit(Amount transactionLimit)transactionLimitStringtoJson()Convert an instance of BalanceCheckResponse to an JSON stringStringtoString()BalanceCheckResponsetransactionLimit(Amount transactionLimit)transactionLimit
-
-
-
Field Detail
-
JSON_PROPERTY_ADDITIONAL_DATA
public static final String JSON_PROPERTY_ADDITIONAL_DATA
- See Also:
- Constant Field Values
-
JSON_PROPERTY_BALANCE
public static final String JSON_PROPERTY_BALANCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_FRAUD_RESULT
public static final String JSON_PROPERTY_FRAUD_RESULT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PSP_REFERENCE
public static final String JSON_PROPERTY_PSP_REFERENCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REFUSAL_REASON
public static final String JSON_PROPERTY_REFUSAL_REASON
- See Also:
- Constant Field Values
-
JSON_PROPERTY_RESULT_CODE
public static final String JSON_PROPERTY_RESULT_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TRANSACTION_LIMIT
public static final String JSON_PROPERTY_TRANSACTION_LIMIT
- See Also:
- Constant Field Values
-
-
Method Detail
-
additionalData
public BalanceCheckResponse additionalData(Map<String,String> additionalData)
Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.- Parameters:
additionalData-- Returns:
- the current
BalanceCheckResponseinstance, allowing for method chaining
-
putAdditionalDataItem
public BalanceCheckResponse putAdditionalDataItem(String key, String additionalDataItem)
-
getAdditionalData
public Map<String,String> getAdditionalData()
Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.- Returns:
- additionalData
-
setAdditionalData
public void setAdditionalData(Map<String,String> additionalData)
Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.- Parameters:
additionalData-
-
balance
public BalanceCheckResponse balance(Amount balance)
balance- Parameters:
balance-- Returns:
- the current
BalanceCheckResponseinstance, allowing for method chaining
-
getBalance
public Amount getBalance()
balance- Returns:
- balance
-
setBalance
public void setBalance(Amount balance)
balance- Parameters:
balance-
-
fraudResult
public BalanceCheckResponse fraudResult(FraudResult fraudResult)
fraudResult- Parameters:
fraudResult-- Returns:
- the current
BalanceCheckResponseinstance, allowing for method chaining
-
getFraudResult
public FraudResult getFraudResult()
fraudResult- Returns:
- fraudResult
-
setFraudResult
public void setFraudResult(FraudResult fraudResult)
fraudResult- Parameters:
fraudResult-
-
pspReference
public BalanceCheckResponse pspReference(String pspReference)
Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.- Parameters:
pspReference-- Returns:
- the current
BalanceCheckResponseinstance, allowing for method chaining
-
getPspReference
public String getPspReference()
Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.- Returns:
- pspReference
-
setPspReference
public void setPspReference(String pspReference)
Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.- Parameters:
pspReference-
-
refusalReason
public BalanceCheckResponse refusalReason(String refusalReason)
If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).- Parameters:
refusalReason-- Returns:
- the current
BalanceCheckResponseinstance, allowing for method chaining
-
getRefusalReason
public String getRefusalReason()
If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).- Returns:
- refusalReason
-
setRefusalReason
public void setRefusalReason(String refusalReason)
If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).- Parameters:
refusalReason-
-
resultCode
public BalanceCheckResponse resultCode(BalanceCheckResponse.ResultCodeEnum resultCode)
The result of the cancellation request. Possible values: * **Success** – Indicates that the balance check was successful. * **NotEnoughBalance** – Commonly indicates that the card did not have enough balance to pay the amount in the request, or that the currency of the balance on the card did not match the currency of the requested amount. * **Failed** – Indicates that the balance check failed.- Parameters:
resultCode-- Returns:
- the current
BalanceCheckResponseinstance, allowing for method chaining
-
getResultCode
public BalanceCheckResponse.ResultCodeEnum getResultCode()
The result of the cancellation request. Possible values: * **Success** – Indicates that the balance check was successful. * **NotEnoughBalance** – Commonly indicates that the card did not have enough balance to pay the amount in the request, or that the currency of the balance on the card did not match the currency of the requested amount. * **Failed** – Indicates that the balance check failed.- Returns:
- resultCode
-
setResultCode
public void setResultCode(BalanceCheckResponse.ResultCodeEnum resultCode)
The result of the cancellation request. Possible values: * **Success** – Indicates that the balance check was successful. * **NotEnoughBalance** – Commonly indicates that the card did not have enough balance to pay the amount in the request, or that the currency of the balance on the card did not match the currency of the requested amount. * **Failed** – Indicates that the balance check failed.- Parameters:
resultCode-
-
transactionLimit
public BalanceCheckResponse transactionLimit(Amount transactionLimit)
transactionLimit- Parameters:
transactionLimit-- Returns:
- the current
BalanceCheckResponseinstance, allowing for method chaining
-
getTransactionLimit
public Amount getTransactionLimit()
transactionLimit- Returns:
- transactionLimit
-
setTransactionLimit
public void setTransactionLimit(Amount transactionLimit)
transactionLimit- Parameters:
transactionLimit-
-
equals
public boolean equals(Object o)
Return true if this BalanceCheckResponse object is equal to o.
-
fromJson
public static BalanceCheckResponse fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of BalanceCheckResponse given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of BalanceCheckResponse
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to BalanceCheckResponse
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of BalanceCheckResponse to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-