Package com.adyen.model.checkout
Class DeliveryMethod
- java.lang.Object
-
- com.adyen.model.checkout.DeliveryMethod
-
public class DeliveryMethod extends Object
DeliveryMethod
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDeliveryMethod.TypeEnumThe type of the delivery method.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_AMOUNTstatic StringJSON_PROPERTY_DESCRIPTIONstatic StringJSON_PROPERTY_REFERENCEstatic StringJSON_PROPERTY_SELECTEDstatic StringJSON_PROPERTY_TYPE
-
Constructor Summary
Constructors Constructor Description DeliveryMethod()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DeliveryMethodamount(Amount amount)amountDeliveryMethoddescription(String description)The name of the delivery method as shown to the shopper.booleanequals(Object o)Return true if this DeliveryMethod object is equal to o.static DeliveryMethodfromJson(String jsonString)Create an instance of DeliveryMethod given an JSON stringAmountgetAmount()amountStringgetDescription()The name of the delivery method as shown to the shopper.StringgetReference()The reference of the delivery method.BooleangetSelected()If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected.DeliveryMethod.TypeEnumgetType()The type of the delivery method.inthashCode()DeliveryMethodreference(String reference)The reference of the delivery method.DeliveryMethodselected(Boolean selected)If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected.voidsetAmount(Amount amount)amountvoidsetDescription(String description)The name of the delivery method as shown to the shopper.voidsetReference(String reference)The reference of the delivery method.voidsetSelected(Boolean selected)If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected.voidsetType(DeliveryMethod.TypeEnum type)The type of the delivery method.StringtoJson()Convert an instance of DeliveryMethod to an JSON stringStringtoString()DeliveryMethodtype(DeliveryMethod.TypeEnum type)The type of the delivery method.
-
-
-
Field Detail
-
JSON_PROPERTY_AMOUNT
public static final String JSON_PROPERTY_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_DESCRIPTION
public static final String JSON_PROPERTY_DESCRIPTION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REFERENCE
public static final String JSON_PROPERTY_REFERENCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SELECTED
public static final String JSON_PROPERTY_SELECTED
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TYPE
public static final String JSON_PROPERTY_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
amount
public DeliveryMethod amount(Amount amount)
amount- Parameters:
amount-- Returns:
- the current
DeliveryMethodinstance, allowing for method chaining
-
getAmount
public Amount getAmount()
amount- Returns:
- amount
-
setAmount
public void setAmount(Amount amount)
amount- Parameters:
amount-
-
description
public DeliveryMethod description(String description)
The name of the delivery method as shown to the shopper.- Parameters:
description-- Returns:
- the current
DeliveryMethodinstance, allowing for method chaining
-
getDescription
public String getDescription()
The name of the delivery method as shown to the shopper.- Returns:
- description
-
setDescription
public void setDescription(String description)
The name of the delivery method as shown to the shopper.- Parameters:
description-
-
reference
public DeliveryMethod reference(String reference)
The reference of the delivery method.- Parameters:
reference-- Returns:
- the current
DeliveryMethodinstance, allowing for method chaining
-
getReference
public String getReference()
The reference of the delivery method.- Returns:
- reference
-
setReference
public void setReference(String reference)
The reference of the delivery method.- Parameters:
reference-
-
selected
public DeliveryMethod selected(Boolean selected)
If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected. Only one delivery method can be selected at a time.- Parameters:
selected-- Returns:
- the current
DeliveryMethodinstance, allowing for method chaining
-
getSelected
public Boolean getSelected()
If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected. Only one delivery method can be selected at a time.- Returns:
- selected
-
setSelected
public void setSelected(Boolean selected)
If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected. Only one delivery method can be selected at a time.- Parameters:
selected-
-
type
public DeliveryMethod type(DeliveryMethod.TypeEnum type)
The type of the delivery method.- Parameters:
type-- Returns:
- the current
DeliveryMethodinstance, allowing for method chaining
-
getType
public DeliveryMethod.TypeEnum getType()
The type of the delivery method.- Returns:
- type
-
setType
public void setType(DeliveryMethod.TypeEnum type)
The type of the delivery method.- Parameters:
type-
-
equals
public boolean equals(Object o)
Return true if this DeliveryMethod object is equal to o.
-
fromJson
public static DeliveryMethod fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of DeliveryMethod given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of DeliveryMethod
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to DeliveryMethod
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of DeliveryMethod to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-