Subscription Class

public class Subscription extends Contract

The subscription resource represents the life cycle of a subscription and includes properties that define the states throughout the subscription life cycle

Constructor Summary

Constructor Description
Subscription()

Initializes a new instance of the subscription class.

Method Summary

Modifier and Type Method and Description
java.lang.Iterable<java.lang.String> getActions()

Gets the available actions for the subscription.

boolean getAutoRenewEnabled()
BillingCycleType getBillingCycle()

Gets the billing cycle type for the subscription.

BillingType getBillingType()
org.joda.time.DateTime getCommitmentEndDate()
ContractType getContractType()

Gets the type of contract

org.joda.time.DateTime getCreationDate()

Gets the date and time when the subscription was created.

org.joda.time.DateTime getEffectiveStartDate()
java.lang.String getEntitlementId()

Gets the entitlement identifier for the subscription.

java.lang.String getFriendlyName()

Gets the friendly name for the subscription.

java.lang.Boolean getHasPurchasableAddOns()

Gets a flag indicating whether or not the subscription has purchasable addons.

java.lang.String getId()

Gets the subscription identifier.

boolean getIsMicrosoftProduct()

Gets a flag indicating whether gets or sets the value indicating that the subscription is a Microsoft product.

boolean getIsTrial()

Gets a flag indicating whether or not the subscription is a trial.

SubscriptionLinks getLinks()
java.lang.String getOfferId()

Gets the offer identifier that created the subscription.

java.lang.String getOfferName()

Get the name of the offer that created the subscription.

java.lang.String getParentSubscriptionId()

Gets the parent subscription identifier for the subscription.

java.lang.String getPartnerId()
java.lang.String getPublisherName()

Gets the name of the publisher.

int getQuantity()

Gets the quantity for the subscription.

java.lang.Iterable<RefundOption> getRefundOptions()

Gets the refund options for this subscription if applicable.

java.lang.String getRenewalTermDuration()

Gets the renewal term duration.

SubscriptionStatus getStatus()
java.lang.Iterable<java.lang.String> getSuspensionReasons()
java.lang.String getTermDuration()

Gets the ISO 8601 representation of the term's duration.

java.lang.String getUnitType()

Gets the units defining the quantity for the subscription.

void setAutoRenewEnabled(boolean value)
void setBillingCycle(BillingCycleType billingCycle)

Sets the billing cycle type for the subscription

void setBillingType(BillingType value)
void setCommitmentEndDate(DateTime value)
void setContractType(ContractType type)
void setCreationDate(DateTime value)

Sets the date and time when the subscription was created.

void setEffectiveStartDate(DateTime value)
void setEntitlementId(String value)

Sets the entitlement identifier for the subscription.

void setFriendlyName(String value)

Sets the friendly name for the subscription.

void setId(String value)

Sets the identifier for the subscription.

void setIsMicrosoftProduct(boolean value)

Sets a flag indicating whether gets or sets the value indicating that the subscription is a Microsoft product.

void setLinks(SubscriptionLinks value)
void setOfferId(String value)

Sets the offer identifier that created the subscription.

void setOfferName(String value)

Sets the name of the offer that created the subscription.

void setParentSubscriptionId(String value)

Sets the parent subscription identifier for the subscription.

void setPartnerId(String value)
void setPublisherName(String value)

Sets the name of the publisher.

void setQuantity(int value)

Sets the quantity for the subscription.

void setRefundOptions(Iterable<RefundOption> value)

Sets the refund options for this subscription if applicable.

void setRenewalTermDuration(String value)

Sets the renewal term duration.

void setStatus(SubscriptionStatus value)
void setSuspensionReasons(Iterable<String> value)
void setTermDuration(String value)

Sets the ISO 8601 representation of the term's duration.

void setUnitType(String value)

Sets the units defining the quantity for the subscription.

Inherited Members

Contract.getContractType() Contract.getOrderId() Contract.setOrderId(String value) ResourceBase.getAttributes() java.lang.Object.clone() java.lang.Object.equals(java.lang.Object) java.lang.Object.finalize() java.lang.Object.getClass() java.lang.Object.hashCode() java.lang.Object.notify() java.lang.Object.notifyAll() java.lang.Object.toString() java.lang.Object.wait() java.lang.Object.wait(long) java.lang.Object.wait(long,int)

Constructor Details

Subscription

public Subscription()

Initializes a new instance of the subscription class.

Method Details

getActions

public Iterable getActions()

Gets the available actions for the subscription.

Returns:

The available actions for the subscription.

getAutoRenewEnabled

public boolean getAutoRenewEnabled()

getBillingCycle

public BillingCycleType getBillingCycle()

Gets the billing cycle type for the subscription.

Returns:

The billing cycle type

getBillingType

public BillingType getBillingType()

getCommitmentEndDate

public DateTime getCommitmentEndDate()

getContractType

public ContractType getContractType()

Gets the type of contract

Overrides:

Subscription.getContractType()

getCreationDate

public DateTime getCreationDate()

Gets the date and time when the subscription was created.

Returns:

The date and time when the subscription was created.

getEffectiveStartDate

public DateTime getEffectiveStartDate()

getEntitlementId

public String getEntitlementId()

Gets the entitlement identifier for the subscription.

Returns:

The entitlement identifier for the subscription.

getFriendlyName

public String getFriendlyName()

Gets the friendly name for the subscription.

Returns:

The friendly name for the subscription.

getHasPurchasableAddOns

public Boolean getHasPurchasableAddOns()

