Class PurchaseInfo


  • public class PurchaseInfo
    extends Object
    PurchaseInfo
    • Constructor Detail

      • PurchaseInfo

        public PurchaseInfo()
    • Method Detail

      • date

        public PurchaseInfo date​(String date)
        Date of the purchase.
        Parameters:
        date -
        Returns:
        the current PurchaseInfo instance, allowing for method chaining
      • getDate

        public String getDate()
        Date of the purchase.
        Returns:
        date
      • setDate

        public void setDate​(String date)
        Date of the purchase.
        Parameters:
        date -
      • merchantName

        public PurchaseInfo merchantName​(String merchantName)
        Name of the merchant.
        Parameters:
        merchantName -
        Returns:
        the current PurchaseInfo instance, allowing for method chaining
      • getMerchantName

        public String getMerchantName()
        Name of the merchant.
        Returns:
        merchantName
      • setMerchantName

        public void setMerchantName​(String merchantName)
        Name of the merchant.
        Parameters:
        merchantName -
      • originalAmount

        public PurchaseInfo originalAmount​(Amount originalAmount)
        originalAmount
        Parameters:
        originalAmount -
        Returns:
        the current PurchaseInfo instance, allowing for method chaining
      • getOriginalAmount

        public Amount getOriginalAmount()
        originalAmount
        Returns:
        originalAmount
      • setOriginalAmount

        public void setOriginalAmount​(Amount originalAmount)
        originalAmount
        Parameters:
        originalAmount -
      • equals

        public boolean equals​(Object o)
        Return true if this PurchaseInfo object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • fromJson

        public static PurchaseInfo fromJson​(String jsonString)
                                     throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of PurchaseInfo given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of PurchaseInfo
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to PurchaseInfo
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of PurchaseInfo to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException