
com.icoderman.woocommerce.WooCommerce Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wc-api-java Show documentation
Show all versions of wc-api-java Show documentation
Java wrapper for WooCommerce REST API
package com.icoderman.woocommerce;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* Main interface for WooCommerce REST API
*/
public interface WooCommerce {
/**
* Creates WooCommerce entity
*
* @param endpointBase API endpoint base @see EndpointBaseType
* @param object Map with entity properties and values
* @return Map with created entity
*/
Map create(String endpointBase, Map object);
/**
* Retrieves on WooCommerce entity
*
* @param endpointBase API endpoint base @see EndpointBaseType
* @param id id of WooCommerce entity
* @return Retrieved WooCommerce entity
*/
Map get(String endpointBase, int id);
/**
* Retrieves all WooCommerce entities with request parameters
*
* @param endpointBase API endpoint base @see EndpointBaseType
* @param params additional request params
* @return List of retrieved entities
*/
List getAll(String endpointBase, Map params);
/**
* Retrieves all WooCommerce entities
*
* @param endpointBase API endpoint base @see EndpointBaseType
* @return List of retrieved entities
*/
default List getAll(String endpointBase) {
return getAll(endpointBase, Collections.emptyMap());
}
/**
* Updates WooCommerce entity
*
* @param endpointBase API endpoint base @see EndpointBaseType
* @param id id of the entity to update
* @param object Map with updated properties
* @return updated WooCommerce entity
*/
Map update(String endpointBase, int id, Map object);
/**
* Deletes WooCommerce entity
*
* @param endpointBase API endpoint base @see EndpointBaseType
* @param id id of the entity to update
* @return deleted WooCommerce entity
*/
Map delete(String endpointBase, int id);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy