|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.shephertz.app42.paas.sdk.jme.shopping.CartService
public class CartService
This is Cloud Persistent Shopping Cart Service. App Developers can use this to create a Shopping Cart. Add Items and Check Out items. It also maintains the transactions and the corresponding Payment Status. The Payment Gateway interface is not provided by the Platform. It is left to the App developer how he wants to do the Payment Integration. This can be used along with Catalogue or used independently
Catalgoue
,
Cart
,
App42Response
,
ItemData
,
PaymentStatus
Constructor Summary | |
---|---|
CartService(java.lang.String apiKey,
java.lang.String secretKey,
java.lang.String baseURL)
Constructor that takes |
Method Summary | |
---|---|
Cart |
addItem(java.lang.String cartID,
java.lang.String itemID,
int itemQuantity,
double price)
Adds an Item in the Cart with quantity and price. |
Cart |
checkOut(java.lang.String cartID)
Checks out the Cart and put it in CheckOut Stage and returns the Transaction Id The transaction id has to be used in future to update the Payment Status. |
Cart |
createCart(java.lang.String user)
Creates a Cart Session for the specified User |
Cart |
decreaseQuantity(java.lang.String cartID,
java.lang.String itemID,
int itemQuantity)
To decrease quantity of existing item in the cart.. |
Cart |
getCartDetails(java.lang.String cartId)
Fetch Cart details. |
Cart |
getItem(java.lang.String cartId,
java.lang.String itemId)
Fetches the specified Item from the specified Cart |
Cart |
getItems(java.lang.String cartId)
Fetches the Items from the specified Cart |
Cart |
getPaymentByCart(java.lang.String cartId)
Fetches Payment information for the specified Cart Id |
java.util.Vector |
getPaymentHistoryAll()
History of all carts. |
java.util.Vector |
getPaymentHistoryByUser(java.lang.String userId)
History of Carts and Payments for a User. |
java.util.Vector |
getPaymentsByStatus(java.lang.String paymentStatus)
Fetches Payment information based on Status |
java.util.Vector |
getPaymentsByUser(java.lang.String userId)
Fetches Payment information for a User. |
java.util.Vector |
getPaymentsByUserAndStatus(java.lang.String userId,
java.lang.String paymentStatus)
Fetches Payment information based on User Id and Status |
Cart |
increaseQuantity(java.lang.String cartID,
java.lang.String itemID,
int itemQuantity)
To increase quantity of existing item in the cart. |
Cart |
isEmpty(java.lang.String cartId)
Checks whether the Cart is Empty or not |
Cart |
payment(java.lang.String cartID,
java.lang.String transactionID,
java.lang.String paymentStatus)
Update Payment Status of the Cart. |
App42Response |
removeAllItems(java.lang.String cartId)
Removes all Items from the specified Cart |
App42Response |
removeItem(java.lang.String cartId,
java.lang.String itemId)
Removes the specified item from the specified Cart |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CartService(java.lang.String apiKey, java.lang.String secretKey, java.lang.String baseURL)
apiKey
- secretKey
- baseURL
- Method Detail |
---|
public Cart addItem(java.lang.String cartID, java.lang.String itemID, int itemQuantity, double price) throws App42Exception
cartID
- - The Cart Id into which item has to be addeditemID
- - The Item id which has to be added in the cart. If the
Catalogue Service is used along with the Cart Service then the
Item ids should be same.itemQuantity
- - Quantity of the Item to be purchasedprice
- - Price of the item
App42Exception
public Cart checkOut(java.lang.String cartID) throws App42Exception
cartID
- - The cart id that has to be checkedOut.
App42Exception
public Cart createCart(java.lang.String user) throws App42Exception
user
- - User for whom Cart Session has to be created
App42Exception
public Cart decreaseQuantity(java.lang.String cartID, java.lang.String itemID, int itemQuantity) throws App42Exception
cartID
- - The Cart Id from where item quantity has to be reduceditemID
- - The Item id from where item quantity has to be reduced. If
the Catalogue Service is used along with the Cart Service then
the Item ids should be same.itemQuantity
- - Quantity of the Item has to be reduced
App42Exception
public Cart getCartDetails(java.lang.String cartId) throws App42Exception
cartId
- - The Cart Id that has to be fetched
App42Exception
public Cart getItem(java.lang.String cartId, java.lang.String itemId) throws App42Exception
cartId
- - The cart id from which item has to be fetcheditemId
- - The item for which the information has to be fetched
App42Exception
public Cart getItems(java.lang.String cartId) throws App42Exception
cartId
- - The cart id from which items have to be fetched
App42Exception
public Cart getPaymentByCart(java.lang.String cartId) throws App42Exception
cartID
- - Cart Id for which the payment information has to be fetched
App42Exception
public java.util.Vector getPaymentHistoryAll() throws App42Exception
App42Exception
public java.util.Vector getPaymentHistoryByUser(java.lang.String userId) throws App42Exception
userId
- - User Id for whom payment history has to be fetched
App42Exception
public java.util.Vector getPaymentsByStatus(java.lang.String paymentStatus) throws App42Exception
paymentStatus
- - Status of type which payment information has to be fetched
App42Exception
public java.util.Vector getPaymentsByUser(java.lang.String userId) throws App42Exception
userId
- - User Id for whom payment information has to be fetched
App42Exception
public java.util.Vector getPaymentsByUserAndStatus(java.lang.String userId, java.lang.String paymentStatus) throws App42Exception
userId
- - User Id for whom payment information has to be fetchedpaymentStatus
- - Status of type which payment information has to be fetched
App42Exception
public Cart increaseQuantity(java.lang.String cartID, java.lang.String itemID, int itemQuantity) throws App42Exception
cartID
- - The Cart Id into which item has to be addeditemID
- - The Item id which has to be added in the cart. If the
Catalogue Service is used along with the Cart Service then the
Item ids should be same.itemQuantity
- - Quantity of the Item to be purchased
App42Exception
public Cart isEmpty(java.lang.String cartId) throws App42Exception
cartId
- - The cart id to check for empty
App42Exception
public Cart payment(java.lang.String cartID, java.lang.String transactionID, java.lang.String paymentStatus) throws App42Exception
cartID
- - The cart id for which the payment status has to be updatedtransactionID
- - Transaction id for which the payment status has to be
updatedpaymentStatus
- - Payment Status to be updated. The probable values are
PaymentStatus.DECLINED, PaymentStatus.AUTHORIZED,
PaymentStatus.PENDING
App42Exception
public App42Response removeAllItems(java.lang.String cartId) throws App42Exception
cartId
- - The cart id from which items have to be removed
App42Exception
public App42Response removeItem(java.lang.String cartId, java.lang.String itemId) throws App42Exception
cartId
- - The cart id from which the item has to be removeditemId
- - Id of the Item which has to be removed
App42Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |