public interface SubscriptionFacade
| Modifier and Type | Method and Description |
|---|---|
CCPaymentInfoData |
changePaymentMethod(CCPaymentInfoData paymentInfo,
java.lang.String action,
boolean propagate,
java.util.Map<java.lang.String,java.lang.String> parameters)
Changes an existing payment method.
|
SubscriptionData |
changeSubscriptionState(java.lang.String subscriptionId,
java.lang.String newStatus,
java.util.Map<java.lang.String,java.lang.String> parameters)
Updates the state of an existing subscription.
|
CCPaymentInfoData |
createPaymentSubscription(java.util.Map<java.lang.String,java.lang.String> paymentParameters)
Creates a payment subscription on the hybris side.
|
SubscriptionPaymentData |
createSubscriptions(OrderData order,
java.util.Map<java.lang.String,java.lang.String> parameters)
Creates subscriptions for the given order and current user.
|
SubscriptionData |
extendSubscriptionTermDuration(java.lang.String subscriptionId,
java.lang.Integer contractDurationExtension,
java.util.Map<java.lang.String,java.lang.String> parameters)
Extends the subscription term duration of an existing subscription.
|
SubscriptionPaymentData |
finalizeTransaction(java.lang.String authorizationRequestId,
java.lang.String authorizationRequestToken,
java.util.Map<java.lang.String,java.lang.String> parameters)
Finalizes an established subscription with the subscription billing provider.
|
SubscriptionBillingDetailFileStream |
getBillingActivityDetail(java.lang.String billingActivityId,
java.util.Map<java.lang.String,java.lang.String> parameters)
Returns a file stream containing detail information for the specified billing activity.
|
java.util.List<SubscriptionBillingData> |
getBillingActivityList(java.lang.String subscriptionId,
java.util.Map<java.lang.String,java.lang.String> parameters)
Returns a list of billing activities for the given subscription.
|
AbstractOrderEntryModel |
getOrderEntryForOrderCodeAndEntryNumber(java.lang.String orderCode,
int entryNumber)
Returns the
AbstractOrderEntryModel for the given orderCode and entryNumber. |
SubscriptionData |
getSubscription(java.lang.String subscriptionId)
Returns the subscription with the given ID.
|
java.util.Date |
getSubscriptionEndDate(ProductData subscriptionProductData,
java.util.Date startDate)
Calculates an end date for a subscription product based on its subscription term details.
|
java.util.Collection<SubscriptionData> |
getSubscriptions()
Returns all subscriptions for the current user.
|
java.util.List<SubscriptionData> |
getSubscriptionsForPaymentMethod(java.lang.String paymentMethodId)
Returns a list of subscriptions for the given paymentMethodId of the current user.
|
java.util.List<SubscriptionBillingData> |
getUpgradePreviewBillings(java.lang.String subscriptionId,
java.lang.String upgradeId)
Returns a list of the possible billing changes between the current subscription and an upgrade option.
|
java.util.List<ProductData> |
getUpsellingOptionsForSubscription(java.lang.String productCode)
Returns a list of possible upgrade options for the given subscription product.
|
java.lang.String |
hpfUrl()
Returns the HPF URL.
|
SubscriptionPaymentData |
initializeTransaction(java.lang.String clientIpAddress,
java.lang.String returnUrl,
java.lang.String cancelReturnUrl,
java.util.Map<java.lang.String,java.lang.String> parameters)
Initializes a transaction with the subscription billing provider.
|
SubscriptionPaymentData |
replacePaymentMethod(java.lang.String subscriptionId,
java.lang.String paymentMethodId,
java.util.Map<java.lang.String,java.lang.String> parameters)
Replaces the payment method for the given subscription.
|
SubscriptionData |
replacePaymentMethod(java.lang.String subscriptionId,
java.lang.String paymentMethodId,
java.lang.String effectiveFrom,
java.util.Map<java.lang.String,java.lang.String> parameters) |
CCPaymentInfoData |
updateCreatedPaymentMethod(CCPaymentInfoData paymentType,
java.util.Map<java.lang.String,java.lang.String> paramMap)
Updates an newly-created Payment Type with the Subscription Service information.
|
SubscriptionPaymentData |
updateProfile(java.util.Map<java.lang.String,java.lang.String> parameters)
Creates or updates a subscription profile for the current user.
|
SubscriptionPaymentData |
updateSubscription(java.lang.String subscriptionId,
boolean force,
SubscriptionUpdateActionEnum action,
java.util.Map<java.lang.String,java.lang.String> parameters)
Updates the given subscription (e.g.
|
SubscriptionData |
updateSubscriptionAutorenewal(java.lang.String subscriptionId,
boolean isAutorenewal,
java.util.Map<java.lang.String,java.lang.String> parameters)
Updates the auto-renewal status of an existing subscription.
|
CCPaymentInfoData updateCreatedPaymentMethod(CCPaymentInfoData paymentType, java.util.Map<java.lang.String,java.lang.String> paramMap) throws SubscriptionFacadeException
changePaymentMethod(CCPaymentInfoData, String, boolean, Map) because it must be used only during the
creation of a new payment method (created by the PaymentFacade).
changePaymentMethod(CCPaymentInfoData, String, boolean, Map) must be used changing details at a later
time.paymentType - the payment info data relating to the recently-created Payment TypeparamMap - the detail map containing new subscription information.SubscriptionFacadeExceptionSubscriptionPaymentData updateProfile(java.util.Map<java.lang.String,java.lang.String> parameters) throws SubscriptionFacadeException
parameters - provider specific parametersSubscriptionPaymentData containing the results of the operationSubscriptionFacadeExceptionSubscriptionPaymentData createSubscriptions(OrderData order, java.util.Map<java.lang.String,java.lang.String> parameters) throws SubscriptionFacadeException
order - the order to create the subscriptions forparameters - provider specific parametersSubscriptionPaymentData containing the results of the operationSubscriptionFacadeExceptionSubscriptionPaymentData initializeTransaction(java.lang.String clientIpAddress, java.lang.String returnUrl, java.lang.String cancelReturnUrl, java.util.Map<java.lang.String,java.lang.String> parameters) throws SubscriptionFacadeException
clientIpAddress - the IP address of the calling client. May be empty.returnUrl - the URL to redirect to after the silent from post. May not be null or empty.cancelReturnUrl - the URL to redirect to in case of errors after the silent from post. May not be null or empty.parameters - provider specific parametersSubscriptionPaymentData containing the results of the operation (hpfUrl and session token).
result.getParameters().get("sessionTransactionToken") returns not-null String value.SubscriptionFacadeExceptionSubscriptionPaymentData finalizeTransaction(java.lang.String authorizationRequestId, java.lang.String authorizationRequestToken, java.util.Map<java.lang.String,java.lang.String> parameters) throws SubscriptionFacadeException
authorizationRequestId - the request IDauthorizationRequestToken - the request token retrieved from the result of a initializeTransaction(java.lang.String, java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.String>) call.parameters - provider specific parametersSubscriptionPaymentData containing the results of the operationSubscriptionFacadeExceptionCCPaymentInfoData changePaymentMethod(CCPaymentInfoData paymentInfo, java.lang.String action, boolean propagate, java.util.Map<java.lang.String,java.lang.String> parameters) throws SubscriptionFacadeException
paymentInfo - CCPaymentInfoData the updated payment informationaction - String the change action to perform (currently supported: "enable",
"disable")propagate - determines whether to propagate the change to all billing subscriptions using the given payment methodparameters - provider specific parametersCCPaymentInfoData containing the results of the operationSubscriptionFacadeExceptionSubscriptionPaymentData replacePaymentMethod(java.lang.String subscriptionId, java.lang.String paymentMethodId, java.util.Map<java.lang.String,java.lang.String> parameters) throws SubscriptionFacadeException
subscriptionId - the ID of the subscription to replace the payment method forpaymentMethodId - the ID of the new payment method which replaces the current oneparameters - provider specific parametersSubscriptionPaymentData containing the results of the operationSubscriptionFacadeExceptionSubscriptionData replacePaymentMethod(java.lang.String subscriptionId, java.lang.String paymentMethodId, java.lang.String effectiveFrom, java.util.Map<java.lang.String,java.lang.String> parameters) throws SubscriptionFacadeException
subscriptionId - the ID of the subscriptionpaymentMethodId - the ID of the payment method to seteffectiveFrom - determines when the replacement will take effectparameters - provider specific parametersSubscriptionData containing the results of the operationSubscriptionFacadeExceptionCCPaymentInfoData createPaymentSubscription(java.util.Map<java.lang.String,java.lang.String> paymentParameters) throws SubscriptionFacadeException
paymentParameters - parameters retrieved from the result of a finalizeTransaction(java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.String>) call.CCPaymentInfoData the payment information created based on the given parametersSubscriptionFacadeExceptionSubscriptionPaymentData updateSubscription(java.lang.String subscriptionId, boolean force, SubscriptionUpdateActionEnum action, java.util.Map<java.lang.String,java.lang.String> parameters) throws SubscriptionFacadeException
subscriptionId - the subscription to updateforce - determines whether to force the update or notaction - the update action to performparameters - provider specific parametersSubscriptionPaymentData containing the results of the operationSubscriptionFacadeExceptionjava.util.Collection<SubscriptionData> getSubscriptions() throws SubscriptionFacadeException
Collection<SubscriptionData> the current user's subscriptionSubscriptionFacadeExceptionSubscriptionData getSubscription(java.lang.String subscriptionId) throws SubscriptionFacadeException
subscriptionId - the ID of the subscriptionSubscriptionData the subscription with the given IDSubscriptionFacadeExceptionjava.lang.String hpfUrl()
throws SubscriptionFacadeException
SubscriptionFacadeExceptionjava.util.Date getSubscriptionEndDate(ProductData subscriptionProductData, java.util.Date startDate)
subscriptionProductData - startDate - start date of the subscriptionjava.util.List<ProductData> getUpsellingOptionsForSubscription(java.lang.String productCode)
productCode - List of ProductDatajava.util.List<SubscriptionBillingData> getUpgradePreviewBillings(java.lang.String subscriptionId, java.lang.String upgradeId) throws SubscriptionFacadeException
subscriptionId - the current subscriptionupgradeId - the upgrade optionList of SubscriptionBillingDataSubscriptionFacadeExceptionAbstractOrderEntryModel getOrderEntryForOrderCodeAndEntryNumber(java.lang.String orderCode, int entryNumber)
AbstractOrderEntryModel for the given orderCode and entryNumber.orderCode - entryNumber - AbstractOrderEntryModel or null if not foundSubscriptionData updateSubscriptionAutorenewal(java.lang.String subscriptionId, boolean isAutorenewal, java.util.Map<java.lang.String,java.lang.String> parameters) throws SubscriptionFacadeException
subscriptionId - the ID of the subscriptionisAutorenewal - the new auto-renewal status of the subscriptionparameters - provider specific parametersSubscriptionData containing the results of the operationSubscriptionFacadeExceptionSubscriptionData changeSubscriptionState(java.lang.String subscriptionId, java.lang.String newStatus, java.util.Map<java.lang.String,java.lang.String> parameters) throws SubscriptionFacadeException
subscriptionId - the ID of the subscriptionnewStatus - new status of the subscriptionparameters - provider specific parametersSubscriptionData containing the results of the operationSubscriptionFacadeExceptionSubscriptionData extendSubscriptionTermDuration(java.lang.String subscriptionId, java.lang.Integer contractDurationExtension, java.util.Map<java.lang.String,java.lang.String> parameters) throws SubscriptionFacadeException
subscriptionId - the ID of the subscriptioncontractDurationExtension - extends the duration x timesparameters - provider specific parametersSubscriptionData containing the results of the operationSubscriptionFacadeExceptionjava.util.List<SubscriptionBillingData> getBillingActivityList(java.lang.String subscriptionId, java.util.Map<java.lang.String,java.lang.String> parameters) throws SubscriptionFacadeException
subscriptionId - the ID of the subscriptionparameters - provider specific parametersList<SubscriptionBillingData>SubscriptionFacadeExceptionSubscriptionBillingDetailFileStream getBillingActivityDetail(java.lang.String billingActivityId, java.util.Map<java.lang.String,java.lang.String> parameters) throws SubscriptionFacadeException
billingActivityId - the ID of the billing activityparameters - provider specific parametersSubscriptionBillingDetailFileStreamSubscriptionFacadeExceptionjava.util.List<SubscriptionData> getSubscriptionsForPaymentMethod(java.lang.String paymentMethodId) throws SubscriptionFacadeException
paymentMethodId - the ID of the payment methodSubscriptionFacadeExceptionCopyright © 2018 SAP SE. All Rights Reserved.