@RestResource(id="atg.commerce.order.restresources.CartPaymentGroupRestSubresource") public class CartPaymentGroupRestSubresource extends PaymentGroupRestSubresource implements UpdateableRestResource
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AMOUNT |
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
COMMERCE_ITEM_ID |
static java.lang.String |
PAYMENT_GROUP_ID |
static java.lang.String |
RELATIONSHIPS |
static java.lang.String |
SHIPPING_GROUP_ID |
ERR_PAYMENT_GROUP_NOT_FOUNDDEFAULT_PAGE_SIZE, mEmbeddedCommerceItemRelationshipName, mEmbeddedPaymentGroupRelationshipName, mEmbeddedShippingGroupRelationshipName, RESOURCE_NAME, sResourceBundleSERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
CartPaymentGroupRestSubresource() |
| Modifier and Type | Method and Description |
|---|---|
RepresentationModel |
addPaymentGroup(org.json.JSONObject pInputJson)
Add a new Payment Group to the current order.
|
java.lang.Object |
deletePaymentGroup(java.lang.String pPaymentGroupId)
Removes the paymentGroup from the current order based on the paymentGroupId.
|
CommerceProfileTools |
getCommerceProfileTools()
returns the property CommerceProfileTools
|
ShippingGroupManager |
getShippingGroupManager()
Returns the ShippingGroupManager
|
RepresentationModel |
relateToItems(org.json.JSONObject pInputJson)
Creates/modifies relationships between commerce items and payment groups, on the current order.
|
RepresentationModel |
relateToOrder(org.json.JSONObject pInputJson)
Creates/modifies relationships between payment groups and the current order.
|
RepresentationModel |
relateToShippingGroups(org.json.JSONObject pInputJson)
Creates/modifies relationships between payment groups and shipping groups, on the current order.
|
void |
setCommerceProfileTools(CommerceProfileTools pCommerceProfileTools)
Set property CommerceProfileTools
|
void |
setShippingGroupManager(ShippingGroupManager pShippingGroupManager)
Sets the ShippingGroupManager
|
java.net.URI |
update(atg.service.jaxrs.ResourceUpdateInfo pUpdateInfo)
Updates the PaymentGroups in the Cart.
|
protected void |
updateOrder(Order pOrder)
Updates the order
|
RepresentationModel |
updatePaymentGroup(java.lang.String pPaymentGroupId,
org.json.JSONObject pInputJson)
Updates a payment group associated with the current order
|
RepresentationModel |
updatePaymentGroups(org.json.JSONObject pInputJson)
This endpoint removes, updates or creates the payment groups as part of the collection update.
|
checkPaymentGroupIsAvailableForOrder, getOrderManager, getPaymentGroup, getPaymentGroup, getPaymentGroupManager, getPaymentGroups, setOrderManager, setPaymentGroupManageraddCreatedItemUri, buildMemberUris, getCartUri, getCreatedItemUri, getDefaultLimit, getEmbeddedCartRelationshipName, getEmbeddedCommerceItemRelationshipName, getEmbeddedPaymentGroupRelationshipName, getEmbeddedShippingGroupRelationshipName, getOrder, getRelationshipCreated, getRelationships, getRepresentationModelBuilder, getRepresentationModelBuilder, getRepresentationModelBuilderWithCart, getRepresentationModelBuilderWithCart, getRepresentationModelBuilderWithPaging, getSelfLink, setDefaultLimit, setEmbeddedCartRelationshipName, setEmbeddedCommerceItemRelationshipName, setEmbeddedPaymentGroupRelationshipName, setEmbeddedShippingGroupRelationshipNameaddLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService, toStringvlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitupdateEmbeddedResourcespublic static final java.lang.String CLASS_VERSION
public static final java.lang.String SHIPPING_GROUP_ID
public static final java.lang.String PAYMENT_GROUP_ID
public static final java.lang.String COMMERCE_ITEM_ID
public static final java.lang.String RELATIONSHIPS
public static final java.lang.String AMOUNT
public void setCommerceProfileTools(CommerceProfileTools pCommerceProfileTools)
pCommerceProfileTools - the value to set for property CommerceProfileToolspublic CommerceProfileTools getCommerceProfileTools()
public ShippingGroupManager getShippingGroupManager()
public void setShippingGroupManager(ShippingGroupManager pShippingGroupManager)
pShippingGroupManager - new ShippingGroupManager@Endpoint(id="/paymentGroups#POST", validatorId="paymentGroups.id-FullWithCart", updateTarget=true) public RepresentationModel addPaymentGroup(org.json.JSONObject pInputJson) throws RestException, CommerceException
pInputJson - A JSONObject that contains the PaymentGroupType (type - eg cash, creditCard)
and subsequent details that are specific for that particular typeRestException - if an internal error occurs while adding a new PaymentGroupCommerceException - if an internal error occurs while adding a new PaymentGroup@Endpoint(id="/paymentGroups/{paymentGroupId}#DELETE", isSingular=true, filterId="paymentGroups-Delete") public java.lang.Object deletePaymentGroup(java.lang.String pPaymentGroupId) throws RestException, CommerceException
pPaymentGroupId - Id of the paymentGroup to be removed from the current orderRestException - if any internal error occurs while removing the paymentGroupCommerceException - if any error removing the paymentGroup from the current order@PATCH @Endpoint(id="/paymentGroups/{paymentGroupId}#PATCH", isSingular=true, validatorId="paymentGroups.id-Full", filterId="paymentGroups.id-Full", updateTarget=true) public RepresentationModel updatePaymentGroup(java.lang.String pPaymentGroupId, org.json.JSONObject pInputJson) throws RestException, CommerceException
pPaymentGroupId - the id of the payment group to updatepInputJson - representation of payment group updates to applyCommerceException - if a problem occurred whilst updating the payment groupRestException - if an internal error occurred whilst updating the payment group@PATCH @Endpoint(id="/paymentGroups#PATCH", validatorId="paymentGroups-Full", filterId="paymentGroups-DefaultWithCart", updateTarget=true) public RepresentationModel updatePaymentGroups(org.json.JSONObject pInputJson) throws RestException, CommerceException
pInputJson - representation of payment groupsRestException - if an internal error occurred whilst updating the payment groups in the orderCommerceException - if an internal error occurred whilst updating the payment groups in the order@Endpoint(id="paymentGroups/relateToShippingGroups#POST", validatorId="paymentGroups.relateToShippingGroups", filterId="paymentGroups-DefaultWithCart", updateTarget=true) public RepresentationModel relateToShippingGroups(org.json.JSONObject pInputJson) throws RestException, CommerceException
{
"relationships" : [
{
"paymentGroupId" : "pg1234",
"shippingGroupId" : "sg1234",
"amount" : 21.55
},
{
"paymentGroupId" : "pg3337",
"shippingGroupId" : "sg6658",
"amount" : 1.99
},
...
]
}
pInputJson - A JSONObject that contains the relationships to setup/modify.RestException - if an error with the input data, e.g. missing dataCommerceException - if any internal error occurs while creating/updating relationships@Endpoint(id="paymentGroups/relateToOrder#POST", validatorId="paymentGroups.relateToOrder", filterId="paymentGroups-DefaultWithCart", updateTarget=true) public RepresentationModel relateToOrder(org.json.JSONObject pInputJson) throws RestException, CommerceException
{
"relationships" : [
{
"paymentGroupId" : "pg1234",
"amount" : 21.55
},
{
"paymentGroupId" : "pg3337",
"amount" : -1.0
},
...
]
}
pInputJson - A JSONObject that contains the relationships to setup/modify.RestException - if an error with the input data, e.g. missing dataCommerceException - if any internal error occurs while creating/updating relationships@Endpoint(id="paymentGroups/relateToItems#POST", validatorId="paymentGroups.relateToItems", filterId="paymentGroups-DefaultWithCart", updateTarget=true) public RepresentationModel relateToItems(org.json.JSONObject pInputJson) throws RestException, CommerceException
{
"relationships" : [
{
"commerceItemId" : "ci6544",
"paymentGroupId" : "pg1234",
"amount" : 2.50
},
{
"commerceItemId" : "ci4444",
"paymentGroupId" : "pg3337",
"amount" : 0.0
},
...
]
}
pInputJson - A JSONObject that contains the relationships to setup/modify.RestException - if an error with the input data, e.g. missing dataCommerceException - if any internal error occurs while creating/updating relationshipspublic java.net.URI update(atg.service.jaxrs.ResourceUpdateInfo pUpdateInfo)
throws RestException
update in interface UpdateableRestResourcepUpdateInfo - - update object containing request input and any existing
repository (payment groups) data to be updatedRestException - - if an issue occurs performing the updateprotected void updateOrder(Order pOrder) throws CommerceException
pOrder - the current order to be updatedCommerceException - if an error occurs while updating the Order