public class

MagentoCloudConnector

extends Object
java.lang.Object
   ↳ org.mule.module.magento.MagentoCloudConnector
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Magento is a feature-rich eCommerce platform built on open-source technology that provides online merchants with great and control over the look, content and functionality of their eCommerce store.

Summary

Fields
private MagentoCatalogClient<MagentoException> catalogClient
private MagentoCustomerClient<MagentoException> customerClient
private MagentoDirectoryClient<MagentoException> directoryClient
private MagentoInventoryClient<MagentoException> inventoryClient
private MagentoOrderClient<MagentoException> orderClient
private String serverAddress The address to access Magento Web Services
private MagentoShoppingCartClient<MagentoException> shoppingCartClient
private String user
Public Constructors
MagentoCloudConnector()
Public Methods
void addCategoryProduct(int categoryId, Integer productId, String productSku, String productIdOrSku, String position)
Assign product to category.
void addOrderComment(String orderId, String status, String comment, boolean sendEmail)
Adds a comment to the given order id

void addOrderInvoiceComment(String invoiceId, String comment, boolean sendEmail, boolean includeCommentInEmail)
Adds a comment to the given order's invoice

void addOrderShipmentComment(String shipmentId, String comment, boolean sendEmail, boolean includeCommentInEmail)
Adds a comment to the shipment.
int addOrderShipmentTrack(String shipmentId, String carrierCode, String title, String trackId)
Adds a new tracking number

void addProductLink(String type, Integer productId, String productSku, String productIdOrSku, String linkedProductIdOrSku, CatalogProductLinkEntity productLinkEntity)
Links two products, given its source and destination productIdOrSku.
boolean addShoppingCartCoupon(int quoteId, String couponCode, String storeId)
Adds a coupon code for a shopping cart (quote).
boolean addShoppingCartProduct(int quoteId, List<ShoppingCartProductEntity> products, String storeId)
Adds one or more products to the shopping cart (quote).
void cancelOrder(String orderId)
Cancels an order

void cancelOrderInvoice(String invoiceId)
Cancels an order's invoice

void captureOrderInvoice(String invoiceId)
Captures and invoice

String connectionId()
int createCategory(int parentId, CatalogCategoryEntityCreate catalogCategoryEntity, String storeViewIdOrCode)
Creates a new category.
int createCustomer(CustomerCustomerEntityToCreate customer)
Creates a customer with the given attributes

int createCustomerAddress(int customerId, CustomerAddressEntityCreate customerAddress)
Creates a new address for the given customer using the given address attributes

String createOrderInvoice(String orderId, List<OrderItemIdQty> itemsQuantities, String comment, boolean sendEmail, boolean includeCommentInEmail)
Creates an invoice for the given order

String createOrderShipment(String orderId, List<OrderItemIdQty> itemsQuantities, String comment, boolean sendEmail, boolean includeCommentInEmail)
Creates a shipment for order

int createProduct(String type, int set, String sku, CatalogProductCreateEntity attributes, List<AssociativeEntity> additionalAttributes, String storeViewIdOrCode)
Creates a new product

String createProductAttributeMedia(Integer productId, String productSku, String productIdOrSku, CatalogProductAttributeMediaCreateEntity catalogProductAttributeMediaEntity, String storeViewIdOrCode, Object payload, MediaMimeType mimeType, String baseFileName)
Creates a new product media.
int createShoppingCart(String storeId)
Creates an empty shopping cart.
String createShoppingCartOrder(int quoteId, String storeId, List<String> licenses)
Creates an order from a shopping cart (quote).
boolean deleteCategory(int categoryId)
Deletes a category.
boolean deleteCategoryProduct(int categoryId, Integer productId, String productSku, String productIdOrSku)
Remove a product assignment.
boolean deleteCustomer(int customerId)
Deletes a customer given its id

boolean deleteCustomerAddress(int addressId)
Deletes a Customer Address

int deleteOrderShipmentTrack(String shipmentId, String trackId)
Deletes the given track of the given order's shipment

int deleteProduct(Integer productId, String productSku, String productIdOrSku)
Deletes a product.
int deleteProductAttributeMedia(Integer productId, String productSku, String productIdOrSku, String fileName)
Removes a product image.
String deleteProductLink(String type, Integer productId, String productSku, String productIdOrSku, String linkedProductIdOrSku)
Deletes a product's link.
void disconnect()
int getCatalogCurrentStoreView()
Answers the current default catalog store view id for this session

CatalogCategoryInfo getCategory(int categoryId, String storeViewIdOrCode, List<String> attributeNames)
Answers category attributes.
CatalogCategoryTree getCategoryTree(String parentId, String storeViewIdOrCode)
Answers the category tree.
CustomerCustomerEntity getCustomer(int customerId, List<String> attributeNames)
Answers customer attributes for the given id.
CustomerAddressEntityItem getCustomerAddress(int addressId)
Answers the customer address attributes

ShoppingCartInfoEntity getInfoShoppingCart(int quoteId, String storeId)
Retrieves full information about the shopping cart (quote).
SalesOrderEntity getOrder(String orderId)
Answers the order properties for the given orderId

SalesOrderInvoiceEntity getOrderInvoice(String invoiceId)
Retrieves order invoice information

