File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Parasut \Examples ;
4+
5+ use Parasut \Entity \Product \Request \CreateProduct ;
6+ use Parasut \Entity \Product \Request \IndexProduct ;
7+ use Parasut \Entity \Product \Response ;
8+
9+ class Products
10+ {
11+ /**
12+ * @return Response\IndexProducts
13+ */
14+ public function index ()
15+ {
16+ $ product = new IndexProduct ();
17+ $ product ->setCode ('code ' );
18+
19+ return $ product ->send ();
20+ }
21+
22+ /**
23+ * @return Response\CreateProduct
24+ */
25+ public function create ()
26+ {
27+ $ product = new CreateProduct ();
28+ $ product ->setCode ('A23B ' );
29+ $ product ->setName ('Core ' );
30+ $ product ->setVatRate (18 );
31+ $ product ->setUnit (1 );
32+ $ product ->setCommunicationsTaxRate (1 );
33+ $ product ->setArchived (false );
34+ $ product ->setListPrice (0 );
35+ $ product ->setCurrency ('TRL ' );
36+ $ product ->setBuyingPrice (0 );
37+ $ product ->setBuyingCurrency ('TRL ' );
38+ $ product ->setInventoryTracking (false );
39+ $ product ->setInitialStockCount (9000000 );
40+
41+ return $ product ->send ();
42+ }
43+ }
You can’t perform that action at this time.
0 commit comments