Class TransactionAttributes


  • public class TransactionAttributes
    extends java.lang.Object
    Class encaspulating the parameters of a given Product CommerceEvent.
    • Constructor Detail

      • TransactionAttributes

        public TransactionAttributes​(@NonNull
                                     TransactionAttributes transactionAttributes)
      • TransactionAttributes

        public TransactionAttributes()
        Create a TransactionAttributes object to be associated with a CommerceEvent. Note that transaction ID is required for Product.PURCHASE and Product.REFUND events.
      • TransactionAttributes

        public TransactionAttributes​(@NonNull
                                     java.lang.String transactionId)
        Create a TransactionAttributes object to be associated with a CommerceEvent. Note that transaction ID is required for Product.PURCHASE and Product.REFUND events.
        Parameters:
        transactionId - a unique ID for this transaction
    • Method Detail

      • getId

        @NonNull
        public java.lang.String getId()
      • getCouponCode

        @Nullable
        public java.lang.String getCouponCode()
      • setCouponCode

        @NonNull
        public TransactionAttributes setCouponCode​(@Nullable
                                                   java.lang.String couponCode)
      • getTax

        @Nullable
        public java.lang.Double getTax()
      • getShipping

        @Nullable
        public java.lang.Double getShipping()
      • setShipping

        @NonNull
        public TransactionAttributes setShipping​(@Nullable
                                                 java.lang.Double shipping)
      • getRevenue

        @Nullable
        public java.lang.Double getRevenue()
      • getAffiliation

        @Nullable
        public java.lang.String getAffiliation()
      • setAffiliation

        @NonNull
        public TransactionAttributes setAffiliation​(@Nullable
                                                    java.lang.String affiliation)