|
7 | 7 | import com.amirshiati.androidwoocommercesdk.enums.CategoryManagerType; |
8 | 8 | import com.amirshiati.androidwoocommercesdk.enums.OrderManageType; |
9 | 9 | import com.amirshiati.androidwoocommercesdk.enums.ProductManagerType; |
| 10 | +import com.amirshiati.androidwoocommercesdk.handler.CategoryHandler; |
10 | 11 | import com.amirshiati.androidwoocommercesdk.handler.OrderHandler; |
11 | 12 | import com.amirshiati.androidwoocommercesdk.handler.ProductHandler; |
12 | 13 | import com.amirshiati.androidwoocommercesdk.helper.UriBuilder; |
@@ -37,13 +38,6 @@ public WooSDK(Context context, String ckKey, String csKey, String domainName) { |
37 | 38 | uriBuilderSingleton = UriBuilderSingleton.getInstance(domainName); |
38 | 39 | } |
39 | 40 |
|
40 | | - public CategoryManager getCategories() { |
41 | | - return new CategoryManager(UriBuilder.getCategories(domainName), CategoryManagerType.GETCATEGORIES, volley); |
42 | | - } |
43 | | - |
44 | | - public CategoryManager getCategory(long categoryId) { |
45 | | - return new CategoryManager(UriBuilder.getCategory(domainName, categoryId), CategoryManagerType.GETCATEGORY, volley); |
46 | | - } |
47 | 41 |
|
48 | 42 | public AttributeManager getAttributes() { |
49 | 43 | return new AttributeManager(UriBuilder.getAttributes(domainName), AttributeManagerType.GETATTRIBUTES, volley); |
@@ -74,4 +68,14 @@ public void getOrders(ParamBuilder paramBuilder, OnResponse onResponse) { |
74 | 68 | orderHandler.getList(paramBuilder, onResponse); |
75 | 69 | } |
76 | 70 |
|
| 71 | + public void getCategory(long id, OnResponse onResponse) { |
| 72 | + CategoryHandler categoryHandler = new CategoryHandler(uriBuilderSingleton, volley); |
| 73 | + categoryHandler.get(id, onResponse); |
| 74 | + } |
| 75 | + |
| 76 | + public void getCategories(ParamBuilder paramBuilder, OnResponse onResponse) { |
| 77 | + CategoryHandler categoryHandler = new CategoryHandler(uriBuilderSingleton, volley); |
| 78 | + categoryHandler.getList(paramBuilder, onResponse); |
| 79 | + } |
| 80 | + |
77 | 81 | } |
0 commit comments