Class Subscription


  • public class Subscription
    extends Object
    Subscription
    • Constructor Detail

      • Subscription

        public Subscription()
    • Method Detail

      • currentPeriodEnd

        public Subscription currentPeriodEnd​(org.threeten.bp.OffsetDateTime currentPeriodEnd)
        End of the current period that the subscription has been invoiced for.
        Parameters:
        currentPeriodEnd - OffsetDateTime
        Returns:
        Subscription
      • getCurrentPeriodEnd

        public org.threeten.bp.OffsetDateTime getCurrentPeriodEnd()
        End of the current period that the subscription has been invoiced for.
        Returns:
        currentPeriodEnd
      • setCurrentPeriodEnd

        public void setCurrentPeriodEnd​(org.threeten.bp.OffsetDateTime currentPeriodEnd)
        End of the current period that the subscription has been invoiced for.
        Parameters:
        currentPeriodEnd - OffsetDateTime
      • endDate

        public Subscription endDate​(org.threeten.bp.OffsetDateTime endDate)
        If the subscription has been canceled, this is the date when the subscription ends. If null, the subscription is active and has not been cancelled
        Parameters:
        endDate - OffsetDateTime
        Returns:
        Subscription
      • getEndDate

        public org.threeten.bp.OffsetDateTime getEndDate()
        If the subscription has been canceled, this is the date when the subscription ends. If null, the subscription is active and has not been cancelled
        Returns:
        endDate
      • setEndDate

        public void setEndDate​(org.threeten.bp.OffsetDateTime endDate)
        If the subscription has been canceled, this is the date when the subscription ends. If null, the subscription is active and has not been cancelled
        Parameters:
        endDate - OffsetDateTime
      • id

        public Subscription id​(UUID id)
        The unique identifier of the subscription
        Parameters:
        id - UUID
        Returns:
        Subscription
      • getId

        public UUID getId()
        The unique identifier of the subscription
        Returns:
        id
      • setId

        public void setId​(UUID id)
        The unique identifier of the subscription
        Parameters:
        id - UUID
      • organisationId

        public Subscription organisationId​(UUID organisationId)
        The Xero generated unique identifier for the organisation
        Parameters:
        organisationId - UUID
        Returns:
        Subscription
      • getOrganisationId

        public UUID getOrganisationId()
        The Xero generated unique identifier for the organisation
        Returns:
        organisationId
      • setOrganisationId

        public void setOrganisationId​(UUID organisationId)
        The Xero generated unique identifier for the organisation
        Parameters:
        organisationId - UUID
      • plans

        public Subscription plans​(List<Plan> plans)
        List of plans for the subscription.
        Parameters:
        plans - List<Plan>
        Returns:
        Subscription
      • addPlansItem

        public Subscription addPlansItem​(Plan plansItem)
        List of plans for the subscription.
        Parameters:
        plansItem - Plan
        Returns:
        Subscription
      • getPlans

        public List<Plan> getPlans()
        List of plans for the subscription.
        Returns:
        plans
      • setPlans

        public void setPlans​(List<Plan> plans)
        List of plans for the subscription.
        Parameters:
        plans - List<Plan>
      • startDate

        public Subscription startDate​(org.threeten.bp.OffsetDateTime startDate)
        Date when the subscription was first created.
        Parameters:
        startDate - OffsetDateTime
        Returns:
        Subscription
      • getStartDate

        public org.threeten.bp.OffsetDateTime getStartDate()
        Date when the subscription was first created.
        Returns:
        startDate
      • setStartDate

        public void setStartDate​(org.threeten.bp.OffsetDateTime startDate)
        Date when the subscription was first created.
        Parameters:
        startDate - OffsetDateTime
      • status

        public Subscription status​(String status)
        Status of the subscription. Available statuses are ACTIVE, CANCELED, and PAST_DUE.
        Parameters:
        status - String
        Returns:
        Subscription
      • getStatus

        public String getStatus()
        Status of the subscription. Available statuses are ACTIVE, CANCELED, and PAST_DUE.
        Returns:
        status
      • setStatus

        public void setStatus​(String status)
        Status of the subscription. Available statuses are ACTIVE, CANCELED, and PAST_DUE.
        Parameters:
        status - String
      • testMode

        public Subscription testMode​(Boolean testMode)
        Boolean used to indicate if the subscription is in test mode
        Parameters:
        testMode - Boolean
        Returns:
        Subscription
      • getTestMode

        public Boolean getTestMode()
        Boolean used to indicate if the subscription is in test mode
        Returns:
        testMode
      • setTestMode

        public void setTestMode​(Boolean testMode)
        Boolean used to indicate if the subscription is in test mode
        Parameters:
        testMode - Boolean
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object