Class GiftcardFields

  • All Implemented Interfaces:
    android.os.Parcelable

    public class GiftcardFields
    extends BaseParams
    Class for setting the field parameters of Giftcards API. All Nullable parameters means you can remove the parameter by passing a null value.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  GiftcardFields.Builder
      Builder class for GiftcardFields
      • Nested classes/interfaces inherited from interface android.os.Parcelable

        android.os.Parcelable.ClassLoaderCreator<T extends java.lang.Object>, android.os.Parcelable.Creator<T extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static android.os.Parcelable.Creator<GiftcardFields> CREATOR  
      • Fields inherited from interface android.os.Parcelable

        CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
    • Field Detail

      • CREATOR

        public static final android.os.Parcelable.Creator<GiftcardFields> CREATOR
    • Constructor Detail

      • GiftcardFields

        public GiftcardFields()
      • GiftcardFields

        public GiftcardFields​(android.os.Parcel source)
    • Method Detail

      • setIsAutoReload

        public void setIsAutoReload​(@Nullable
                                    java.lang.Boolean isAutoReload)
        Set the flag to indicate if auto-reload is on or off
        Parameters:
        isAutoReload - true to turn on auto reload
      • isAutoReload

        @Nullable
        public java.lang.Boolean isAutoReload()
        Returns the status of auto-reload
        Returns:
        status of auto-reload
      • getPaymentMethodNonce

        @Nullable
        public java.lang.String getPaymentMethodNonce()
        Returns the payment method nonce from Braintree
        Returns:
        payment method nonce from Braintree
      • setPaymentMethodNonce

        public void setPaymentMethodNonce​(@Nullable
                                          java.lang.String paymentMethodNonce)
        Set the payment method nonce from Braintree
        Parameters:
        paymentMethodNonce - payment method nonce from Braintree
      • getAmount

        @Nullable
        public java.lang.Float getAmount()
        Returns the amount to use for purchase
        Returns:
        value store in GiftcardApiConstants.AMOUNT
      • getPin

        @Nullable
        public java.lang.String getPin()
        Returns the PIN of gift card
        Returns:
        value store in GiftcardApiConstants.PIN
      • setPin

        public void setPin​(@Nullable
                           java.lang.String pin)
        Set the PIN of gift card
        Parameters:
        pin - text for pin
      • getReloadThreshold

        @Nullable
        public java.lang.String getReloadThreshold()
        Returns the amount threshold to trigger auto-reload
        Returns:
        amount threshold to trigger auto-reload
      • setReloadThreshold

        public void setReloadThreshold​(@Nullable
                                       java.lang.String reloadThreshold)
        Sets the amount threshold to trigger auto-reload
        Parameters:
        reloadThreshold - amount threshold to trigger auto-reload
      • getReloadAmount

        @Nullable
        public java.lang.String getReloadAmount()
        Returns the amount to add during auto-reload
        Returns:
        amount to add during auto-reload
      • setReloadAmount

        public void setReloadAmount​(@Nullable
                                    java.lang.String reloadAmount)
        Set the amount to add during auto-reload
        Parameters:
        reloadAmount - amount to add during auto-reload
      • setGiftcardClass

        public void setGiftcardClass​(java.lang.String giftcardClass)
        Set the gift card class to be used for purchase
        Parameters:
        giftcardClass - internal name of the giftcard class
      • getGiftcardClass

        public java.lang.String getGiftcardClass()
        Returns the internal name of the gift card class used for purchase
        Returns:
        internal name of the gift card class