Package com.adyen.model.management
Class Surcharge
- java.lang.Object
-
- com.adyen.model.management.Surcharge
-
public class Surcharge extends Object
Surcharge
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_ASK_CONFIRMATIONstatic StringJSON_PROPERTY_CONFIGURATIONSstatic StringJSON_PROPERTY_EXCLUDE_GRATUITY_FROM_SURCHARGE
-
Constructor Summary
Constructors Constructor Description Surcharge()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SurchargeaddConfigurationsItem(ModelConfiguration configurationsItem)SurchargeaskConfirmation(Boolean askConfirmation)Show the surcharge details on the terminal, so the shopper can confirm.Surchargeconfigurations(List<ModelConfiguration> configurations)Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies.booleanequals(Object o)Return true if this Surcharge object is equal to o.SurchargeexcludeGratuityFromSurcharge(Boolean excludeGratuityFromSurcharge)Exclude the tip amount from the surcharge calculation.static SurchargefromJson(String jsonString)Create an instance of Surcharge given an JSON stringBooleangetAskConfirmation()Show the surcharge details on the terminal, so the shopper can confirm.List<ModelConfiguration>getConfigurations()Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies.BooleangetExcludeGratuityFromSurcharge()Exclude the tip amount from the surcharge calculation.Map<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.inthashCode()SurchargeincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.voidsetAskConfirmation(Boolean askConfirmation)Show the surcharge details on the terminal, so the shopper can confirm.voidsetConfigurations(List<ModelConfiguration> configurations)Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies.voidsetExcludeGratuityFromSurcharge(Boolean excludeGratuityFromSurcharge)Exclude the tip amount from the surcharge calculation.voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.StringtoJson()Convert an instance of Surcharge to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_ASK_CONFIRMATION
public static final String JSON_PROPERTY_ASK_CONFIRMATION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CONFIGURATIONS
public static final String JSON_PROPERTY_CONFIGURATIONS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_EXCLUDE_GRATUITY_FROM_SURCHARGE
public static final String JSON_PROPERTY_EXCLUDE_GRATUITY_FROM_SURCHARGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
askConfirmation
public Surcharge askConfirmation(Boolean askConfirmation)
Show the surcharge details on the terminal, so the shopper can confirm.- Parameters:
askConfirmation- Show the surcharge details on the terminal, so the shopper can confirm.- Returns:
- the current
Surchargeinstance, allowing for method chaining
-
getAskConfirmation
public Boolean getAskConfirmation()
Show the surcharge details on the terminal, so the shopper can confirm.- Returns:
- askConfirmation Show the surcharge details on the terminal, so the shopper can confirm.
-
setAskConfirmation
public void setAskConfirmation(Boolean askConfirmation)
Show the surcharge details on the terminal, so the shopper can confirm.- Parameters:
askConfirmation- Show the surcharge details on the terminal, so the shopper can confirm.
-
configurations
public Surcharge configurations(List<ModelConfiguration> configurations)
Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies.- Parameters:
configurations- Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies.- Returns:
- the current
Surchargeinstance, allowing for method chaining
-
addConfigurationsItem
public Surcharge addConfigurationsItem(ModelConfiguration configurationsItem)
-
getConfigurations
public List<ModelConfiguration> getConfigurations()
Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies.- Returns:
- configurations Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies.
-
setConfigurations
public void setConfigurations(List<ModelConfiguration> configurations)
Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies.- Parameters:
configurations- Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies.
-
excludeGratuityFromSurcharge
public Surcharge excludeGratuityFromSurcharge(Boolean excludeGratuityFromSurcharge)
Exclude the tip amount from the surcharge calculation.- Parameters:
excludeGratuityFromSurcharge- Exclude the tip amount from the surcharge calculation.- Returns:
- the current
Surchargeinstance, allowing for method chaining
-
getExcludeGratuityFromSurcharge
public Boolean getExcludeGratuityFromSurcharge()
Exclude the tip amount from the surcharge calculation.- Returns:
- excludeGratuityFromSurcharge Exclude the tip amount from the surcharge calculation.
-
setExcludeGratuityFromSurcharge
public void setExcludeGratuityFromSurcharge(Boolean excludeGratuityFromSurcharge)
Exclude the tip amount from the surcharge calculation.- Parameters:
excludeGratuityFromSurcharge- Exclude the tip amount from the surcharge calculation.
-
includeNullValues
public Surcharge includeNullValues(boolean includeNullValues)
Configures whether null values are explicitly serialized in the JSON payload. Default is false.
-
isIncludeNullValues
public boolean isIncludeNullValues()
Returns whether null values are explicitly serialized in the JSON payload.
-
setIncludeNullValues
public void setIncludeNullValues(boolean includeNullValues)
Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
-
equals
public boolean equals(Object o)
Return true if this Surcharge object is equal to o.
-
getExplicitNulls
public Map<String,Object> getExplicitNulls()
Returns a map of properties to be merged into the JSON payload as explicit null values.
-
fromJson
public static Surcharge fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Surcharge given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Surcharge
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Surcharge
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Surcharge to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-