SalesOrderShipmentEntity getOrderShipment(String shipmentId)
Retrieves the order shipment attributes

List<Carrier> getOrderShipmentCarriers(String orderId)
Retrieves the order shipment carriers.
CatalogProductReturnEntity getProduct(Integer productId, String productSku, String productIdOrSku, String storeViewIdOrCode, List<String> attributesNames, List<String> additionalAttributeNames)
Answers a product's specified attributes.
CatalogProductImageEntity getProductAttributeMedia(Integer productId, String productSku, String productIdOrSku, String fileName, String storeViewIdOrCode)
Lists linked products to the given product and for the given link type.
CatalogProductReturnEntity getProductSpecialPrice(Integer productId, String productSku, String productIdOrSku, String storeViewIdOrCode)
Answers a product special price.
String getServerAddress()
String getUser()
void holdOrder(String orderId)
Puts order on hold.
void initialiseConnector(String username, String password, String address)
List<CatalogAttributeOptionEntity> listCategoryAttributeOptions(String attributeId, String storeViewIdOrCode)
Retrieves attribute options.
List<CatalogAttributeEntity> listCategoryAttributes()
Retrieve product image types.
List<CatalogCategoryEntityNoChildren> listCategoryLevels(String website, String storeViewIdOrCode, String parentCategoryId)
Answers levels of categories for a website, store view and parent category

List<CatalogAssignedProduct> listCategoryProducts(int categoryId)
Lists product of a given category.
List<CustomerAddressEntityItem> listCustomerAddresses(int customerId)
Lists the customer address for a given customer id

List<CustomerGroupEntity> listCustomerGroups()
Lists all the customer groups

List<CustomerCustomerEntity> listCustomers(String filter)
Answers a list of customer attributes for the given filter expression.
List<DirectoryCountryEntity> listDirectoryCountries()
Answers the list of countries

List<DirectoryRegionEntity> listDirectoryRegions(String countryId)
Answers a list of regions for the given county

List<CatalogInventoryStockItemEntity> listInventoryStockItems(List<String> productIdOrSkus)
Lists inventory stock items.
List<SalesOrderListEntity> listOrders(String filter)
Lists order attributes that match the given filtering expression.
List<SalesOrderInvoiceEntity> listOrdersInvoices(String filter)
Lists order invoices that match the given filtering expression

List<SalesOrderShipmentEntity> listOrdersShipments(String filter)
Lists order shipment atrributes that match the given optional filtering expression

List<CatalogProductImageEntity> listProductAttributeMedia(Integer productId, String productSku, String productIdOrSku, String storeViewIdOrCode)
Retrieves product image list.
List<CatalogProductAttributeMediaTypeEntity> listProductAttributeMediaTypes(int setId)
Retrieve product image types.
List<CatalogAttributeOptionEntity> listProductAttributeOptions(String attributeId, String storeViewIdOrCode)
Answers the product attribute options.
List<CatalogProductAttributeSetEntity> listProductAttributeSets()
Retrieves product attribute sets.
List<CatalogProductTierPriceEntity> listProductAttributeTierPrices(Integer productId, String productSku, String productIdOrSku)
Retrieve product tier prices.
List<CatalogAttributeEntity> listProductAttributes(int setId)
Retrieves product attributes list.
List<CatalogProductLinkEntity> listProductLink(String type, Integer productId, String productSku, String productIdOrSku)
Lists linked products to the given product and for the given link type

List<CatalogProductLinkAttributeEntity> listProductLinkAttributes(String type)
Lists all the attributes for the given product link type

List<String> listProductLinkTypes()
Answers product link types

List<CatalogProductTypeEntity> listProductTypes()
Answers product types.
List<CatalogProductEntity> listProducts(String filter, String storeViewIdOrCode)
Retrieve products list by filters.
List<ShoppingCartLicenseEntity> listShoppingCartLicenses(int quoteId, String storeId)
Retrieves the website license agreement for the quote according to the website (store).
ShoppingCartPaymentMethodResponseEntityArray listShoppingCartPaymentMethods(int quoteId, String storeId)
Retrieves a list of available payment methods for a shopping cart (quote).
List<CatalogProductEntity> listShoppingCartProducts(int quoteId, String storeId)
Retrieves the list of products in the shopping cart (quote).
List<ShoppingCartShippingMethodEntity> listShoppingCartShippingMethods(int quoteId, String storeId)
Retrieves the list of available shipping methods for a shopping cart (quote).
List<ShoppingCartTotalsEntity> listShoppingCartTotals(int quoteId, String storeId)
Retrieves total prices for a shopping cart (quote).
List<CatalogInventoryStockItemEntity> listStockItems(List<String> productIdOrSkus)
Retrieve stock data by product ids

void moveCategory(int categoryId, int parentId, String afterId)
Move category in tree.
boolean moveShoppingCartProductToCustomerQuote(int quoteId, List<ShoppingCartProductEntity> products, String storeId)
Moves products from the current quote to a customer quote.
boolean removeShoppingCartCoupon(int quoteId, String storeId)
Removes a coupon code from a shopping cart (quote).
boolean removeShoppingCartProduct(int quoteId, List<ShoppingCartProductEntity> products, String storeId)
Removes one or several products from a shopping cart (quote).
void setCatalogClient(MagentoCatalogClient<?> catalogClient)
void setCustomerClient(MagentoCustomerClient<?> customerClient)
void setDirectoryClient(MagentoDirectoryClient<?> directoryClient)
void setInventoryClient(MagentoInventoryClient<?> inventoryClient)
void setOrderClient(MagentoOrderClient<?> magentoOrderClient)
void setServerAddress(String serverAddress)
void setShoppingCartClient(MagentoShoppingCartClient<?> catalogClient)
boolean setShoppingCartCustomer(int quoteId, ShoppingCartCustomerEntity customer, String storeId)
Adds information about the customer to a shopping cart (quote).
boolean setShoppingCartCustomerAddresses(int quoteId, List<ShoppingCartCustomerAddressEntity> shoppingCartCustomerAddresses, String storeId)
Sets the customer addresses in the shopping cart (quote).
boolean setShoppingCartPaymentMethod(int quoteId, ShoppingCartPaymentMethodEntity shoppingCartPaymentMethod, String storeId)
Sets a payment method for a shopping cart (quote), cart must not be empty.
boolean setShoppingCartShippingMethod(int quoteId, String method, String storeId)
Retrieves a shipping method for a shopping cart (quote).
void setUser(String user)
void unholdOrder(String orderId)
Releases order

void updateCategory(int categoryId, CatalogCategoryEntityCreate catalogCategoryEntity, String storeViewIdOrCode)
Updates a category.
void updateCategoryAttributeStoreView(String storeViewIdOrCode)
Set the default catalog store view for this session

void updateCategoryProduct(int categoryId, Integer productId, String productSku, String productIdOrSku, String position)
Updates a category product.
void updateCustomer(int customerId, CustomerCustomerEntityToCreate customer)
Updates the given customer attributes, for the given customer id.
void updateCustomerAddress(int addressId, CustomerAddressEntityCreate customerAddress)
Updates the given map of customer address attributes, for the given customer address

void updateInventoryStockItem(Integer productId, String productSku, String productIdOrSku, CatalogInventoryStockItemUpdateEntity catalogInventoryStockItem)
Updates an stock inventory item

void updateProduct(Integer productId, String productSku, String productIdOrSku, CatalogProductCreateEntity catalogProductEntity, List<AssociativeEntity> additionalAttributes, String storeViewIdOrCode)
Updates a product.
void updateProductAttributeMedia(Integer productId, String productSku, String productIdOrSku, String fileName, CatalogProductAttributeMediaCreateEntity catalogProductAttributeMediaEntity, String storeViewIdOrCode)
Updates product media.
void updateProductAttributeTierPrice(Integer productId, String productSku, String productIdOrSku, CatalogProductTierPriceEntity catalogProductTierPriceEntity)
Updates a single product tier price.
void updateProductLink(String type, Integer productId, String productSku, String productIdOrSku, String linkedProductIdOrSku, CatalogProductLinkEntity catalogProductLinkEntity)
Update product link

void updateProductSpecialPrice(Integer productId, String productSku, String productIdOrSku, String specialPrice, String fromDate, String toDate, String storeViewIdOrCode)
Sets a product special price.
boolean updateShoppingCartProduct(int quoteId, List<ShoppingCartProductEntity> products, String storeId)
Updates one or several products in the shopping cart (quote).
void updateStockItem(String productIdOrSku, CatalogInventoryStockItemUpdateEntity stockItem)
Update product stock data given its id or sku

boolean validateConnection()
void voidOrderInvoice(String invoiceId)
Voids an invoice

[Expand]
Inherited Methods
From class java.lang.Object

Fields

private MagentoCatalogClient<MagentoException> catalogClient

private MagentoCustomerClient<MagentoException> customerClient

private MagentoDirectoryClient<MagentoException> directoryClient

private MagentoInventoryClient<MagentoException> inventoryClient

private MagentoOrderClient<MagentoException> orderClient

private String serverAddress

The address to access Magento Web Services

private MagentoShoppingCartClient<MagentoException> shoppingCartClient

private String user

Public Constructors

public MagentoCloudConnector ()

Public Methods

public void addCategoryProduct (int categoryId, Integer productId, String productSku, String productIdOrSku, String position)

Assign product to category. See catalog-category-assignProduct SOAP method

Parameters
categoryId The category where the given product will be added
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
position The position of this product

public void addOrderComment (String orderId, String status, String comment, boolean sendEmail)

Adds a comment to the given order id

Parameters
orderId The order id
status The comment status
comment The comment
sendEmail If an email must be sent after shipment creation

public void addOrderInvoiceComment (String invoiceId, String comment, boolean sendEmail, boolean includeCommentInEmail)

Adds a comment to the given order's invoice

Parameters
invoiceId The invoice id
comment The comment to add
sendEmail If an email must be sent after shipment creation
includeCommentInEmail If the comment must be sent in the email

public void addOrderShipmentComment (String shipmentId, String comment, boolean sendEmail, boolean includeCommentInEmail)

Adds a comment to the shipment.

Parameters
shipmentId The shipment's increment id
comment The comment to add
sendEmail If an email must be sent after shipment creation
includeCommentInEmail If the comment must be sent in the email

public int addOrderShipmentTrack (String shipmentId, String carrierCode, String title, String trackId)

Adds a new tracking number

Parameters
shipmentId The shipment id
carrierCode The new track's carrier code
title The new track's title
trackId The new track's id
Returns
  • the new track's id

public void addProductLink (String type, Integer productId, String productSku, String productIdOrSku, String linkedProductIdOrSku, CatalogProductLinkEntity productLinkEntity)

Links two products, given its source and destination productIdOrSku.

Parameters
type The product type
productId The id of the source product. Use it instead of productIdOrSku in case you are sure the source product identifier is a product id
productSku The sku of the source product. Use it instead of productIdOrSku in case you are sure the source product identifier is a product sku
productIdOrSku The id or sku of the source product.
linkedProductIdOrSku The destination product id or sku.
productLinkEntity The link attributes

public boolean addShoppingCartCoupon (int quoteId, String couponCode, String storeId)

Adds a coupon code for a shopping cart (quote). The shopping cart must not be empty. The shopping cart must be created with a storeId for this operation to work.

Parameters
quoteId Shopping Cart ID (quote ID)
couponCode Coupon code
storeId Store view ID or code
Returns
  • True if the coupon code is added

public boolean addShoppingCartProduct (int quoteId, List<ShoppingCartProductEntity> products, String storeId)

Adds one or more products to the shopping cart (quote).

Parameters
quoteId Shopping Cart ID (quote ID)
products Products data
storeId Store view ID or code
Returns
  • True on success (if the product is added to the shopping cart)

public void cancelOrder (String orderId)

Cancels an order

Parameters
orderId The order to cancel

public void cancelOrderInvoice (String invoiceId)

Cancels an order's invoice

Parameters
invoiceId The invoice id

public void captureOrderInvoice (String invoiceId)

Captures and invoice

Parameters
invoiceId The invoice to capture

public String connectionId ()

public int createCategory (int parentId, CatalogCategoryEntityCreate catalogCategoryEntity, String storeViewIdOrCode)

Creates a new category. See catalog-category-create SOAP method.

Parameters
parentId The parent category id
catalogCategoryEntity The new category attributes
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store
Returns
  • the new category id

public int createCustomer (CustomerCustomerEntityToCreate customer)

Creates a customer with the given attributes

Parameters
customer The attributes of the new customer
Returns
  • the new customer id

public int createCustomerAddress (int customerId, CustomerAddressEntityCreate customerAddress)

Creates a new address for the given customer using the given address attributes

Parameters
customerId The customer
customerAddress The address attributes
Returns
  • a new customer address id

public String createOrderInvoice (String orderId, List<OrderItemIdQty> itemsQuantities, String comment, boolean sendEmail, boolean includeCommentInEmail)

Creates an invoice for the given order

Parameters
orderId The id of the order
itemsQuantities OrderItemId quantity
comment An optional comment
sendEmail If an email must be sent after shipment creation
includeCommentInEmail If the comment must be sent in the email
Returns
  • the new invoice's id

public String createOrderShipment (String orderId, List<OrderItemIdQty> itemsQuantities, String comment, boolean sendEmail, boolean includeCommentInEmail)

Creates a shipment for order

Parameters
orderId The order increment id
itemsQuantities OrderItemId quantity
comment An optional comment
sendEmail If an email must be sent after shipment creation
includeCommentInEmail If the comment must be sent in the email
Returns
  • the new shipment's id

public int createProduct (String type, int set, String sku, CatalogProductCreateEntity attributes, List<AssociativeEntity> additionalAttributes, String storeViewIdOrCode)

Creates a new product

Parameters
type The new product's type
set The new product's set
sku The new product's sku
attributes The standard attributes of the new product
additionalAttributes The non standard attributes of the new product
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store
Returns
  • the new product's id

public String createProductAttributeMedia (Integer productId, String productSku, String productIdOrSku, CatalogProductAttributeMediaCreateEntity catalogProductAttributeMediaEntity, String storeViewIdOrCode, Object payload, MediaMimeType mimeType, String baseFileName)

Creates a new product media. See catalog-product-attribute-media-create SOAP method.

Parameters
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
catalogProductAttributeMediaEntity The media attributes
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store
payload The image to upload. It may be a file, an input stream or a byte array
mimeType The mimetype
baseFileName The base name of the new remote image
Returns
  • the new image filename
Throws
FileNotFoundException when the payload object is not a valid file

public int createShoppingCart (String storeId)

Creates an empty shopping cart. Store Id is optional, but some operations may not work correctly if isn't given in the cart creation.

Parameters
storeId Store view ID or code
Returns
  • ID of the created empty shopping cart

public String createShoppingCartOrder (int quoteId, String storeId, List<String> licenses)

Creates an order from a shopping cart (quote).

Parameters
quoteId Shopping Cart ID (quote ID)
storeId Store view ID or code
licenses Website license ID
Returns
  • result code of order creation

public boolean deleteCategory (int categoryId)

Deletes a category. See catalog-category-delete SOAP method

Parameters
categoryId The category to delete
Returns
  • if the category is deleted

public boolean deleteCategoryProduct (int categoryId, Integer productId, String productSku, String productIdOrSku)

Remove a product assignment. See catalog-category-removeProduct SOAP method.

Parameters
categoryId The category to delete
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
Returns
  • if the product is removed from the category

public boolean deleteCustomer (int customerId)

Deletes a customer given its id

