Class DefaultSapMyAccountOutboundService
java.lang.Object
com.sap.myaccountsapservices.service.impl.DefaultSapMyAccountOutboundService
This class @DefaultSapMyAccountOutboundService has methods using which data will be fetched from external system CDP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringfetchCdpCustomer(ConsumedDestinationModel destinationModel, CustomerModel customerModel, String activityName) fetchCdpCustomerActivity(String destinationId, String destinationTargetId, CustomerModel customerModel, String activityName, PageableData pageableData) Fetch Customer Activities from CDP based on the customer idfetchCdpCustomerActivityForCode(String destinationId, String destinationTargetId, CustomerModel customerModel, String activityName, String code) Fetch Customer Activities from CDP based on the customer id for a particular order codefetchCdpCustomerActivityForReturns(String destinationId, String destinationTargetId, CustomerModel customerModel, String activityName, PageableData pageableData) Fetch Return Order Customer Activities from CDP based on the customer id for a particular order codefetchCdpCustomerActivityForServiceTickets(String destinationId, String destinationTargetId, CustomerModel currentCustomer, PageableData pageableData) Fetch Customer Activities from CDP based on the customer idfetchCustomerActivityForTicketDetails(String destinationId, String destinationTargetId, CustomerModel currentCustomer, String ticketId) Fetch Customer Activities from CDP based on the customer idbyte[]fetchPDFInvoice(BaseStoreModel currentBaseStore, OrderModel orderModel, String invoiceId) Method to get Invoice pdf from the external systemprotected de.hybris.platform.apiregistryservices.services.DestinationService<ConsumedDestinationModel>de.hybris.platform.outboundservices.client.IntegrationRestTemplateFactorygetInvoices(String activityName, AbstractOrderModel order) Method to get list of invoices from external systemvoidsetDefaultSapMappedDestinationService(DefaultSapMappedDestinationService defaultSapMappedDestinationService) voidsetDestinationService(de.hybris.platform.apiregistryservices.services.DestinationService<ConsumedDestinationModel> destinationService) voidsetIntegrationRestTemplateFactory(de.hybris.platform.outboundservices.client.IntegrationRestTemplateFactory integrationRestTemplateFactory) voidsetMyAccountCacheUtil(MyAccountCacheUtil myAccountCacheUtil) voidsetMyAccountExceptionUtil(MyAccountExceptionUtil myAccountExceptionUtil)
-
Constructor Details
-
DefaultSapMyAccountOutboundService
public DefaultSapMyAccountOutboundService()
-
-
Method Details
-
fetchCdpCustomerActivity
public CdpResponseData fetchCdpCustomerActivity(String destinationId, String destinationTargetId, CustomerModel customerModel, String activityName, PageableData pageableData) throws de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException, MyAccountSapServiceException Fetch Customer Activities from CDP based on the customer id- Parameters:
destinationId- Id of the DestinationdestinationTargetId- Id of the Destination TargetcustomerModel- Customer ModelactivityName- Name of the activity propertypageableData- Pagination data along with Sort- Returns:
- CdpResponseData containing all the activities related to customer
- Throws:
de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException- when the customer is not found in CDPMyAccountSapServiceException- when there is an application exception
-
fetchCdpCustomerActivityForCode
public CdpResponseData fetchCdpCustomerActivityForCode(String destinationId, String destinationTargetId, CustomerModel customerModel, String activityName, String code) throws de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException Fetch Customer Activities from CDP based on the customer id for a particular order code- Parameters:
destinationId- Id of the DestinationdestinationTargetId- Id of the Destination TargetcustomerModel- Customer ModelactivityName- Name of the activity propertycode- Order code- Returns:
- CdpResponseData containing all the activities related to customer
- Throws:
de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException- when the customer is not found in CDP
-
fetchCdpCustomerActivityForReturns
public CdpReturnsResponseData fetchCdpCustomerActivityForReturns(String destinationId, String destinationTargetId, CustomerModel customerModel, String activityName, PageableData pageableData) throws de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException Fetch Return Order Customer Activities from CDP based on the customer id for a particular order code- Parameters:
destinationId- Id of the DestinationdestinationTargetId- Id of the Destination TargetcustomerModel- Customer ModelactivityName- Name of the activity propertypageableData- Pagination Data- Returns:
- CdpReturnsResponseData containing all the activities related to customer
- Throws:
de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException- when the customer is not found in CDP
-
fetchCdpCustomer
protected String fetchCdpCustomer(ConsumedDestinationModel destinationModel, CustomerModel customerModel, String activityName) throws de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException, MyAccountSapServiceException - Throws:
de.hybris.platform.servicelayer.exceptions.UnknownIdentifierExceptionMyAccountSapServiceException
-
getInvoices
Method to get list of invoices from external system- Parameters:
activityName- Name of the activityorder- Order for which invoices are required- Returns:
- CdpResponseData List of invoice data
-
fetchPDFInvoice
public byte[] fetchPDFInvoice(BaseStoreModel currentBaseStore, OrderModel orderModel, String invoiceId) Method to get Invoice pdf from the external system- Parameters:
currentBaseStore- current base storeorderModel- orderinvoiceId- Id of the invoice in external system- Returns:
- byte[] Invoice Pdf in bytes
-
fetchCdpCustomerActivityForServiceTickets
public SapCdpServiceRequestResponse fetchCdpCustomerActivityForServiceTickets(String destinationId, String destinationTargetId, CustomerModel currentCustomer, PageableData pageableData) throws de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException Fetch Customer Activities from CDP based on the customer id- Parameters:
destinationId- Id of the DestinationdestinationTargetId- Id of the Destination TargetcurrentCustomer- Id of the CDP CustomerpageableData- Pagination data along with Sort- Returns:
- CdpResponseData containing all the activities of Service Request related to customer
- Throws:
de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException- when the customer is not found in CDP
-
fetchCustomerActivityForTicketDetails
public SapCdpServiceRequestResponse fetchCustomerActivityForTicketDetails(String destinationId, String destinationTargetId, CustomerModel currentCustomer, String ticketId) throws de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException Fetch Customer Activities from CDP based on the customer id- Parameters:
destinationId- Id of the DestinationdestinationTargetId- Id of the Destination TargetcurrentCustomer- Id of the CDP CustomerticketId- Ticket Id- Returns:
- CdpResponseData containing all the activities of Service Request related to customer
- Throws:
de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException- when the customer is not found in CDP
-
getDestinationService
protected de.hybris.platform.apiregistryservices.services.DestinationService<ConsumedDestinationModel> getDestinationService() -
setDestinationService
public void setDestinationService(de.hybris.platform.apiregistryservices.services.DestinationService<ConsumedDestinationModel> destinationService) -
getIntegrationRestTemplateFactory
public de.hybris.platform.outboundservices.client.IntegrationRestTemplateFactory getIntegrationRestTemplateFactory()- Returns:
- the integrationRestTemplateFactory
-
setIntegrationRestTemplateFactory
public void setIntegrationRestTemplateFactory(de.hybris.platform.outboundservices.client.IntegrationRestTemplateFactory integrationRestTemplateFactory) - Parameters:
integrationRestTemplateFactory- the integrationRestTemplateFactory to set
-
getDefaultSapMappedDestinationService
- Returns:
- the defaultSapMappedDestinationService
-
setDefaultSapMappedDestinationService
public void setDefaultSapMappedDestinationService(DefaultSapMappedDestinationService defaultSapMappedDestinationService) - Parameters:
defaultSapMappedDestinationService- the defaultSapMappedDestinationService to set
-
getMyAccountExceptionUtil
- Returns:
- the myAccountExceptionUtil
-
setMyAccountExceptionUtil
- Parameters:
myAccountExceptionUtil- the myAccountExceptionUtil to set
-
getMyAccountCacheUtil
- Returns:
- the myAccountCacheUtil
-
setMyAccountCacheUtil
- Parameters:
myAccountCacheUtil- the myAccountCacheUtil to set
-