Package com.xero.models.appstore
Class Subscription
- java.lang.Object
-
- com.xero.models.appstore.Subscription
-
public class Subscription extends Object
Subscription
-
-
Constructor Summary
Constructors Constructor Description Subscription()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubscriptionaddPlansItem(Plan plansItem)List of plans for the subscription.SubscriptioncurrentPeriodEnd(org.threeten.bp.OffsetDateTime currentPeriodEnd)End of the current period that the subscription has been invoiced for.SubscriptionendDate(org.threeten.bp.OffsetDateTime endDate)If the subscription has been canceled, this is the date when the subscription ends.booleanequals(Object o)org.threeten.bp.OffsetDateTimegetCurrentPeriodEnd()End of the current period that the subscription has been invoiced for.org.threeten.bp.OffsetDateTimegetEndDate()If the subscription has been canceled, this is the date when the subscription ends.UUIDgetId()The unique identifier of the subscriptionUUIDgetOrganisationId()The Xero generated unique identifier for the organisationList<Plan>getPlans()List of plans for the subscription.org.threeten.bp.OffsetDateTimegetStartDate()Date when the subscription was first created.StringgetStatus()Status of the subscription.BooleangetTestMode()Boolean used to indicate if the subscription is in test modeinthashCode()Subscriptionid(UUID id)The unique identifier of the subscriptionSubscriptionorganisationId(UUID organisationId)The Xero generated unique identifier for the organisationSubscriptionplans(List<Plan> plans)List of plans for the subscription.voidsetCurrentPeriodEnd(org.threeten.bp.OffsetDateTime currentPeriodEnd)End of the current period that the subscription has been invoiced for.voidsetEndDate(org.threeten.bp.OffsetDateTime endDate)If the subscription has been canceled, this is the date when the subscription ends.voidsetId(UUID id)The unique identifier of the subscriptionvoidsetOrganisationId(UUID organisationId)The Xero generated unique identifier for the organisationvoidsetPlans(List<Plan> plans)List of plans for the subscription.voidsetStartDate(org.threeten.bp.OffsetDateTime startDate)Date when the subscription was first created.voidsetStatus(String status)Status of the subscription.voidsetTestMode(Boolean testMode)Boolean used to indicate if the subscription is in test modeSubscriptionstartDate(org.threeten.bp.OffsetDateTime startDate)Date when the subscription was first created.Subscriptionstatus(String status)Status of the subscription.SubscriptiontestMode(Boolean testMode)Boolean used to indicate if the subscription is in test modeStringtoString()
-
-
-
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
-
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
-
-