Parameters
customerId The customer to delete
Returns
  • if the customer is deleted

public boolean deleteCustomerAddress (int addressId)

Deletes a Customer Address

Parameters
addressId The address id to delete
Returns
  • if the customer address is deleted

public int deleteOrderShipmentTrack (String shipmentId, String trackId)

Deletes the given track of the given order's shipment

Parameters
shipmentId The target shipment id
trackId The id of the track to delete
Returns
  • if the tracking number is removed from the shipment

public int deleteProduct (Integer productId, String productSku, String productIdOrSku)

Deletes a product. See catalog-product-delete SOAP method.

Parameters
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
Returns
  • if the product is deleted

public int deleteProductAttributeMedia (Integer productId, String productSku, String productIdOrSku, String fileName)

Removes a product image. See catalog-product-attribute-media-remove SOAP method.

Parameters
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
fileName The remote media file to delete
Returns
  • if the image is removed from a product

public String deleteProductLink (String type, Integer productId, String productSku, String productIdOrSku, String linkedProductIdOrSku)

Deletes a product's link.

Parameters
type Link type
productId The id of the source product. Use it instead of productIdOrSku in case you are sure the source product identifier is a product id
productSku The sku of the source product. Use it instead of productIdOrSku in case you are sure the source product identifier is a product sku
productIdOrSku The id or sku of the source product.
linkedProductIdOrSku The linked product id or sku
Returns
  • if the link is removed from a product

public void disconnect ()

public int getCatalogCurrentStoreView ()

Answers the current default catalog store view id for this session

Returns
  • the current default store view id

public CatalogCategoryInfo getCategory (int categoryId, String storeViewIdOrCode, List<String> attributeNames)

Answers category attributes. See catalog-category-info SOAP method.

Parameters
categoryId The category whose attributes will be retrieved
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store
attributeNames The category attributes that will be retrieved
Returns
  • the category attributes

public CatalogCategoryTree getCategoryTree (String parentId, String storeViewIdOrCode)

Answers the category tree. See catalog-category-tree SOAP method.

Parameters
parentId The parent id
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store
Returns
  • a category tree attributes

public CustomerCustomerEntity getCustomer (int customerId, List<String> attributeNames)

Answers customer attributes for the given id. Only the selected attributes are retrieved

Parameters
customerId The id of the customer to retrieve
attributeNames The attributes to retrieve. Not empty
Returns
  • the attributes map

public CustomerAddressEntityItem getCustomerAddress (int addressId)

Answers the customer address attributes

Parameters
addressId The id of the address
Returns
  • the customer address attributes map

public ShoppingCartInfoEntity getInfoShoppingCart (int quoteId, String storeId)

Retrieves full information about the shopping cart (quote).

Parameters
quoteId Shopping cart ID (quote ID)
storeId Store view ID or code
Returns
  • shopping cart info

public SalesOrderEntity getOrder (String orderId)

Answers the order properties for the given orderId

Parameters
orderId The order whose properties to fetch
Returns
  • a string-object map of order properties

public SalesOrderInvoiceEntity getOrderInvoice (String invoiceId)

Retrieves order invoice information

Parameters
invoiceId The target invoiceId
Returns
  • the invoice attributes

public SalesOrderShipmentEntity getOrderShipment (String shipmentId)

Retrieves the order shipment attributes

Parameters
shipmentId The id of the shipment
Returns
  • the shipment attributes

public List<Carrier> getOrderShipmentCarriers (String orderId)

Retrieves the order shipment carriers.

Parameters
orderId The target order id
Returns

public CatalogProductReturnEntity getProduct (Integer productId, String productSku, String productIdOrSku, String storeViewIdOrCode, List<String> attributesNames, List<String> additionalAttributeNames)

Answers a product's specified attributes. At least one of attributNames or additionalAttributeNames must be non null and non empty. See catalog-product-info SOAP method

Parameters
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store
attributesNames The list of standard attributes to be returned
additionalAttributeNames The list of non standard attributes to be returned in the additionalAttributes attribute
Returns
  • the attributes

public CatalogProductImageEntity getProductAttributeMedia (Integer productId, String productSku, String productIdOrSku, String fileName, String storeViewIdOrCode)

Lists linked products to the given product and for the given link type.

Parameters
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
fileName The name of the file
storeViewIdOrCode The store view id or code
Returns
  • the list of links to the product

public CatalogProductReturnEntity getProductSpecialPrice (Integer productId, String productSku, String productIdOrSku, String storeViewIdOrCode)

Answers a product special price. See catalog-product-getSpecialPrice SOAP method.

Parameters
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store
Returns
  • the product special price attributes

public String getServerAddress ()

public String getUser ()

public void holdOrder (String orderId)

Puts order on hold. This operation can be reverted with unholdOrder.

Parameters
orderId The order to put on hold state

public void initialiseConnector (String username, String password, String address)

Parameters
username The user name to access Magento Web Services
password The password to access Magento Web Services
address The address to access Magento Web Services
Throws
ConnectionException

public List<CatalogAttributeOptionEntity> listCategoryAttributeOptions (String attributeId, String storeViewIdOrCode)

Retrieves attribute options. See catalog-category-attribute-options SOAP method.

Parameters
attributeId The target attribute whose options will be retrieved
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store
Returns
  • the list of category attribute options

public List<CatalogAttributeEntity> listCategoryAttributes ()

Retrieve product image types. See catalog-product-attribute-media-types SOAP method.

Returns
  • the list of category attributes

public List<CatalogCategoryEntityNoChildren> listCategoryLevels (String website, String storeViewIdOrCode, String parentCategoryId)

Answers levels of categories for a website, store view and parent category

Parameters
website The website
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store
parentCategoryId The parent category of the categories that will be listed
Returns
  • the list of categories attributes

public List<CatalogAssignedProduct> listCategoryProducts (int categoryId)

Lists product of a given category. See catalog-category-assignedProducts SOAP method.

Parameters
categoryId The category
Returns
  • the listing of category products

public List<CustomerAddressEntityItem> listCustomerAddresses (int customerId)

Lists the customer address for a given customer id

Parameters
customerId The id of the customer
Returns
  • a listing of addresses

public List<CustomerGroupEntity> listCustomerGroups ()

Lists all the customer groups

Returns
  • a listing of groups attributes

public List<CustomerCustomerEntity> listCustomers (String filter)

Answers a list of customer attributes for the given filter expression.

Parameters
filter Optional filtering expression - one or more comma-separated unary or binary predicates, one for each filter, in the form filterType(attributeName, value), for binary filters or filterType(attributeName), for unary filters, where filterType is istrue, isfalse or any of the Magento standard filters. Non-numeric values need to be escaped using simple quotes.
Returns
  • the list of attributes map

public List<DirectoryCountryEntity> listDirectoryCountries ()

Answers the list of countries

Returns
  • a collection of countries attributes

public List<DirectoryRegionEntity> listDirectoryRegions (String countryId)

Answers a list of regions for the given county

Parameters
countryId The country code, in ISO2 or ISO3 format
Returns
  • the collection of regions attributes

public List<CatalogInventoryStockItemEntity> listInventoryStockItems (List<String> productIdOrSkus)

Lists inventory stock items.

Parameters
productIdOrSkus The list of product ids and/or skus whose attributes will be retrieved
Returns
  • the list of attributes

public List<SalesOrderListEntity> listOrders (String filter)

Lists order attributes that match the given filtering expression.

Parameters
filter Optional filtering expression - one or more comma-separated unary or binary predicates, one for each filter, in the form filterType(attributeName, value), for binary filters or filterType(attributeName), for unary filters, where filterType is istrue, isfalse or any of the Magento standard filters. Non-numeric values need to be escaped using simple quotes.
Returns
  • a list of string-object maps

public List<SalesOrderInvoiceEntity> listOrdersInvoices (String filter)

Lists order invoices that match the given filtering expression

Parameters
filter Optional filtering expression - one or more comma-separated unary or binary predicates, one for each filter, in the form filterType(attributeName, value), for binary filters or filterType(attributeName), for unary filters, where filterType is istrue, isfalse or any of the Magento standard filters. Non-numeric values need to be escaped using simple quotes.
Returns
  • list of string-object maps order attributes

public List<SalesOrderShipmentEntity> listOrdersShipments (String filter)

Lists order shipment atrributes that match the given optional filtering expression

Parameters
filter Optional filtering expression - one or more comma-separated unary or binary predicates, one for each filter, in the form filterType(attributeName, value), for binary filters or filterType(attributeName), for unary filters, where filterType is istrue, isfalse or any of the Magento standard filters. Non-numeric values need to be escaped using simple quotes.
Returns
  • list of string-object map order shipments attributes

public List<CatalogProductImageEntity> listProductAttributeMedia (Integer productId, String productSku, String productIdOrSku, String storeViewIdOrCode)

Retrieves product image list. See catalog-product-attribute-media-list SOAP method

Parameters
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store
Returns
  • the list of product images attributes

public List<CatalogProductAttributeMediaTypeEntity> listProductAttributeMediaTypes (int setId)

Retrieve product image types. See catalog-product-attribute-media-types SOAP method.

Parameters
setId The setId
Returns
  • the list of attribute media types

public List<CatalogAttributeOptionEntity> listProductAttributeOptions (String attributeId, String storeViewIdOrCode)

Answers the product attribute options. See catalog-product-attribute-options SOAP method.

Parameters
attributeId The target attribute whose options will be listed
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store
Returns
  • the attributes list

public List<CatalogProductAttributeSetEntity> listProductAttributeSets ()

Retrieves product attribute sets. See catalog-product-attribute-set-list SOAP method.

Returns
  • The list of product attributes sets

public List<CatalogProductTierPriceEntity> listProductAttributeTierPrices (Integer productId, String productSku, String productIdOrSku)

Retrieve product tier prices. See catalog-product-attribute-tier-price-info SOAP Method.

Parameters
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
Returns
  • the list of product attributes

public List<CatalogAttributeEntity> listProductAttributes (int setId)

Retrieves product attributes list. See catalog-product-attribute-list SOAP methods

Parameters
setId The set id
Returns
  • the list of product attributes

public List<CatalogProductLinkEntity> listProductLink (String type, Integer productId, String productSku, String productIdOrSku)

Lists linked products to the given product and for the given link type

Parameters
type The link type
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
Returns
  • the list of links to the product

public List<CatalogProductLinkAttributeEntity> listProductLinkAttributes (String type)

