Skip to content

Commit c6e492e

Browse files
sgradzielewskitmotyl
authored andcommitted
Initial commit
0 parents  commit c6e492e

File tree

205 files changed

+12245
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+12245
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

Api/CategoryRepositoryInterface.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
namespace Macopedia\Allegro\Api;
4+
5+
use Macopedia\Allegro\Api\Data\CategoryInterface;
6+
use Macopedia\Allegro\Model\Api\ClientException;
7+
use Magento\Framework\Exception\NoSuchEntityException;
8+
9+
interface CategoryRepositoryInterface
10+
{
11+
12+
/**
13+
* @return CategoryInterface[]
14+
* @throws ClientException
15+
*/
16+
public function getRootList(): array;
17+
18+
/**
19+
* @param string $parentCategoryId
20+
* @return CategoryInterface[]
21+
* @throws ClientException
22+
*/
23+
public function getList(string $parentCategoryId): array;
24+
25+
/**
26+
* @param string $categoryId
27+
* @return CategoryInterface
28+
* @throws ClientException
29+
* @throws NoSuchEntityException
30+
*/
31+
public function get(string $categoryId): CategoryInterface;
32+
33+
/**
34+
* @param string $categoryId
35+
* @return CategoryInterface[]
36+
* @throws ClientException
37+
* @throws NoSuchEntityException
38+
*/
39+
public function getAllParents(string $categoryId): array;
40+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
4+
namespace Macopedia\Allegro\Api;
5+
6+
use Macopedia\Allegro\Api\Data\CheckoutFormInterface;
7+
use Macopedia\Allegro\Model\Api\ClientException;
8+
use Magento\Framework\Exception\NoSuchEntityException;
9+
10+
interface CheckoutFormRepositoryInterface
11+
{
12+
13+
/**
14+
* @param string $checkoutFormId
15+
* @return CheckoutFormInterface
16+
* @throws ClientException
17+
* @throws NoSuchEntityException
18+
*/
19+
public function get(string $checkoutFormId): CheckoutFormInterface;
20+
}

Api/Consumer/MessageInterface.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace Macopedia\Allegro\Api\Consumer;
4+
5+
interface MessageInterface
6+
{
7+
/**
8+
* @param int $productId
9+
* @return void
10+
*/
11+
public function setProductId(int $productId);
12+
13+
/**
14+
* @return int
15+
*/
16+
public function getProductId(): ?int;
17+
}

Api/ConsumerInterface.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Macopedia\Allegro\Api;
4+
5+
use Macopedia\Allegro\Api\Consumer\MessageInterface;
6+
7+
interface ConsumerInterface
8+
{
9+
/**
10+
* @param MessageInterface $message
11+
* @return void
12+
*/
13+
public function processMessage(MessageInterface $message);
14+
}

Api/Data/CategoryInterface.php

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?php
2+
3+
namespace Macopedia\Allegro\Api\Data;
4+
5+
interface CategoryInterface
6+
{
7+
8+
/**
9+
* @param string $id
10+
* @return void
11+
*/
12+
public function setId(string $id);
13+
14+
/**
15+
* @param string $name
16+
* @return void
17+
*/
18+
public function setName(string $name);
19+
20+
/**
21+
* @param bool $leaf
22+
* @return void
23+
*/
24+
public function setLeaf(bool $leaf);
25+
26+
/**
27+
* @param string $parent
28+
* @return void
29+
*/
30+
public function setParent(string $parent);
31+
32+
/**
33+
* @return string
34+
*/
35+
public function getId(): ?string;
36+
37+
/**
38+
* @return string
39+
*/
40+
public function getName(): ?string;
41+
42+
/**
43+
* @return bool
44+
*/
45+
public function getLeaf(): bool;
46+
47+
/**
48+
* @return string
49+
*/
50+
public function getParent(): ?string;
51+
52+
/**
53+
* @param array $rawData
54+
* @return void
55+
*/
56+
public function setRawData(array $rawData);
57+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace Macopedia\Allegro\Api\Data\CheckoutForm;
4+
5+
interface AmountInterface
6+
{
7+
8+
public function setAmount(float $amount);
9+
10+
public function getAmount(): ?float;
11+
12+
public function setRawData(array $rawData);
13+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Macopedia\Allegro\Api\Data\CheckoutForm;
4+
5+
interface BuyerInterface
6+
{
7+
8+
public function setFirstName(string $firstName);
9+
public function setLastName(string $lastName);
10+
public function setEmail(string $email);
11+
12+
public function getFirstName(): ?string;
13+
public function getLastName(): ?string;
14+
public function getEmail(): ?string;
15+
16+
/**
17+
* @param array $rawData
18+
* @return void
19+
*/
20+
public function setRawData(array $rawData);
21+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
namespace Macopedia\Allegro\Api\Data\CheckoutForm\Delivery;
4+
5+
use Magento\Quote\Api\Data\AddressInterface as QuoteAddressInterface;
6+
use Magento\Sales\Api\Data\OrderAddressInterface;
7+
8+
interface AddressInterface
9+
{
10+
11+
public function setFirstName(string $firstName);
12+
public function setLastName(string $lastName);
13+
public function setPhoneNumber(string $phoneNumber);
14+
public function setZipCode(string $zipCode);
15+
public function setCity(string $city);
16+
public function setStreet(string $city);
17+
public function setCountryCode(string $countryCode);
18+
public function setCompanyName(string $companyName);
19+
20+
public function getFirstName(): ?string;
21+
public function getLastName(): ?string;
22+
public function getPhoneNumber(): ?string;
23+
public function getZipCode(): ?string;
24+
public function getCity(): ?string;
25+
public function getStreet(): ?string;
26+
public function getCountryCode(): ?string;
27+
public function getCompanyName(): ?string;
28+
29+
public function setRawData(array $rawData);
30+
31+
/**
32+
* @param OrderAddressInterface|QuoteAddressInterface $orderAddress
33+
* @return void
34+
*/
35+
public function fillAddress($orderAddress);
36+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace Macopedia\Allegro\Api\Data\CheckoutForm\Delivery;
4+
5+
interface CostInterface
6+
{
7+
8+
public function setAmount(float $amount);
9+
10+
public function getAmount(): ?float;
11+
12+
public function setRawData(array $rawData);
13+
}

0 commit comments

Comments
 (0)