Class DefaultSapMyAccountOutboundService

java.lang.Object
com.sap.myaccountsapservices.service.impl.DefaultSapMyAccountOutboundService

public class DefaultSapMyAccountOutboundService extends Object
This class @DefaultSapMyAccountOutboundService has methods using which data will be fetched from external system CDP
  • 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 Destination
      destinationTargetId - Id of the Destination Target
      customerModel - Customer Model
      activityName - Name of the activity property
      pageableData - 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 CDP
      MyAccountSapServiceException - 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 Destination
      destinationTargetId - Id of the Destination Target
      customerModel - Customer Model
      activityName - Name of the activity property
      code - 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 Destination
      destinationTargetId - Id of the Destination Target
      customerModel - Customer Model
      activityName - Name of the activity property
      pageableData - 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.UnknownIdentifierException
      MyAccountSapServiceException
    • getInvoices

      public CdpResponseData getInvoices(String activityName, AbstractOrderModel order)
      Method to get list of invoices from external system
      Parameters:
      activityName - Name of the activity
      order - 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 store
      orderModel - order
      invoiceId - 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 Destination
      destinationTargetId - Id of the Destination Target
      currentCustomer - Id of the CDP Customer
      pageableData - 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 Destination
      destinationTargetId - Id of the Destination Target
      currentCustomer - Id of the CDP Customer
      ticketId - 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

      public DefaultSapMappedDestinationService getDefaultSapMappedDestinationService()
      Returns:
      the defaultSapMappedDestinationService
    • setDefaultSapMappedDestinationService

      public void setDefaultSapMappedDestinationService(DefaultSapMappedDestinationService defaultSapMappedDestinationService)
      Parameters:
      defaultSapMappedDestinationService - the defaultSapMappedDestinationService to set
    • getMyAccountExceptionUtil

      public MyAccountExceptionUtil getMyAccountExceptionUtil()
      Returns:
      the myAccountExceptionUtil
    • setMyAccountExceptionUtil

      public void setMyAccountExceptionUtil(MyAccountExceptionUtil myAccountExceptionUtil)
      Parameters:
      myAccountExceptionUtil - the myAccountExceptionUtil to set
    • getMyAccountCacheUtil

      public MyAccountCacheUtil getMyAccountCacheUtil()
      Returns:
      the myAccountCacheUtil
    • setMyAccountCacheUtil

      public void setMyAccountCacheUtil(MyAccountCacheUtil myAccountCacheUtil)
      Parameters:
      myAccountCacheUtil - the myAccountCacheUtil to set