Class Discount

    • Constructor Summary

      Constructors 
      Constructor Description
      Discount()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean canEqual​(java.lang.Object other)  
      boolean equals​(java.lang.Object o)  
      java.lang.String getCheckoutSession()
      The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode.
      Coupon getCoupon()
      A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer.
      java.lang.String getCustomer()
      Get ID of expandable customer object.
      Customer getCustomerObject()
      Get expanded customer.
      java.lang.Boolean getDeleted()
      Always true for a deleted object.
      java.lang.Long getEnd()
      If the coupon has a duration of repeating, the date that this discount will end.
      java.lang.String getId()
      The ID of the discount object.
      java.lang.String getInvoice()
      The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
      java.lang.String getInvoiceItem()
      The invoice item id (or invoice line item id for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
      java.lang.String getObject()
      String representing the object's type.
      java.lang.String getPromotionCode()
      Get ID of expandable promotionCode object.
      PromotionCode getPromotionCodeObject()
      Get expanded promotionCode.
      java.lang.Long getStart()
      Date that the coupon was applied.
      java.lang.String getSubscription()
      The subscription that this coupon is applied to, if it is applied to a particular subscription.
      int hashCode()  
      void setCheckoutSession​(java.lang.String checkoutSession)
      The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode.
      void setCoupon​(Coupon coupon)
      A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer.
      void setCustomer​(java.lang.String id)  
      void setCustomerObject​(Customer expandableObject)  
      void setDeleted​(java.lang.Boolean deleted)
      Always true for a deleted object.
      void setEnd​(java.lang.Long end)
      If the coupon has a duration of repeating, the date that this discount will end.
      void setId​(java.lang.String id)
      The ID of the discount object.
      void setInvoice​(java.lang.String invoice)
      The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
      void setInvoiceItem​(java.lang.String invoiceItem)
      The invoice item id (or invoice line item id for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
      void setObject​(java.lang.String object)
      String representing the object's type.
      void setPromotionCode​(java.lang.String id)  
      void setPromotionCodeObject​(PromotionCode expandableObject)  
      void setStart​(java.lang.Long start)
      Date that the coupon was applied.
      void setSubscription​(java.lang.String subscription)
      The subscription that this coupon is applied to, if it is applied to a particular subscription.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Discount

        public Discount()
    • Method Detail

      • getCustomer

        public java.lang.String getCustomer()
        Get ID of expandable customer object.
      • setCustomer

        public void setCustomer​(java.lang.String id)
      • getCustomerObject

        public Customer getCustomerObject()
        Get expanded customer.
      • setCustomerObject

        public void setCustomerObject​(Customer expandableObject)
      • getPromotionCode

        public java.lang.String getPromotionCode()
        Get ID of expandable promotionCode object.
      • setPromotionCode

        public void setPromotionCode​(java.lang.String id)
      • getPromotionCodeObject

        public PromotionCode getPromotionCodeObject()
        Get expanded promotionCode.
      • setPromotionCodeObject

        public void setPromotionCodeObject​(PromotionCode expandableObject)
      • getCheckoutSession

        public java.lang.String getCheckoutSession()
        The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
      • getCoupon

        public Coupon getCoupon()
        A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to invoices or orders. Coupons do not work with conventional one-off charges.
      • getDeleted

        public java.lang.Boolean getDeleted()
        Always true for a deleted object.
      • getEnd

        public java.lang.Long getEnd()
        If the coupon has a duration of repeating, the date that this discount will end. If the coupon has a duration of once or forever, this attribute will be null.
      • getInvoice

        public java.lang.String getInvoice()
        The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
      • getInvoiceItem

        public java.lang.String getInvoiceItem()
        The invoice item id (or invoice line item id for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
      • getObject

        public java.lang.String getObject()
        String representing the object's type. Objects of the same type share the same value.

        Equal to discount.

      • getStart

        public java.lang.Long getStart()
        Date that the coupon was applied.
      • getSubscription

        public java.lang.String getSubscription()
        The subscription that this coupon is applied to, if it is applied to a particular subscription.
      • setCheckoutSession

        public void setCheckoutSession​(java.lang.String checkoutSession)
        The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
      • setCoupon

        public void setCoupon​(Coupon coupon)
        A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to invoices or orders. Coupons do not work with conventional one-off charges.
      • setDeleted

        public void setDeleted​(java.lang.Boolean deleted)
        Always true for a deleted object.
      • setEnd

        public void setEnd​(java.lang.Long end)
        If the coupon has a duration of repeating, the date that this discount will end. If the coupon has a duration of once or forever, this attribute will be null.
      • setId

        public void setId​(java.lang.String id)
        The ID of the discount object. Discounts cannot be fetched by ID. Use expand[]=discounts in API calls to expand discount IDs in an array.
      • setInvoice

        public void setInvoice​(java.lang.String invoice)
        The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
      • setInvoiceItem

        public void setInvoiceItem​(java.lang.String invoiceItem)
        The invoice item id (or invoice line item id for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
      • setObject

        public void setObject​(java.lang.String object)
        String representing the object's type. Objects of the same type share the same value.

        Equal to discount.

      • setStart

        public void setStart​(java.lang.Long start)
        Date that the coupon was applied.
      • setSubscription

        public void setSubscription​(java.lang.String subscription)
        The subscription that this coupon is applied to, if it is applied to a particular subscription.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getId

        public java.lang.String getId()
        The ID of the discount object. Discounts cannot be fetched by ID. Use expand[]=discounts in API calls to expand discount IDs in an array.
        Specified by:
        getId in interface HasId