File tree Expand file tree Collapse file tree 2 files changed +45
-2
lines changed Expand file tree Collapse file tree 2 files changed +45
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public function save(ProductData $data)
6666
6767 return $ this ->run (
6868 $ id == null ? 'POST ' : 'PUT ' ,
69- 'pedidovenda-rest/pessoas ' .($ id > 0 ? '/ ' .$ id : null ),
69+ 'operacional/produtos ' .($ id > 0 ? '/ ' .$ id : null ),
7070 ['json ' => $ data ->toArray ()]
7171 );
7272 }
@@ -80,6 +80,16 @@ public function save(ProductData $data)
8080 */
8181 public function delete ($ id )
8282 {
83- return $ this ->run ('DELETE ' , 'pedidovenda-rest/pessoas/ ' .$ id );
83+ return $ this ->run ('DELETE ' , 'operacional/produtos/ ' .$ id );
84+ }
85+
86+ /**
87+ * Get the product price table info.
88+ *
89+ * @return ProductPriceTable
90+ */
91+ public function priceTableInfo ()
92+ {
93+ return new ProductPriceTable ($ this ->client );
8494 }
8595}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace JulianoBailao \DomusApi \Endpoints \Secondary ;
4+
5+ use JulianoBailao \DomusApi \Contracts \GetContract ;
6+ use JulianoBailao \DomusApi \Core \Endpoint ;
7+
8+ class ProductPriceTable extends Endpoint implements GetContract
9+ {
10+ /**
11+ * Get a page of models list.
12+ *
13+ * @param array $query the request query string.
14+ *
15+ * @return stdObject
16+ */
17+ public function paginate (array $ query = [])
18+ {
19+ return $ this ->page ('pedidovenda-rest/produtos ' , $ query );
20+ }
21+
22+ /**
23+ * Get a specific model.
24+ *
25+ * @param int $id the model id.
26+ *
27+ * @return stdObject
28+ */
29+ public function get ($ id )
30+ {
31+ return $ this ->run ('GET ' , 'pedidovenda-rest/produtos/ ' .$ id );
32+ }
33+ }
You can’t perform that action at this time.
0 commit comments