Class DigitalCardCreationPayload
- java.lang.Object
-
- com.inteliqua.rest.customer.payload.loyalty.card.request.DigitalCardCreationPayload
-
public class DigitalCardCreationPayload extends Object
Represents the payload for creating a digital loyalty card. This class contains details about the card number, type, and optional card properties. If a card number is not provided, a new one will be generated automatically.The type of the card must be valid, either "Permanent" or "Temporary".
- Author:
- nikritikos
-
-
Constructor Summary
Constructors Constructor Description DigitalCardCreationPayload()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCardNumber()Gets the loyalty card number.DigitalCardPropertiesPayloadgetCardProperties()Gets the loyalty card properties.StringgetType()Gets the type of the loyalty card.booleanisCardTypeValid()Validates whether the provided card type is supported.voidsetCardNumber(String cardNumber)Sets the loyalty card number.voidsetCardProperties(DigitalCardPropertiesPayload cardProperties)Sets the loyalty card properties.voidsetType(String type)Sets the type of the loyalty card.StringtoString()Returns a string representation of the digital card creation payload.
-
-
-
Method Detail
-
isCardTypeValid
@AssertTrue(message="Unsupported card type") public boolean isCardTypeValid()
Validates whether the provided card type is supported.- Returns:
trueif the card type is valid,falseotherwise.
-
getCardNumber
public String getCardNumber()
Gets the loyalty card number.- Returns:
- the card number.
-
setCardNumber
public void setCardNumber(String cardNumber)
Sets the loyalty card number.- Parameters:
cardNumber- the card number to set.
-
getType
public String getType()
Gets the type of the loyalty card.- Returns:
- the card type.
-
setType
public void setType(String type)
Sets the type of the loyalty card.- Parameters:
type- the card type to set.
-
getCardProperties
public DigitalCardPropertiesPayload getCardProperties()
Gets the loyalty card properties.- Returns:
- the card properties.
-
setCardProperties
public void setCardProperties(DigitalCardPropertiesPayload cardProperties)
Sets the loyalty card properties.- Parameters:
cardProperties- the card properties to set.
-
-