Class LoyaltyMembershipCreationRequest


  • public class LoyaltyMembershipCreationRequest
    extends LoyaltyMembershipBasicPayload
    Represents the request data required for creating a loyalty membership. This includes loyalty card data, member relationship, password, and tags.
    Author:
    gkonomis
    • Constructor Detail

      • LoyaltyMembershipCreationRequest

        public LoyaltyMembershipCreationRequest()
    • Method Detail

      • isValidCardAssignment

        @AssertTrue(message="Cannot assign card using both preallocated card and digital card data")
        public boolean isValidCardAssignment()
        Validates that a loyalty card is not assigned using both a preallocated card and a digital card data simultaneously.
        Returns:
        true if only one of the card assignments (preallocated or digital) is used, false otherwise.
      • getLoyaltyCardData

        public DigitalCardCreationPayload getLoyaltyCardData()
        Gets the loyalty card data.
        Returns:
        the loyalty card data.
      • setLoyaltyCardData

        public void setLoyaltyCardData​(DigitalCardCreationPayload loyaltyCardData)
        Sets the loyalty card data.
        Parameters:
        loyaltyCardData - the loyalty card data to set.
      • getLoyaltyMemberRelationship

        public LoyaltyMemberRelationshipPayload getLoyaltyMemberRelationship()
        Gets the loyalty member relationship data.
        Returns:
        the loyalty member relationship data.
      • setLoyaltyMemberRelationship

        public void setLoyaltyMemberRelationship​(LoyaltyMemberRelationshipPayload loyaltyMemberRelationship)
        Sets the loyalty member relationship data.
        Parameters:
        loyaltyMemberRelationship - the loyalty member relationship data to set.
      • getTagList

        public List<AssignTagBasicPayload> getTagList()
        Gets the list of tags associated with the loyalty membership.
        Returns:
        the list of tags.
      • addTag

        public void addTag​(AssignTagBasicPayload tag)
        Adds a tag to the loyalty membership's tag list.
        Parameters:
        tag - the tag to add.
      • getPreallocatedCard

        public String getPreallocatedCard()
        Gets the preallocated card associated with the loyalty membership.
        Returns:
        the preallocated card.
      • setPreallocatedCard

        public void setPreallocatedCard​(String preallocatedCard)
        Sets the preallocated card for the loyalty membership.
        Parameters:
        preallocatedCard - the preallocated card to set.
      • getPasswordData

        public PasswordPayload getPasswordData()
        Gets the password data associated with the loyalty membership.
        Returns:
        the password data.
      • setPasswordData

        public void setPasswordData​(PasswordPayload passwordData)
        Sets the password data for the loyalty membership.
        Parameters:
        passwordData - the password data to set.
      • toString

        public String toString()
        Provides a string representation of the LoyaltyMembershipCreationRequest object.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the loyalty membership creation request.