public class Subscription extends LineItem
| Modifier and Type | Field and Description |
|---|---|
protected static String |
SUBSCRIPTIONS_PATH |
LINE_ITEM_PATH| Constructor and Description |
|---|
Subscription() |
| Modifier and Type | Method and Description |
|---|---|
static ApruveResponse<SubscriptionCancelResponse> |
cancel(String subscriptionId)
Cancels the Subscription with the given ID.
|
static ApruveResponse<Subscription> |
get(String suscriptionId)
Get the Subscription with the given ID
|
Date |
getCanceledAt() |
static String |
getCancelPath(String subscriptionId) |
Date |
getEndAt() |
Date |
getLastChargeAt() |
Date |
getNextChargeAt() |
Date |
getStartAt() |
static String |
getSubscriptionsPath() |
void |
setCanceledAt(Date canceledAt) |
void |
setEndAt(Date endAt) |
void |
setLastChargeAt(Date lastChargeAt) |
void |
setNextChargeAt(Date nextChargeAt) |
void |
setStartAt(Date startAt) |
protected String |
subscriptionValues() |
String |
toJson() |
String |
toString() |
ApruveResponse<SubscriptionUpdateResponse> |
update()
Updates the Subscription state at Apruve to match the current object
state.
|
get, getAll, getAmountCents, getApiUrl, getDescription, getId, getLineItemsPath, getPlanCode, getPriceEachCents, getQuantity, getSku, getSubscriptionUrl, getTitle, getVariantInfo, getVendor, getViewProductUrl, setAmountCents, setApiUrl, setDescription, setId, setPlanCode, setPriceEachCents, setQuantity, setSku, setSubscriptionUrl, setTitle, setVariantInfo, setVendor, setViewProductUrl, toValueStringprotected static String SUBSCRIPTIONS_PATH
protected String subscriptionValues()
subscriptionValues in class LineItempublic static ApruveResponse<Subscription> get(String suscriptionId)
suscriptionId - The ID of the Subscription to getpublic ApruveResponse<SubscriptionUpdateResponse> update()
Only the following fields are updated by this API call, and then only if the Subscription has not been canceled (i.e., canceledAt is null):
public static ApruveResponse<SubscriptionCancelResponse> cancel(String subscriptionId)
public Date getStartAt()
public void setStartAt(Date startAt)
public Date getNextChargeAt()
public void setNextChargeAt(Date nextChargeAt)
public Date getLastChargeAt()
public void setLastChargeAt(Date lastChargeAt)
public Date getEndAt()
public void setEndAt(Date endAt)
public Date getCanceledAt()
public void setCanceledAt(Date canceledAt)
public static String getSubscriptionsPath()
Copyright © 2014. All rights reserved.