String user = "Nick";
App42Callback requestCallback = this; /* This function used the App42Callback interface */
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.BuildCartService();
cartService.CreateCart(user,requestCallback);
OnSuccess(Object obj)
{
Cart cart = (Cart) obj;
String jsonResponse = cart.ToString();
}
public class CallBack : App42Callback
{
public override void OnSuccess(Object obj)
{
Cart cart = (Cart) obj;
//Do whatever you want with the object
}
public override void OnException(App42Exception e)
{
//Do whatever you want with the exception
}
}
String user = "Nick";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.buildCartService();
Cart cart = cartService.createCart(user);
String jsonResponse = cart.toString();
String user = "Nick";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.buildCartService();
Cart cart = cartService.createCart(user);
String jsonResponse = cart.toString();
NSString *user = @"Nick"; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; CartService *cartService = [serviceAPIObj buildCartService]; Cart *cart = [cartService createCart:cartName]; NSString *jsonResponse = [cart toString];
String user = "Nick";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.buildCartService();
Cart cart = cartService.createCart(user);
String jsonResponse = cart.toString();
String user = "Nick";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.BuildCartService();
Cart cart = cartService.CreateCart(user);
String jsonResponse = cart.ToString();
user = "Nick";
api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>");
cartService = api.buildCartService();
cart = cartService.create_cart(user);
jsonResponse = cart.to_s();
The request format for createCart is
URL : https://api.shephertz.com/cloud/1.0/cart
Method : POST
QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP>
Accept : application/json
Content-Type : application/json
Body : {"app42": {"cart": {"userName": "Nick"}}}
Coming Soon...
$user = "Nick";
$api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
$cartService = $api->buildCartService();
$cart = $cartService->createCart($user);
$jsonResponse = $cart->toString();
String cartID = "******************";
String itemID = "ItemID01";
int itemQuantity = 12;
double price = 1000;
App42Callback requestCallback = this; /* This function used the App42Callback interface */
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.BuildCartService();
cartService.AddItem(cartID, itemID, itemQuantity, price,requestCallback);
OnSuccess(Object obj)
{
Cart cart = (Cart) obj;
String jsonResponse = cart.ToString();
}
public class CallBack : App42Callback
{
public override void OnSuccess(Object obj)
{
Cart cart = (Cart) obj;
//Do whatever you want with the object
}
public override void OnException(App42Exception e)
{
//Do whatever you want with the exception
}
}
String cartID = "******************";
String itemID = "ItemID01";
int itemQuantity = 12;
double price = 1000;
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.buildCartService();
Cart cart = cartService.addItem(cartID, itemID, itemQuantity, price);
String jsonResponse = cart.toString();
String cartID = "******************";
String itemID = "ItemID01";
int itemQuantity = 12;
double price = 1000;
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.buildCartService();
Cart cart = cartService.addItem(cartID, itemID, itemQuantity, price);
String jsonResponse = cart.toString();
NSString *cartID = @"******************"; NSString *itemID = @"ItemID01"; int itemQuantity = 12; double price = 1000; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; CartService *cartService = [serviceAPIObj buildCartService]; Cart *cart = [cartService addItem:cartID itemID:itemID itemQuantity:itemQuantity price:price]; NSString *jsonResponse = [cart toString];
String cartID = "******************";
String itemID = "ItemID01";
int itemQuantity = 12;
double price = 1000;
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.buildCartService();
Cart cart = cartService.addItem(cartID, itemID, itemQuantity, price);
String jsonResponse = cart.toString();
String cartID = "******************";
String itemID = "ItemID01";
Int64 itemQuantity = 12;
Double price = 1000;
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.BuildCartService();
Cart cart = cartService.AddItem(cartID, itemID, itemQuantity, price);
String jsonResponse = cart.ToString();
cartID = "******************";
itemID = "ItemID01";
itemQuantity = 12;
price = 1000;
api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>");
cartService = api.buildCartService();
cart = cartService.add_item(cartID, itemID, itemQuantity, price);
jsonResponse = cart.to_s();
The request format for addItem is
URL : https://api.shephertz.com/cloud/1.0/cart/item/{itemID}
Method : POST
QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP>
Accept : application/json
Content-Type : application/json
Body : {"app42": {"cart": {"item": {"quantity": 12,"totalAmount": 12000}"cartId": "******************"}}}
Coming Soon...
$cartID = "******************";
$itemID = "ItemID01";
$itemQuantity = 12;
$price = 1000;
$api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
$cartService = $api->buildCartService();
$cart = $cartService->addItem($cartID, $itemID, $itemQuantity, $price);
$jsonResponse = $cart->toString();
String cartID = "******************";
App42Callback requestCallback = this; /* This function used the App42Callback interface */
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.BuildCartService();
cartService.CheckOut(cartID,requestCallback);
OnSuccess(Object obj)
{
Cart cart = (Cart) obj;
String jsonResponse = cart.ToString();
}
public class CallBack : App42Callback
{
public override void OnSuccess(Object obj)
{
Cart cart = (Cart) obj;
//Do whatever you want with the object
}
public override void OnException(App42Exception e)
{
//Do whatever you want with the exception
}
}
String cartID = "******************";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.buildCartService();
Cart cart = cartService.checkOut(cartID);
String jsonResponse = cart.toString();
String cartID = "******************";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.buildCartService();
Cart cart = cartService.checkOut(cartID);
String jsonResponse = cart.toString();
NSString *cartID = @"******************"; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; CartService *cartService = [serviceAPIObj buildCartService]; Cart *cart = [cartService checkOut:cartID]; NSString *jsonResponse = [cart toString];
String cartID = "******************";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.buildCartService();
Cart cart = cartService.checkOut(cartID);
String jsonResponse = cart.toString();
String cartID = "******************";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
CartService cartService = api.BuildCartService();
Cart cart = cartService.CheckOut(cartID);
String jsonResponse = cart.ToString();
artID = "******************";
api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>");
cartService = api.buildCartService();
cart = cartService.check_out(cartID);
jsonResponse = cart.to_s();
The request format for checkOut is
URL : https://api.shephertz.com/cloud/1.0/cart/checkOut
Method : PUT
QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP>
Accept : application/json
Content-Type : application/json
Body : {"app42": {"cart": {"cartId": "******************"}}}
Coming Soon...
$cartID = "******************";
$api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
$cartService = $api->buildCartService();
$cart = $cartService->checkOut($cartID);
$jsonResponse = $cart->toString();