public interface

MagentoOrderClient

org.mule.module.magento.api.order.MagentoOrderClient<ExceptionType extends java.lang.Exception>
Known Indirect Subclasses

Class Overview

Facade for the Magento Sales Order API. This Facade uses order, shipments and invoices ids called, orderId, shipmentId and invoiceId respectively. However, those Ids correspond internally to the Magento's xxxIncrementId. Actual xxxId are used internally by magento and not exposed by the webservice in most operations

Summary

Public Methods
abstract void addOrderComment(String orderId, String status, String comment, boolean sendEmail)
Adds a comment to the given order id
abstract void addOrderInvoiceComment(String invoiceId, String comment, boolean sendEmail, boolean includeCommentInEmail)
Adds a comment to the given order's invoice
abstract void addOrderShipmentComment(String shipmentId, String comment, boolean sendEmail, boolean includeCommentInEmail)
Adds a comment to the shipment
abstract int addOrderShipmentTrack(String shipmentId, String carrierCode, String title, String trackNumber)
Adds a new tracking number
abstract void cancelOrder(String orderId)
Cancels an order
abstract void cancelOrderInvoice(String invoiceId)
Cancels an order's invoice
abstract void captureOrderInvoice(String invoiceId)
Captures and invoice
abstract String createOrderInvoice(String orderId, List<OrderItemIdQty> itemsQuantities, String comment, boolean sendEmail, boolean includeCommentInEmail)
Creates an invoice for the given order
abstract String createOrderShipment(String orderId, List<OrderItemIdQty> itemsQuantities, String comment, boolean sendEmail, boolean includeCommentInEmail)
Creates a shipment for order
abstract int deleteOrderShipmentTrack(String shipmentId, String trackId)
Deletes the given track of the given order's shipment
abstract SalesOrderEntity getOrder(String orderId)
Answers the order properties for the given orderId
abstract SalesOrderInvoiceEntity getOrderInvoice(String invoiceId)
Retrieves order invoice information
abstract SalesOrderShipmentEntity getOrderShipment(String shipmentId)
Retrieves order shipment information
abstract List<Carrier> getOrderShipmentCarriers(String orderId)
Returns a list of carriers for the given order id
abstract void holdOrder(String orderId)
Puts order on hold
abstract List<SalesOrderListEntity> listOrders(String filter)
Lists order attributes that match the given filtering expression
abstract List<SalesOrderInvoiceEntity> listOrdersInvoices(String filter)
Lists order invoices that match the given filtering expression
abstract List<SalesOrderShipmentEntity> listOrdersShipments(String filter)
Lists order shipment atrributes that match the given optional filtering expression
abstract void unholdOrder(String orderId)
Releases order
abstract void voidOrderInvoice(String invoiceId)
Voids an invoice

Public Methods

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

Adds a comment to the given order id

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

public abstract 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
Throws
Exception

public abstract 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
Throws
Exception

public abstract int addOrderShipmentTrack (String shipmentId, String carrierCode, String title, String trackNumber)

Adds a new tracking number

Parameters
shipmentId The shipment id
carrierCode The new track's carrier code
title The new track's title
trackNumber The new track's number
Returns
  • the new track's id
Throws
Exception

public abstract void cancelOrder (String orderId)

Cancels an order

Parameters
orderId The order to cancel
Throws
Exception

public abstract void cancelOrderInvoice (String invoiceId)

Cancels an order's invoice

Parameters
invoiceId The invoice id
Throws
Exception

public abstract void captureOrderInvoice (String invoiceId)

Captures and invoice

Parameters
invoiceId The invoice to capture
Throws
Exception

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

Creates an invoice for the given order

Parameters
orderId
itemsQuantities A map containing an entry per each (orderItemId, quantity) pair
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
Throws
Exception

public abstract 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 A map containing an entry per each (orderItemId, quantity) pair
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
Throws
Exception

public abstract 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
Throws
Exception

public abstract SalesOrderEntity getOrder (String orderId)

Answers the order properties for the given orderId

Parameters
orderId
Returns
  • the order properties
Throws
Exception

public abstract SalesOrderInvoiceEntity getOrderInvoice (String invoiceId)

Retrieves order invoice information

Parameters
invoiceId
Returns
  • the invoice attributes
Throws
Exception

public abstract SalesOrderShipmentEntity getOrderShipment (String shipmentId)

Retrieves order shipment information

Parameters
shipmentId
Returns
  • sales order shipment information
Throws
Exception

public abstract List<Carrier> getOrderShipmentCarriers (String orderId)

Returns a list of carriers for the given order id

Parameters
orderId
Returns
  • list of carriers
Throws
Exception

public abstract void holdOrder (String orderId)

Puts order on hold

Parameters
orderId
Throws
Exception

public abstract List<SalesOrderListEntity> listOrders (String filter)

Lists order attributes that match the given filtering expression

Parameters
filter
Returns
  • a list of order attributes
Throws
Exception

public abstract List<SalesOrderInvoiceEntity> listOrdersInvoices (String filter)

Lists order invoices that match the given filtering expression

Parameters
filter
Returns
  • list of string-object maps order attributes
Throws
Exception

public abstract List<SalesOrderShipmentEntity> listOrdersShipments (String filter)

Lists order shipment atrributes that match the given optional filtering expression

Parameters
filter
Returns
  • list of string-object map order shipments attributes
Throws
Exception

public abstract void unholdOrder (String orderId)

Releases order

Parameters
orderId
Throws
Exception

public abstract void voidOrderInvoice (String invoiceId)

Voids an invoice

Parameters
invoiceId The invoice id
Throws
Exception