1 | <?php |
||
7 | class Attribute extends BaseModel |
||
8 | { |
||
9 | use QueryBuilderTrait; |
||
10 | |||
11 | protected $endpoint = 'products/attributes'; |
||
12 | |||
13 | /** |
||
14 | * Retrieve all Items. |
||
15 | * |
||
16 | * @param int $attribute_id |
||
17 | * @param array $options |
||
18 | * |
||
19 | * @return array |
||
20 | */ |
||
21 | protected function getTerms($attribute_id, $options = []) |
||
27 | |||
28 | /** |
||
29 | * Retrieve single Item. |
||
30 | * |
||
31 | * @param int $attribute_id |
||
32 | * @param int $term_id |
||
33 | * @param array $options |
||
34 | * |
||
35 | * @return object |
||
36 | */ |
||
37 | protected function getTerm($attribute_id, $term_id, $options = []) |
||
43 | |||
44 | /** |
||
45 | * Create new Item. |
||
46 | * |
||
47 | * @param int $attribute_id |
||
48 | * @param array $data |
||
49 | * |
||
50 | * @return object |
||
51 | */ |
||
52 | protected function addTerm($attribute_id, $data) |
||
58 | |||
59 | /** |
||
60 | * Update Existing Item. |
||
61 | * |
||
62 | * @param int $attribute_id |
||
63 | * @param int $term_id |
||
64 | * @param array $data |
||
65 | * |
||
66 | * @return object |
||
67 | */ |
||
68 | protected function updateTerm($attribute_id, $term_id, $data) |
||
74 | |||
75 | /** |
||
76 | * Destroy Item. |
||
77 | * |
||
78 | * @param int $attribute_id |
||
79 | * @param int $term_id |
||
80 | * @param array $options |
||
81 | * |
||
82 | * @return object |
||
83 | */ |
||
84 | protected function deleteTerm($attribute_id, $term_id, $options = []) |
||
90 | |||
91 | /** |
||
92 | * Batch Update. |
||
93 | * |
||
94 | * @param int $attribute_id |
||
95 | * @param array $data |
||
96 | * |
||
97 | * @return object |
||
98 | */ |
||
99 | protected function batchTerm($attribute_id, $data) |
||
105 | } |
||
106 |