Class HPSCustomMerchantDataMapper
HPSOrderAbstractionInitRequest and HPSOrderAbstractionQueryResponse.-
Constructor Summary
ConstructorsConstructorDescriptionHPSCustomMerchantDataMapper(com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringconvertPropertyValueMapRepresentationToString(Map<String, String> mapRepresentation) This is the inverse ofparsePropertyValueMapFromStringRepresentation(String).protected StringgetApplicationId(com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected StringgetContextRequestString(HPSOrderAbstractionQueryResponse uidResponse) protected Stringprotected StringgetTenantId(com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected com.broadleafcommerce.common.extension.TypeFactoryparsePropertyValueMapFromStringRepresentation(String propertyValuesStringRepresentation) This is the inverse ofconvertPropertyValueMapRepresentationToString(Map)voidpopulateContextDetails(HPSOrderAbstractionInitRequest payloadToPopulate, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) On the givenHPSOrderAbstractionInitRequest, populate Broadleaf context information in HPS custom merchant fields.voidpopulatePaymentOwnerInformation(HPSOrderAbstractionInitRequest payloadToPopulate, String paymentOwnerType, String paymentOwnerId) On the givenHPSOrderAbstractionInitRequest, populate Broadleaf payment owner information in HPS custom merchant fields.com.broadleafcommerce.data.tracking.core.context.ContextRequestresolveContextDetails(HPSOrderAbstractionQueryResponse uidResponse) From the givenHPSOrderAbstractionQueryResponse, extract Broadleaf context information that may have been previously recorded in HPS custom merchant fields.From the givenHPSOrderAbstractionQueryResponse, extract Broadleaf payment owner information that may have been previously recorded in HPS custom merchant fields.protected voidsetContextRequestString(HPSOrderAbstractionInitRequest payloadToPopulate, String contextRequestString) protected voidsetPaymentOwnerInformationString(HPSOrderAbstractionInitRequest payloadToPopulate, String paymentOwnerInformationString)
-
Constructor Details
-
HPSCustomMerchantDataMapper
public HPSCustomMerchantDataMapper(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
resolveContextDetails
@Nullable public com.broadleafcommerce.data.tracking.core.context.ContextRequest resolveContextDetails(HPSOrderAbstractionQueryResponse uidResponse) From the givenHPSOrderAbstractionQueryResponse, extract Broadleaf context information that may have been previously recorded in HPS custom merchant fields.- Parameters:
uidResponse- the UID query response from which to resolve the context details- Returns:
- a minimal
ContextRequestwith the resolved details, or null if no details could be resolved - Throws:
IllegalArgumentException- if there was an error parsing the input- See Also:
-
getContextRequestString
-
parsePropertyValueMapFromStringRepresentation
protected Map<String,String> parsePropertyValueMapFromStringRepresentation(String propertyValuesStringRepresentation) This is the inverse ofconvertPropertyValueMapRepresentationToString(Map)- Parameters:
propertyValuesStringRepresentation- the specially formatting string that needs to be parsed- Returns:
- the map representation of the property-values
- Throws:
IllegalArgumentException- if there is a parsing issue
-
resolvePaymentOwnerInformation
@Nullable public org.apache.commons.lang3.tuple.Pair<String,String> resolvePaymentOwnerInformation(HPSOrderAbstractionQueryResponse uidResponse) From the givenHPSOrderAbstractionQueryResponse, extract Broadleaf payment owner information that may have been previously recorded in HPS custom merchant fields.- Parameters:
uidResponse- the UID query response from which to resolve the payment owner details- Returns:
- a
Pairof the resolved payment owner type and payment owner ID, or null if no details could be resolved - Throws:
IllegalArgumentException- if there was an error parsing the input- See Also:
-
getPaymentOwnerInformationString
-
populateContextDetails
@Nullable public void populateContextDetails(HPSOrderAbstractionInitRequest payloadToPopulate, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) On the given
HPSOrderAbstractionInitRequest, populate Broadleaf context information in HPS custom merchant fields.By default, the result will be a minimal, specially formatted string that contains the basic context information that this HPS submission is intended for. Should be as short as possible to reduce the likelihood of running into Chase field size limitations
- Parameters:
payloadToPopulate- the target instance to populate the context information oncontextInfo- the context details to populate on the payload- Throws:
IllegalArgumentException- if there was an error processing the input- See Also:
-
convertPropertyValueMapRepresentationToString
protected String convertPropertyValueMapRepresentationToString(Map<String, String> mapRepresentation) This is the inverse ofparsePropertyValueMapFromStringRepresentation(String).- Parameters:
mapRepresentation- the map representation of properties and values- Returns:
- a specially formatted string that represents the contents of the map
-
setContextRequestString
protected void setContextRequestString(HPSOrderAbstractionInitRequest payloadToPopulate, String contextRequestString) -
getTenantId
@Nullable protected String getTenantId(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) -
getApplicationId
@Nullable protected String getApplicationId(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) -
populatePaymentOwnerInformation
@Nullable public void populatePaymentOwnerInformation(HPSOrderAbstractionInitRequest payloadToPopulate, @Nullable String paymentOwnerType, @Nullable String paymentOwnerId) On the given
HPSOrderAbstractionInitRequest, populate Broadleaf payment owner information in HPS custom merchant fields.By default, the result will be a minimal, specially formatted string that contains the basic payment owner information that this HPS submission is intended for. Should be as short as possible to reduce the likelihood of running into Chase field size limitations
- Parameters:
payloadToPopulate- the target instance to populate the payment owner information onpaymentOwnerType- the payment owner type to populatepaymentOwnerId- the payment owner ID to populate- Throws:
IllegalArgumentException- if there was an error processing the input- See Also:
-
setPaymentOwnerInformationString
protected void setPaymentOwnerInformationString(HPSOrderAbstractionInitRequest payloadToPopulate, String paymentOwnerInformationString) -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-