-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathWooCommerce.java
More file actions
77 lines (67 loc) · 2.25 KB
/
WooCommerce.java
File metadata and controls
77 lines (67 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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<String, Object> 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
*/
Page getAll(String endpointBase, Map<String, String> params);
/**
* Retrieves all WooCommerce entities
*
* @param endpointBase API endpoint base @see EndpointBaseType
* @return List of retrieved entities
*/
default Page 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<String, Object> 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);
/**
* Makes batch operations on WooCommerce entities
*
* @param endpointBase API endpoint base @see EndpointBaseType
* @param object Map with lists of entities
* @return response Map with WooCommerce entities implicated
*/
Map batch(String endpointBase, Map<String, Object> object);
}