1 | <?php |
||
16 | final class ProductClient extends AbstractClient |
||
17 | { |
||
18 | const BASE_URL = 'https://products.izettle.com/organizations/%s'; |
||
19 | |||
20 | const POST_CATEGORY = self::BASE_URL . '/categories'; |
||
21 | const GET_CATEGORY = self::BASE_URL . '/categories/%s'; |
||
22 | const GET_CATEGORIES = self::BASE_URL . '/categories'; |
||
23 | |||
24 | const POST_DISCOUNT = self::BASE_URL . '/discounts'; |
||
25 | const GET_DISCOUNT = self::BASE_URL . '/discounts/%s'; |
||
26 | const PUT_DISCOUNT = self::BASE_URL . '/discounts/%s'; |
||
27 | const DELETE_DISCOUNT = self::BASE_URL . '/discounts/%s'; |
||
28 | const GET_DISCOUNTS = self::BASE_URL . '/discounts'; |
||
29 | |||
30 | const GET_EXPORT = self::BASE_URL . '/products/%s'; |
||
31 | const GET_EXPORT_TEMPLATE = self::BASE_URL . '/products/%s/template'; |
||
32 | |||
33 | const GET_LIBRARY = self::BASE_URL . '/library'; |
||
34 | |||
35 | const POST_PRODUCT = self::BASE_URL . '/products'; |
||
36 | const GET_PRODUCT = self::BASE_URL . '/products/%s'; |
||
37 | const PUT_PRODUCT = self::BASE_URL . '/products/v2/%s'; |
||
38 | const DELETE_PRODUCT = self::BASE_URL . '/products/%s'; |
||
39 | const POST_PRODUCT_VARIANT = self::BASE_URL . '/products/%s/variants'; |
||
40 | const PUT_PRODUCT_VARIANT = self::BASE_URL . '/products/%s/variants/%s'; |
||
41 | const DELETE_PRODUCT_VARIANT = self::BASE_URL . '/products/%s/variants/%s'; |
||
42 | const GET_PRODUCTS = self::BASE_URL . '/products'; |
||
43 | const DELETE_PRODUCTS = self::BASE_URL . '/products'; |
||
44 | |||
45 | 1 | public function getCategories(): array |
|
51 | |||
52 | 1 | public function createCategory(Category $category): void |
|
57 | |||
58 | 1 | public function getDiscounts(): array |
|
64 | |||
65 | 1 | public function createDiscount(Discount $discount): void |
|
71 | |||
72 | 1 | public function deleteDiscount(Discount $discount): void |
|
78 | |||
79 | 1 | public function getLibrary(): Library |
|
85 | |||
86 | 1 | public function getProducts(): array |
|
92 | |||
93 | 1 | public function createProduct(Product $product): void |
|
99 | |||
100 | 1 | public function deleteProduct(Product $product): void |
|
106 | } |
||
107 |