Lists all the attributes for the given product link type

Parameters
type The product type
Returns
  • the listing of product attributes

public List<String> listProductLinkTypes ()

Answers product link types

Returns
  • the list of product link types

public List<CatalogProductTypeEntity> listProductTypes ()

Answers product types. See catalog-product-type-list SOAP method

Returns
  • the list of product types

public List<CatalogProductEntity> listProducts (String filter, String storeViewIdOrCode)

Retrieve products list by filters. See catalog-product-list SOAP method.

Parameters
filter Optional filtering expression - one or more comma-separated unary or binary predicates, one for each filter, in the form filterType(attributeName, value), for binary filters or filterType(attributeName), for unary filters, where filterType is istrue, isfalse or any of the Magento standard filters. Non-numeric values need to be escaped using simple quotes.
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store
Returns
  • the list of product attributes that match the given optional filtering expression

public List<ShoppingCartLicenseEntity> listShoppingCartLicenses (int quoteId, String storeId)

Retrieves the website license agreement for the quote according to the website (store). Store id must be given in cart creation.

Parameters
quoteId Shopping Cart ID (quote ID)
storeId Store view ID or code
Returns
  • licences for the shopping cart

public ShoppingCartPaymentMethodResponseEntityArray listShoppingCartPaymentMethods (int quoteId, String storeId)

Retrieves a list of available payment methods for a shopping cart (quote).

Parameters
quoteId Shopping Cart ID (quote ID)
storeId Store view ID or code
Returns
  • Payment methods available

public List<CatalogProductEntity> listShoppingCartProducts (int quoteId, String storeId)

Retrieves the list of products in the shopping cart (quote).

Parameters
quoteId Shopping Cart ID (quote ID)
storeId Store view ID or code
Returns
  • products in the shopping cart.

public List<ShoppingCartShippingMethodEntity> listShoppingCartShippingMethods (int quoteId, String storeId)

Retrieves the list of available shipping methods for a shopping cart (quote).

Parameters
quoteId Shopping Cart ID (quote ID)
storeId Store view ID or code
Returns
  • Shipping methods available

public List<ShoppingCartTotalsEntity> listShoppingCartTotals (int quoteId, String storeId)

Retrieves total prices for a shopping cart (quote).

Parameters
quoteId Shopping cart ID (quote identifier)
storeId Store view ID or code
Returns
  • shopping cart total prices

public List<CatalogInventoryStockItemEntity> listStockItems (List<String> productIdOrSkus)

Retrieve stock data by product ids

Parameters
productIdOrSkus A not empty list of product ids or skus whose attributes to list
Returns
  • a list of stock items attributes

public void moveCategory (int categoryId, int parentId, String afterId)

Move category in tree. See catalog-category-move SOAP method. Please make sure that you are not moving category to any of its own children. There are no extra checks to prevent doing it through webservices API, and you won’t be able to fix this from admin interface then .

Parameters
categoryId The id of the category to be moved
parentId The new parent category id
afterId An optional category id for use as reference in the positioning of the moved category

public boolean moveShoppingCartProductToCustomerQuote (int quoteId, List<ShoppingCartProductEntity> products, String storeId)

Moves products from the current quote to a customer quote.

Parameters
quoteId Shopping Cart ID (quote ID)
products Products data
storeId Store view ID or code
Returns
  • True if the product is moved to customer quote

public boolean removeShoppingCartCoupon (int quoteId, String storeId)

Removes a coupon code from a shopping cart (quote).

Parameters
quoteId Shopping Cart ID (quote ID)
storeId Store view ID or code
Returns
  • True if the coupon code is removed

public boolean removeShoppingCartProduct (int quoteId, List<ShoppingCartProductEntity> products, String storeId)

Removes one or several products from a shopping cart (quote).

Parameters
quoteId Shopping Cart ID (quote ID)
products Products data
storeId Store view ID or code
Returns
  • True if the product is removed

public void setCatalogClient (MagentoCatalogClient<?> catalogClient)

Parameters
catalogClient

public void setCustomerClient (MagentoCustomerClient<?> customerClient)

Parameters
customerClient

public void setDirectoryClient (MagentoDirectoryClient<?> directoryClient)

Parameters
directoryClient

public void setInventoryClient (MagentoInventoryClient<?> inventoryClient)

Parameters
inventoryClient

public void setOrderClient (MagentoOrderClient<?> magentoOrderClient)

Parameters
magentoOrderClient

public void setServerAddress (String serverAddress)

Parameters
serverAddress

public void setShoppingCartClient (MagentoShoppingCartClient<?> catalogClient)

Parameters
catalogClient

public boolean setShoppingCartCustomer (int quoteId, ShoppingCartCustomerEntity customer, String storeId)

Adds information about the customer to a shopping cart (quote).

Parameters
quoteId Shopping Cart ID (quote ID)
customer Cuestomer data
storeId Store view ID or code
Returns
  • True if information is added

public boolean setShoppingCartCustomerAddresses (int quoteId, List<ShoppingCartCustomerAddressEntity> shoppingCartCustomerAddresses, String storeId)

Sets the customer addresses in the shopping cart (quote). Don't set a coupon to the cart before using this method, the address won't be set.

Parameters
quoteId Shopping Cart ID (quote ID)
shoppingCartCustomerAddresses Addresses data (mode is required for each address and should be either "shipping" or "billing")
storeId Store view ID or code
Returns
  • True if information is added

public boolean setShoppingCartPaymentMethod (int quoteId, ShoppingCartPaymentMethodEntity shoppingCartPaymentMethod, String storeId)

Sets a payment method for a shopping cart (quote), cart must not be empty.

Parameters
quoteId Shopping Cart ID (quote ID)
shoppingCartPaymentMethod Payment mehthod data
storeId Store view ID or code
Returns
  • True on success

public boolean setShoppingCartShippingMethod (int quoteId, String method, String storeId)

Retrieves a shipping method for a shopping cart (quote).

Parameters
quoteId Shopping Cart ID (quote ID)
method Shipping method code
storeId Store view ID or code
Returns
  • True if the shipping method is retrieved

public void setUser (String user)

Parameters
user

public void unholdOrder (String orderId)

Releases order

Parameters
orderId The id of the order to remove from hold state

public void updateCategory (int categoryId, CatalogCategoryEntityCreate catalogCategoryEntity, String storeViewIdOrCode)

Updates a category. See catalog-category-update SOAP method.

Parameters
categoryId The category to update
catalogCategoryEntity The category new attributes
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store

public void updateCategoryAttributeStoreView (String storeViewIdOrCode)

Set the default catalog store view for this session

Parameters
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store the id or code of the store view to set as default for this session

public void updateCategoryProduct (int categoryId, Integer productId, String productSku, String productIdOrSku, String position)

Updates a category product.

Parameters
categoryId The category id
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
position The category position for ordering the category inside its level

public void updateCustomer (int customerId, CustomerCustomerEntityToCreate customer)

Updates the given customer attributes, for the given customer id. Password can not be updated using this method

Parameters
customerId The target customer to update
customer The customer attributes

public void updateCustomerAddress (int addressId, CustomerAddressEntityCreate customerAddress)

Updates the given map of customer address attributes, for the given customer address

Parameters
addressId The customer address to update
customerAddress The address attributes to update

public void updateInventoryStockItem (Integer productId, String productSku, String productIdOrSku, CatalogInventoryStockItemUpdateEntity catalogInventoryStockItem)

Updates an stock inventory item

Parameters
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
catalogInventoryStockItem The new attributes of the stock item

public void updateProduct (Integer productId, String productSku, String productIdOrSku, CatalogProductCreateEntity catalogProductEntity, List<AssociativeEntity> additionalAttributes, String storeViewIdOrCode)

Updates a product. At least one of attributes or additionalAttributes must be non null and non empty. See catalog-category-updateProduct SOAP method

Parameters
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
catalogProductEntity Standard product attributes to update
additionalAttributes Non standard product attributes to update
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store

public void updateProductAttributeMedia (Integer productId, String productSku, String productIdOrSku, String fileName, CatalogProductAttributeMediaCreateEntity catalogProductAttributeMediaEntity, String storeViewIdOrCode)

Updates product media. See catalog-product-attribute-media-update

Parameters
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
fileName The name of the remote media file to update
catalogProductAttributeMediaEntity The attributes to update
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store

public void updateProductAttributeTierPrice (Integer productId, String productSku, String productIdOrSku, CatalogProductTierPriceEntity catalogProductTierPriceEntity)

Updates a single product tier price. See catalog-product-attribute-tier-price-update SOAP method.

Parameters
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
catalogProductTierPriceEntity The tier price to update.

public void updateProductLink (String type, Integer productId, String productSku, String productIdOrSku, String linkedProductIdOrSku, CatalogProductLinkEntity catalogProductLinkEntity)

Update product link

Parameters
type The link type
productId The id of the source product. Use it instead of productIdOrSku in case you are sure the source product identifier is a product id
productSku The sku of the source product. Use it instead of productIdOrSku in case you are sure the source product identifier is a product sku
productIdOrSku The id or sku of the source product.
linkedProductIdOrSku The destination product id or sku.
catalogProductLinkEntity The link attributes

public void updateProductSpecialPrice (Integer productId, String productSku, String productIdOrSku, String specialPrice, String fromDate, String toDate, String storeViewIdOrCode)

Sets a product special price. See catalog-product-setSpecialPrice SOAP method

Parameters
productId The id of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product id
productSku The sku of the product. Use it instead of productIdOrSku in case you are sure the product identifier is a product sku
productIdOrSku The id or sku of the product.
specialPrice The special price to set
fromDate Optional start date of the special price period
toDate Optional end date of the special price period
storeViewIdOrCode The id or code of the target store. Left unspecified for using current store

public boolean updateShoppingCartProduct (int quoteId, List<ShoppingCartProductEntity> products, String storeId)

Updates one or several products in the shopping cart (quote).

Parameters
quoteId Shopping Cart ID (quote ID)
products Products data
storeId Store view ID or code
Returns
  • True if the product is updated

public void updateStockItem (String productIdOrSku, CatalogInventoryStockItemUpdateEntity stockItem)

Update product stock data given its id or sku

Parameters
productIdOrSku The product id or sku of the product to update
stockItem The attributes to update

public boolean validateConnection ()

public void voidOrderInvoice (String invoiceId)

Voids an invoice

Parameters
invoiceId The invoice id