public class SubscriptionHandler extends AbstractHandler
| Constructor and Description |
|---|
SubscriptionHandler(String baseUrl) |
| Modifier and Type | Method and Description |
|---|---|
SubscriptionResponse |
cancelSubscription(String customerId,
String subscriptionId)
Cancel a subscription
|
SubscriptionResponse |
cancelSubscription(String customerId,
String subscriptionId,
QueryParams params)
Cancel a subscription
|
SubscriptionResponse |
createSubscription(String customerId,
SubscriptionRequest body)
With subscriptions, you can schedule recurring payments to take place at regular intervals.
|
SubscriptionResponse |
createSubscription(String customerId,
SubscriptionRequest body,
QueryParams params)
With subscriptions, you can schedule recurring payments to take place at regular intervals.
|
SubscriptionResponse |
getSubscription(String customerId,
String subscriptionId)
Retrieve a subscription by its ID and its customer’s ID.
|
SubscriptionResponse |
getSubscription(String customerId,
String subscriptionId,
QueryParams params)
Retrieve a subscription by its ID and its customer’s ID.
|
Pagination<PaymentListResponse> |
listSubscriptionPayments(String customerId,
String subscriptionId)
Retrieve all payments of a specific subscriptions of a customer.
|
Pagination<PaymentListResponse> |
listSubscriptionPayments(String customerId,
String subscriptionId,
QueryParams params)
Retrieve all payments of a specific subscriptions of a customer.
|
Pagination<SubscriptionListResponse> |
listSubscriptions(String customerId)
Retrieve all subscriptions of a customer.
|
Pagination<SubscriptionListResponse> |
listSubscriptions(String customerId,
QueryParams params)
Retrieve all subscriptions of a customer.
|
SubscriptionResponse |
updateSubscription(String customerId,
String subscriptionId,
UpdateSubscriptionRequest body)
Update a subscription.
|
SubscriptionResponse |
updateSubscription(String customerId,
String subscriptionId,
UpdateSubscriptionRequest body,
QueryParams params)
Update a subscription.
|
delete, delete, delete, get, get, patch, patch, post, post, postWithoutBody, validateResponsepublic SubscriptionHandler(String baseUrl)
public SubscriptionResponse createSubscription(String customerId, SubscriptionRequest body) throws MollieException
customerId - a customer idbody - SubscriptionRequest objectMollieException - when something went wrongpublic SubscriptionResponse createSubscription(String customerId, SubscriptionRequest body, QueryParams params) throws MollieException
customerId - a customer idbody - SubscriptionRequest objectparams - A map of query parametersMollieException - when something went wrongpublic SubscriptionResponse getSubscription(String customerId, String subscriptionId) throws MollieException
customerId - a customer idsubscriptionId - a subscription idMollieException - when something went wrongpublic SubscriptionResponse getSubscription(String customerId, String subscriptionId, QueryParams params) throws MollieException
customerId - a customer idsubscriptionId - a subscription idparams - A map of query parametersMollieException - when something went wrongpublic SubscriptionResponse cancelSubscription(String customerId, String subscriptionId) throws MollieException
customerId - a customer idsubscriptionId - a subscription idMollieException - when something went wrongpublic SubscriptionResponse cancelSubscription(String customerId, String subscriptionId, QueryParams params) throws MollieException
customerId - a customer idsubscriptionId - a subscription idparams - A map of query parametersMollieException - when something went wrongpublic Pagination<SubscriptionListResponse> listSubscriptions(String customerId) throws MollieException
customerId - a customer idMollieException - when something went wrongpublic Pagination<SubscriptionListResponse> listSubscriptions(String customerId, QueryParams params) throws MollieException
customerId - a customer idparams - A map of query parametersMollieException - when something went wrongpublic Pagination<PaymentListResponse> listSubscriptionPayments(String customerId, String subscriptionId) throws MollieException
customerId - a customer idsubscriptionId - a subscription idMollieException - when something went wrongpublic Pagination<PaymentListResponse> listSubscriptionPayments(String customerId, String subscriptionId, QueryParams params) throws MollieException
customerId - a customer idsubscriptionId - a subscription idparams - A map of query parametersMollieException - when something went wrongpublic SubscriptionResponse updateSubscription(String customerId, String subscriptionId, UpdateSubscriptionRequest body) throws MollieException
You cannot update a canceled subscription.
customerId - a customer idsubscriptionId - a subscription idbody - UpdateSubscriptionRequest objectMollieException - when something went wrongpublic SubscriptionResponse updateSubscription(String customerId, String subscriptionId, UpdateSubscriptionRequest body, QueryParams params) throws MollieException
You cannot update a canceled subscription.
customerId - a customer idsubscriptionId - a subscription idbody - UpdateSubscriptionRequest objectparams - A map of query parametersMollieException - when something went wrongCopyright © 2020. All rights reserved.