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