Gets a flag indicating whether or not the subscription has purchasable addons.

Returns:

A flag indicating whether or not the subscription has purchasable addons.

getId

public String getId()

Gets the subscription identifier.

Returns:

The identifier for the subscription.

getIsMicrosoftProduct

public boolean getIsMicrosoftProduct()

Gets a flag indicating whether gets or sets the value indicating that the subscription is a Microsoft product.

Returns:

A flag indicating whether gets or sets the value indicating that the subscription is a Microsoft product.

getIsTrial

public boolean getIsTrial()

Gets a flag indicating whether or not the subscription is a trial.

Returns:

A flag indicating whether or not the subscription is a trial.

getLinks

public SubscriptionLinks getLinks()

getOfferId

public String getOfferId()

Gets the offer identifier that created the subscription.

Returns:

The offer identifier that created the subscription.

getOfferName

public String getOfferName()

Get the name of the offer that created the subscription.

Returns:

The name of the offer that created the subscription.

getParentSubscriptionId

public String getParentSubscriptionId()

Gets the parent subscription identifier for the subscription.

Returns:

The parent subscription identifier for the subscription.

getPartnerId

public String getPartnerId()

getPublisherName

public String getPublisherName()

Gets the name of the publisher.

Returns:

The name of the publisher.

getQuantity

public int getQuantity()

Gets the quantity for the subscription. In the case of seat based billing, this value is the seat count.

Returns:

The quantity for the subscription.

getRefundOptions

public Iterable getRefundOptions()

Gets the refund options for this subscription if applicable.

Returns:

The refund options for this subscription if applicable.

getRenewalTermDuration

public String getRenewalTermDuration()

Gets the renewal term duration.

Returns:

The renewal term duration.

getStatus

public SubscriptionStatus getStatus()

getSuspensionReasons

public Iterable getSuspensionReasons()

getTermDuration

public String getTermDuration()

Gets the ISO 8601 representation of the term's duration. The current supported values are P1M (1 month), P1Y (1 year) and P3Y (3 years).

Returns:

The ISO 8601 representation of the term's duration.

getUnitType

public String getUnitType()

Gets the units defining the quantity for the subscription.

Returns:

The units defining the quantity for the subscription.

setAutoRenewEnabled

public void setAutoRenewEnabled(boolean value)

Parameters:

value

setBillingCycle

public void setBillingCycle(BillingCycleType billingCycle)

Sets the billing cycle type for the subscription

Parameters:

billingCycle - The billing cycle type for the subscription

setBillingType

public void setBillingType(BillingType value)

Parameters:

value

setCommitmentEndDate

public void setCommitmentEndDate(DateTime value)

Parameters:

value

setContractType

public void setContractType(ContractType type)

Parameters:

type

setCreationDate

public void setCreationDate(DateTime value)

Sets the date and time when the subscription was created.

Parameters:

value - The date and time when the subscription was created.

setEffectiveStartDate

public void setEffectiveStartDate(DateTime value)

Parameters:

value

setEntitlementId

public void setEntitlementId(String value)

Sets the entitlement identifier for the subscription.

Parameters:

value - The entitlement identifier for the subscription.

setFriendlyName

public void setFriendlyName(String value)

Sets the friendly name for the subscription.

Parameters:

value - The friendly name for the subscription.

setId

public void setId(String value)

Sets the identifier for the subscription.

Parameters:

value - The identifier for the subscription.

setIsMicrosoftProduct

public void setIsMicrosoftProduct(boolean value)

Sets a flag indicating whether gets or sets the value indicating that the subscription is a Microsoft product.

Parameters:

value - A flag indicating whether gets or sets the value indicating that the subscription is a Microsoft product.

setLinks

public void setLinks(SubscriptionLinks value)

Parameters:

value

setOfferId

public void setOfferId(String value)

Sets the offer identifier that created the subscription.

Parameters:

value - The offer identifier that created the subscription.

setOfferName

public void setOfferName(String value)

Sets the name of the offer that created the subscription.

Parameters:

value - The name of the offer that created the subscription.

setParentSubscriptionId

public void setParentSubscriptionId(String value)

Sets the parent subscription identifier for the subscription.

Parameters:

value - The parent subscription identifier for the subscription.

setPartnerId

public void setPartnerId(String value)

Parameters:

value

setPublisherName

public void setPublisherName(String value)

Sets the name of the publisher.

Parameters:

value - The name of the publisher.

setQuantity

public void setQuantity(int value)

Sets the quantity for the subscription. In the case of seat based billing, this value is the seat count.

Parameters:

value - The quantity for the subscription.

setRefundOptions

public void setRefundOptions(Iterable value)

Sets the refund options for this subscription if applicable.

Parameters:

value - The refund options for this subscription if applicable.

setRenewalTermDuration

public void setRenewalTermDuration(String value)

Sets the renewal term duration.

Parameters:

value - The renewal term duration.

setStatus

public void setStatus(SubscriptionStatus value)

Parameters:

value

setSuspensionReasons

public void setSuspensionReasons(Iterable value)

Parameters:

value

setTermDuration

public void setTermDuration(String value)

Sets the ISO 8601 representation of the term's duration. The current supported values are P1M (1 month), P1Y (1 year) and P3Y (3 years).

Parameters:

value - The ISO 8601 representation of the term's duration.

setUnitType

public void setUnitType(String value)

Sets the units defining the quantity for the subscription.

Parameters:

value - The units defining the quantity for the subscription.

Applies to