Skip to content

Commit 0c66d41

Browse files
authored
Merge pull request #2 from Smooth-Systems/add_fetch_category_details
added custom_attributes to category when fetching details
2 parents 97fd624 + 8fe890b commit 0c66d41

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
package com.github.chen0040.magento.models;
22

3-
43
import lombok.Getter;
54
import lombok.Setter;
65

76
import java.util.ArrayList;
87
import java.util.List;
98

10-
119
/**
1210
* Created by xschen on 12/6/2017.
1311
*/
1412
@Setter
1513
@Getter
1614
public class Category {
17-
private long id = 2;
18-
private long parent_id = 1;
19-
private String name = "Category Store Group 1 - website_id_1";
20-
private boolean is_active = true;
21-
private int position = 1;
22-
private int level = 1;
23-
private int product_count = 25;
24-
private List<Category> children_data = new ArrayList<>();
15+
private long id = 2;
16+
private long parent_id = 1;
17+
private String name = "Category Store Group 1 - website_id_1";
18+
private boolean is_active = true;
19+
private int position = 1;
20+
private int level = 1;
21+
private int product_count = 25;
22+
List<CategoryAttribute> custom_attributes = new ArrayList<>();
23+
private List<Category> children_data = new ArrayList<>();
2524
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.github.chen0040.magento.models;
2+
3+
import lombok.Getter;
4+
import lombok.Setter;
5+
6+
@Setter
7+
@Getter
8+
public class CategoryAttribute {
9+
10+
private String attribute_code;
11+
12+
private String value;
13+
}

0 commit comments

Comments
 (0)