|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IWSShopMgmt
Shop management interface for managing baskets and checking out.
| Method Summary | |
|---|---|
void |
__addTestPositionToBasket(String token,
String basketID)
Non-public API method for adding a test position to a basket. |
WSTBasket |
changeBasketPositionQuantity(String token,
String basketID,
int positionIndex,
long quantity)
Changes the quantity of a basket position. |
WSTCheckoutResult |
checkoutBasket(String token,
String basketID,
WSTPaymentMethod paymentMethodPreference,
WSTMap checkoutProperties)
Checks out a basket, performs the actual payment and fulfillment, and, depending on basket items, provides the caller with delivery information. |
WSTBasket |
getBasket(String token,
String basketID)
Gets the given basket of the current user. |
WSTBasket |
getNewBasket(String token,
String basketMarker)
Creates a new, empty basket, and returns it. |
WSTBasket |
getValidationBasket(String token,
String basketMarker)
Returns a validation basket. |
void |
refundCheckoutTransaction(String token,
String transactionID,
String comment)
Refunds the WSTCheckoutTransaction with the given ID. |
void |
refundReceipt(String token,
String receiptIdentifier,
String comment)
Refunds the receipt with the given identifier. |
void |
removeAllBasketPositions(String token,
String basketID)
Removes all basket positions from a basket. |
| Method Detail |
|---|
WSTBasket getBasket(String token,
@Nullable
String basketID)
throws WSException
null as basket ID, in which case the default basket will be returned. The default basket will change
on every checkout (the old default basket will be replaced with a new, empty basket.)
token - the session ID, must be != null and validbasketID - the basket ID, may be null to get the default basket
WSException - in an error occurs
WSTBasket getNewBasket(String token,
String basketMarker)
throws WSException
token - the session ID, must be != null and validbasketMarker - a basket marker, describing the client that wants to use the basket (i.e. "txtr-reader-basket")
WSException - in an error occurs
WSTBasket getValidationBasket(String token,
String basketMarker)
throws WSException
token - the session ID, must be != null and validbasketMarker - a basket marker, describing the client that wants to use the basket (i.e. "txtr-reader-basket")
WSException - in an error occurs
WSTBasket changeBasketPositionQuantity(String token,
@Nullable
String basketID,
int positionIndex,
long quantity)
throws WSException
token - the session ID, must be != null and validbasketID - the basket ID, may be null to get the default basketpositionIndex - the index of the position to be modified, starting with 0quantity - the new quantity, only 0 and 1 are supported. Set to 0 to remove the position
WSException - in an error occurs
void removeAllBasketPositions(String token,
@Nullable
String basketID)
throws WSException
token - the session ID, must be != null and validbasketID - the basket ID, may be null to get the default basket
WSException - in an error occurs
WSTCheckoutResult checkoutBasket(String token,
@Nullable
String basketID,
@Nullable
WSTPaymentMethod paymentMethodPreference,
@Nullable
WSTMap checkoutProperties)
throws WSException
token - the session ID, must be != null and validbasketID - the basket ID, may be null to check out the user's default basketpaymentMethodPreference - if non-null, payment will be attempted with the stated method. If null, checkout will use the authorized payment method of the user. If more
than one payment methods are authorized, the checkout process will choose one of these. If no payment method is authorized, or the preferred payment method is not
authorized, checkout will fail.checkoutProperties - see WSTCheckoutProperty
WSTCheckoutResult object describing if the checkout was successful and if not, where it failed and why.
WSException - in an error occurs
void __addTestPositionToBasket(String token,
String basketID)
throws WSException
token - the session ID, must be != null and validbasketID - the basket ID, may be null to get the default basket
WSException - in an error occurs
void refundReceipt(String token,
String receiptIdentifier,
String comment)
throws WSException
token - a valid tokenreceiptIdentifier - the identifier of the receipt to refundcomment - an arbitrary comment, e.g. the refund reason, may be null
WSException - if the user does not have the WSTRight.REFUND_RECEIPTS to refund receipts, the receipt identifier is invalid or the receipt with the given
identifier is not a WSTCheckoutTransaction or is already refunded
void refundCheckoutTransaction(String token,
String transactionID,
String comment)
throws WSException
WSTCheckoutTransaction with the given ID.
token - a valid tokentransactionID - the ID of the WSTCheckoutTransaction to refundcomment - an arbitrary comment, e.g. the refund reason, may be null
WSException - if the user does not have the WSTRight.REFUND_RECEIPTS to refund receipts, the transaction ID is invalid or the transaction with the given ID is
not a WSTCheckoutTransaction or is already refunded
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||