public class Subscriptions extends AbstractApi
client| Constructor and Description |
|---|
Subscriptions(Client client) |
public Subscriptions(Client client)
public SubscriptionResponse createSubscription(String customerId, CreateSubscriptionRequest request)
customerId - the id of the customer for whom to create a subscriptionpublic SubscriptionResponse getSubscription(String customerId, String subscriptionId)
customerId - the id of the customer to which the subscription belongssubscriptionId - the id of the subscription to retrievepublic SubscriptionResponse updateSubscription(String customerId, String subscriptionId, UpdateSubscriptionRequest request)
customerId - the id of the customer to which the subscription belongssubscriptionId - the id of the subscription to updatepublic SubscriptionResponse cancelSubscription(String customerId, String subscriptionId)
customerId - the id of the customer to which the subscription belongssubscriptionId - the id of the subscription to cancelpublic SubscriptionResponse cancelSubscription(String customerId, String subscriptionId, Boolean atPeriodEnd)
customerId - the id of the customer to which the subscription belongssubscriptionId - the id of the subscription to cancelatPeriodEnd - if true, cancellation will be delayed until the end of the current periodpublic ListSubscriptionsResponse listSubscriptions(String customerId, ListSubscriptionsRequest request)
customerId - the id of the customer to which the subscriptions belongCopyright © 2014. All rights reserved.