Examples of CatalogUploadAddModifyDelete


Examples of uk.co.purebuy.commerce.businessobjects.importexport.playtrade.dom.CatalogUploadAddModifyDelete

   */
  public static void main(String[] args) throws IOException,
      PlayTradeApiCallException
  {
    // create the feed
    CatalogUploadAddModifyDelete feed = new CatalogUploadAddModifyDelete();

    // Add the header row
    feed.setHeader(new CatalogUploadAddModifyDeleteRow(true));

    // Create and add some Catalog Data to the feed
    // create a data row for each product
    CatalogUploadAddModifyDeleteRow row = new CatalogUploadAddModifyDeleteRow();
    row.setProductId("upc_ean_code");
    row.setProductIdType(CatalogUploadAddModifyDelete.ProductIDTypeCode.UPC_EAN);
    row.setSku("my_sku_code");
    row.setDeliveredPriceGBP("19.99");
    row.setDeliveredPriceEuro("26,99");
    row.setQuantity("97");
    row.setItemCondition(CatalogUploadModifyOnly.ItemConditionCode.NEW
        .toString());
    row.setAddDelete(CatalogUploadAddModifyDelete.AddModifyDelete.ADD_OR_MODIFY);
    row.setComment("This is a great product");
    row.setDispatchFrom(DispatchFromCode.UK);
    row.setDispatchTo(DispatchToCode.UK_ONLY);

    // add the product data row to the feed
    feed.addRowData(row);

    // create the feed file
    File batchfile = feed.createTempFile();
    feed.writeCSVFile(batchfile);

    // submit the feed file to the playtrade API
    CatalogUploadAddModifyDeleteCall call = new CatalogUploadAddModifyDeleteCall();
    call.setUsername("user@email.com");
    call.setPassword("password");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.