Interface CpqClient
public interface CpqClient
Accessing CPQ via REST and oAuth2
-
Method Summary
Modifier and TypeMethodDescriptionrx.Observable<com.hybris.charon.RawResponse<ConfigurationCloneData>>clone(String authorization, boolean cookieless, String configId, ConfigurationCloneRequest cloneRequest) Clones the configuration with given IDrx.Observable<com.hybris.charon.RawResponse<ConfigurationCloneData>>clone(String authorization, String cookie, boolean cookieless, String configId, ConfigurationCloneRequest cloneRequest) Clones the configuration with given IDrx.Observable<com.hybris.charon.RawResponse<ConfigurationCreatedResponseData>>createConfiguration(String authorization, boolean cookieless, ConfigurationCreateRequest createRequest) Initializes a new session configurationrx.Observable<com.hybris.charon.RawResponse<Object>>createOrUpdateConfigurationContext(BusinessContextRequest businessContext, String authorization) Sends the business context to CPQ for a given owner idrx.Observable<com.hybris.charon.RawResponse<Object>>deleteConfiguration(String authorization, String configId) Deletes the configuration with given IDrx.Observable<com.hybris.charon.RawResponse<Object>>deleteConfiguration(String authorization, String cookie, String configId) Deletes the configuration with given IDrx.Observable<com.hybris.charon.RawResponse<ConfigurationSummaryData>>getConfiguration(String authorization, String configId) Retrieves the configuration with given IDrx.Observable<com.hybris.charon.RawResponse<ConfigurationSummaryData>>getConfiguration(String authorization, String cookie, String configId) Retrieves the configuration with given IDrx.Observable<com.hybris.charon.RawResponse<Object>>makePermanent(String authorization, String configId, ConfigurationPatchRequest requestData) Marks a persisted configuration as permanent.
Should be called when the UI is 'done' configuring.rx.Observable<com.hybris.charon.RawResponse<Object>>makePermanent(String authorization, String cookie, String configId, ConfigurationPatchRequest requestData) Marks a persisted configuration as permanent.
Should be called when the UI is 'done' configuring.rx.Observable<com.hybris.charon.RawResponse<CpqConfigurationData>>readConfigurationCurrentTab(String authorization, String configId) Retrieves the configuration tab/group data for the current tabrx.Observable<com.hybris.charon.RawResponse<CpqConfigurationData>>readConfigurationCurrentTab(String authorization, String cookie, String configId) Retrieves the configuration tab/group data for the current tabrx.Observable<com.hybris.charon.RawResponse<CpqConfigurationData>>readConfigurationTab(String authorization, String configId, Integer tabId) Retrieves the configuration tab/group data for desired tabrx.Observable<com.hybris.charon.RawResponse<CpqConfigurationData>>readConfigurationTab(String authorization, String cookie, String configId, Integer tabId) Retrieves the configuration tab/group data for desired tabrx.Observable<com.hybris.charon.RawResponse<TokenResponseData>>Get oAuth2 token, passing the credentials of a guest userrx.Observable<com.hybris.charon.RawResponse<Object>>updateAttribute(String authorization, String configId, Integer attributeCode, ChangeAttributeValueData changeAttribute) Updates configuration attributerx.Observable<com.hybris.charon.RawResponse<Object>>updateAttribute(String authorization, String cookie, String configId, Integer attributeCode, ChangeAttributeValueData changeAttribute) Updates configuration attributerx.Observable<com.hybris.charon.RawResponse<Object>>updateAttributeValueQuantity(String authorization, String configId, Integer attributeCode, Integer attributeValueId, ChangeAttributeValueQuantityData changeAttributeValueQuantity) Updates quantity of the configuration attribute valuerx.Observable<com.hybris.charon.RawResponse<Object>>updateAttributeValueQuantity(String authorization, String cookie, String configId, Integer attributeCode, Integer attributeValueId, ChangeAttributeValueQuantityData changeAttributeValueQuantity) Updates quantity of the configuration attribute value
-
Method Details
-
token
@POST @Produces("application/json") @Path("/basic/api/token") rx.Observable<com.hybris.charon.RawResponse<TokenResponseData>> token(String credentials) Get oAuth2 token, passing the credentials of a guest user- Parameters:
credentials-- Returns:
- Token
-
createConfiguration
@POST @Produces("application/json") @Path("/api/configuration/v1/configurations") rx.Observable<com.hybris.charon.RawResponse<ConfigurationCreatedResponseData>> createConfiguration(@HeaderParam("Authorization") String authorization, @HeaderParam("x-cpq-disable-cookies") boolean cookieless, ConfigurationCreateRequest createRequest) Initializes a new session configuration- Parameters:
authorization- OAuth2 authorization tokencookieless- iftruecookieless mode requested, CPQ should then return no ASP.Net Session cookie, but populate header fieldx-cpq-session-idwith session id.createRequest- request body- Returns:
- Response, used to extract the cookies needed for subsequent requests and configuration id
-
getConfiguration
@GET @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}") rx.Observable<com.hybris.charon.RawResponse<ConfigurationSummaryData>> getConfiguration(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId) Retrieves the configuration with given ID- Parameters:
authorization- OAuth2 tokenconfigId- Configuration ID- Returns:
- Configuration Summary
-
getConfiguration
@GET @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}") rx.Observable<com.hybris.charon.RawResponse<ConfigurationSummaryData>> getConfiguration(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId) Retrieves the configuration with given ID- Parameters:
authorization- OAuth2 tokencookie- Session and load balancer cookiesconfigId- Configuration ID- Returns:
- Configuration Summary
-
deleteConfiguration
@DELETE @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}") rx.Observable<com.hybris.charon.RawResponse<Object>> deleteConfiguration(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId) Deletes the configuration with given ID- Parameters:
authorization- OAuth2 tokenconfigId- Configuration ID- Returns:
- no Content
-
deleteConfiguration
@DELETE @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}") rx.Observable<com.hybris.charon.RawResponse<Object>> deleteConfiguration(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId) Deletes the configuration with given ID- Parameters:
authorization- OAuth2 tokencookie- Session and load balancer cookiesconfigId- Configuration ID- Returns:
- no Content
-
clone
@POST @Produces("application/json") @Path("/api/configuration/v1/configurations/{configurationId}/clone") rx.Observable<com.hybris.charon.RawResponse<ConfigurationCloneData>> clone(@HeaderParam("Authorization") String authorization, @HeaderParam("x-cpq-disable-cookies") boolean cookieless, @PathParam("configurationId") String configId, ConfigurationCloneRequest cloneRequest) Clones the configuration with given ID- Parameters:
authorization- OAuth2 tokencookieless- specifies whether cpq runs in cookieless modeconfigId- Configuration IDcloneRequest- options for cloning process- Returns:
- Configuration ID of cloned configuration
-
clone
@POST @Produces("application/json") @Path("/api/configuration/v1/configurations/{configurationId}/clone") rx.Observable<com.hybris.charon.RawResponse<ConfigurationCloneData>> clone(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @HeaderParam("x-cpq-disable-cookies") boolean cookieless, @PathParam("configurationId") String configId, ConfigurationCloneRequest cloneRequest) Clones the configuration with given ID- Parameters:
authorization- OAuth2 tokencookie- Session and load balancer cookiescookieless- specifies whether cpq runs in cookieless modeconfigId- Configuration IDcloneRequest- options for cloning process- Returns:
- Configuration ID of cloned configuration
-
createOrUpdateConfigurationContext
@POST @Produces("application/json") @Path("/api/configuration/v1/configurations/configurationContext") rx.Observable<com.hybris.charon.RawResponse<Object>> createOrUpdateConfigurationContext(BusinessContextRequest businessContext, @HeaderParam("Authorization") String authorization) Sends the business context to CPQ for a given owner id- Parameters:
businessContext- business context to be sentauthorization- OAuth2 tokenownerId- owner id for which the business context is sent- Returns:
- no content
-
makePermanent
@PATCH @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}") rx.Observable<com.hybris.charon.RawResponse<Object>> makePermanent(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId, ConfigurationPatchRequest requestData) Marks a persisted configuration as permanent.
Should be called when the UI is 'done' configuring. Afterwards admin/server is required to do any changes. UI/Client scope is not sufficient anymore to do changes.- Parameters:
authorization- OAuth2 tokenconfigId- config idrequestData- request body- Returns:
- no content
-
makePermanent
@PATCH @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}") rx.Observable<com.hybris.charon.RawResponse<Object>> makePermanent(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId, ConfigurationPatchRequest requestData) Marks a persisted configuration as permanent.
Should be called when the UI is 'done' configuring. Afterwards admin/server is required to do any changes. UI/Client scope is not sufficient anymore to do changes.- Parameters:
authorization- OAuth2 tokencookie- Session and load balancer cookiesconfigId- config idrequestData- request body- Returns:
- no content
-
readConfigurationTab
@GET @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/display") rx.Observable<com.hybris.charon.RawResponse<CpqConfigurationData>> readConfigurationTab(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId, @QueryParam("tabId") Integer tabId) Retrieves the configuration tab/group data for desired tab- Parameters:
authorization- OAuth2 tokenconfigId- Configuration idtabId- Tab id- Returns:
- Configuration tab data
-
readConfigurationTab
@GET @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/display") rx.Observable<com.hybris.charon.RawResponse<CpqConfigurationData>> readConfigurationTab(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId, @QueryParam("tabId") Integer tabId) Retrieves the configuration tab/group data for desired tab- Parameters:
authorization- OAuth2 tokencookie- Session and load balancer cookiesconfigId- Configuration idtabId- Tab id- Returns:
- Configuration tab data
-
readConfigurationCurrentTab
@GET @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/display") rx.Observable<com.hybris.charon.RawResponse<CpqConfigurationData>> readConfigurationCurrentTab(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId) Retrieves the configuration tab/group data for the current tab- Parameters:
authorization- OAuth2 tokenconfigId- Configuration id- Returns:
- Configuration tab data
-
readConfigurationCurrentTab
@GET @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/display") rx.Observable<com.hybris.charon.RawResponse<CpqConfigurationData>> readConfigurationCurrentTab(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId) Retrieves the configuration tab/group data for the current tab- Parameters:
authorization- OAuth2 tokencookie- Session and load balancer cookiesconfigId- Configuration id- Returns:
- Configuration tab data
-
updateAttribute
@PATCH @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/attributes/{standardAttributeCode}") rx.Observable<com.hybris.charon.RawResponse<Object>> updateAttribute(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId, @PathParam("standardAttributeCode") Integer attributeCode, ChangeAttributeValueData changeAttribute) Updates configuration attribute- Parameters:
authorization- OAuth2 tokenconfigId- configuration idattributeCode- standard attribute codechangeAttribute- data structure containing information about updated attribute vaiues or quantity
-
updateAttribute
@PATCH @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/attributes/{standardAttributeCode}") rx.Observable<com.hybris.charon.RawResponse<Object>> updateAttribute(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId, @PathParam("standardAttributeCode") Integer attributeCode, ChangeAttributeValueData changeAttribute) Updates configuration attribute- Parameters:
authorization- OAuth2 tokencookie- Session and load balancer cookiesconfigId- configuration idattributeCode- standard attribute codechangeAttribute- data structure containing information about updated attribute vaiues or quantity
-
updateAttributeValueQuantity
@PATCH @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/attributes/{standardAttributeCode}/attributeValues/{attributeValueId}") rx.Observable<com.hybris.charon.RawResponse<Object>> updateAttributeValueQuantity(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId, @PathParam("standardAttributeCode") Integer attributeCode, @PathParam("attributeValueId") Integer attributeValueId, ChangeAttributeValueQuantityData changeAttributeValueQuantity) Updates quantity of the configuration attribute value- Parameters:
authorization- OAuth2 tokenconfigId- configuration idattributeCode- standard attribute codeattributeValueId- standard attribute codechangeAttributeValueQuantity- data structure containing information about updated value quantity
-
updateAttributeValueQuantity
@PATCH @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/attributes/{standardAttributeCode}/attributeValues/{attributeValueId}") rx.Observable<com.hybris.charon.RawResponse<Object>> updateAttributeValueQuantity(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId, @PathParam("standardAttributeCode") Integer attributeCode, @PathParam("attributeValueId") Integer attributeValueId, ChangeAttributeValueQuantityData changeAttributeValueQuantity) Updates quantity of the configuration attribute value- Parameters:
authorization- OAuth2 tokencookie- Session and load balancer cookiesconfigId- configuration idattributeCode- standard attribute codeattributeValueId- standard attribute codechangeAttributeValueQuantity- data structure containing information about updated value quantity
-