public class MagentoRestClient extends Object implements MagentoClient
| Modifier and Type | Field and Description |
|---|---|
static String |
ERROR_MESSAGE |
| Constructor and Description |
|---|
MagentoRestClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
addOrderComment(String orderIncrementId,
String status,
String comment,
boolean notify)
adds a comment to an order
|
void |
connect(org.imixs.workflow.ItemCollection magentoConfiguration)
Connects the Client to the magento REST API.
|
void |
disconnect()
Disconnects the client
|
org.scribe.model.Token |
getAccessToken(org.scribe.model.Token requestToken,
String averifier)
This method requests a new access token....
|
String |
getAuthorizationUrl(org.scribe.model.Token requestToken)
returns a new authorization url...
|
org.imixs.workflow.ItemCollection |
getCustomerById(int id)
returns a single itemCollection for a magento product entry
The method also lookups the customer addresses and adds a property
'addresses' with the collection of customers addresses
Rest URI: http://magentohost/api/rest/customers/:customer_id/addresses
|
org.imixs.workflow.ItemCollection |
getOrderById(String id)
returns a single itemCollection for a magento order entity
|
List<org.imixs.workflow.ItemCollection> |
getOrders(String status)
This method implements a paging mechanism because the Rest API only
returns a maximum of 100 entries per call!
|
org.imixs.workflow.ItemCollection |
getProductBySKU(String sku)
returns a single itemCollection for a magento product entry
|
List<org.imixs.workflow.ItemCollection> |
getProducts()
returns a List of itemCollection for magento product entries
|
org.scribe.model.Token |
getRequestToken()
returns a new request token...
|
org.scribe.oauth.OAuthService |
getService()
returns a OAuthService object...
|
public static final String ERROR_MESSAGE
public void connect(org.imixs.workflow.ItemCollection magentoConfiguration)
connect in interface MagentoClientpublic void disconnect()
disconnect in interface MagentoClientpublic org.scribe.oauth.OAuthService getService()
public org.scribe.model.Token getRequestToken()
https://github.com/fernandezpablo85/scribe-java/issues/504public String getAuthorizationUrl(org.scribe.model.Token requestToken)
public org.scribe.model.Token getAccessToken(org.scribe.model.Token requestToken,
String averifier)
public List<org.imixs.workflow.ItemCollection> getProducts() throws MagentoException
MagentoClientgetProducts in interface MagentoClientMagentoExceptionpublic org.imixs.workflow.ItemCollection getProductBySKU(String sku)
getProductBySKU in interface MagentoClientitem_id - org.imixs.workflow.exceptions.PluginExceptionpublic org.imixs.workflow.ItemCollection getCustomerById(int id)
getCustomerById in interface MagentoClientitem_id - org.imixs.workflow.exceptions.PluginExceptionpublic org.imixs.workflow.ItemCollection getOrderById(String id)
getOrderById in interface MagentoClientitem_id - org.imixs.workflow.exceptions.PluginExceptionpublic List<org.imixs.workflow.ItemCollection> getOrders(String status) throws MagentoException
getOrders in interface MagentoClientMagentoExceptionpublic void addOrderComment(String orderIncrementId, String status, String comment, boolean notify) throws MagentoException
MagentoClientaddOrderComment in interface MagentoClientMagentoExceptionCopyright © 2019 Imixs Software Solutions GmbH. All rights reserved.