Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sgradzielewski authored and tmotyl committed Sep 13, 2019
0 parents commit c6e492e
Show file tree
Hide file tree
Showing 205 changed files with 12,245 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
40 changes: 40 additions & 0 deletions Api/CategoryRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

namespace Macopedia\Allegro\Api;

use Macopedia\Allegro\Api\Data\CategoryInterface;
use Macopedia\Allegro\Model\Api\ClientException;
use Magento\Framework\Exception\NoSuchEntityException;

interface CategoryRepositoryInterface
{

/**
* @return CategoryInterface[]
* @throws ClientException
*/
public function getRootList(): array;

/**
* @param string $parentCategoryId
* @return CategoryInterface[]
* @throws ClientException
*/
public function getList(string $parentCategoryId): array;

/**
* @param string $categoryId
* @return CategoryInterface
* @throws ClientException
* @throws NoSuchEntityException
*/
public function get(string $categoryId): CategoryInterface;

/**
* @param string $categoryId
* @return CategoryInterface[]
* @throws ClientException
* @throws NoSuchEntityException
*/
public function getAllParents(string $categoryId): array;
}
20 changes: 20 additions & 0 deletions Api/CheckoutFormRepositoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php


namespace Macopedia\Allegro\Api;

use Macopedia\Allegro\Api\Data\CheckoutFormInterface;
use Macopedia\Allegro\Model\Api\ClientException;
use Magento\Framework\Exception\NoSuchEntityException;

interface CheckoutFormRepositoryInterface
{

/**
* @param string $checkoutFormId
* @return CheckoutFormInterface
* @throws ClientException
* @throws NoSuchEntityException
*/
public function get(string $checkoutFormId): CheckoutFormInterface;
}
17 changes: 17 additions & 0 deletions Api/Consumer/MessageInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace Macopedia\Allegro\Api\Consumer;

interface MessageInterface
{
/**
* @param int $productId
* @return void
*/
public function setProductId(int $productId);

/**
* @return int
*/
public function getProductId(): ?int;
}
14 changes: 14 additions & 0 deletions Api/ConsumerInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Macopedia\Allegro\Api;

use Macopedia\Allegro\Api\Consumer\MessageInterface;

interface ConsumerInterface
{
/**
* @param MessageInterface $message
* @return void
*/
public function processMessage(MessageInterface $message);
}
57 changes: 57 additions & 0 deletions Api/Data/CategoryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

namespace Macopedia\Allegro\Api\Data;

interface CategoryInterface
{

/**
* @param string $id
* @return void
*/
public function setId(string $id);

/**
* @param string $name
* @return void
*/
public function setName(string $name);

/**
* @param bool $leaf
* @return void
*/
public function setLeaf(bool $leaf);

/**
* @param string $parent
* @return void
*/
public function setParent(string $parent);

/**
* @return string
*/
public function getId(): ?string;

/**
* @return string
*/
public function getName(): ?string;

/**
* @return bool
*/
public function getLeaf(): bool;

/**
* @return string
*/
public function getParent(): ?string;

/**
* @param array $rawData
* @return void
*/
public function setRawData(array $rawData);
}
13 changes: 13 additions & 0 deletions Api/Data/CheckoutForm/AmountInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Macopedia\Allegro\Api\Data\CheckoutForm;

interface AmountInterface
{

public function setAmount(float $amount);

public function getAmount(): ?float;

public function setRawData(array $rawData);
}
21 changes: 21 additions & 0 deletions Api/Data/CheckoutForm/BuyerInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace Macopedia\Allegro\Api\Data\CheckoutForm;

interface BuyerInterface
{

public function setFirstName(string $firstName);
public function setLastName(string $lastName);
public function setEmail(string $email);

public function getFirstName(): ?string;
public function getLastName(): ?string;
public function getEmail(): ?string;

/**
* @param array $rawData
* @return void
*/
public function setRawData(array $rawData);
}
36 changes: 36 additions & 0 deletions Api/Data/CheckoutForm/Delivery/AddressInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

namespace Macopedia\Allegro\Api\Data\CheckoutForm\Delivery;

use Magento\Quote\Api\Data\AddressInterface as QuoteAddressInterface;
use Magento\Sales\Api\Data\OrderAddressInterface;

interface AddressInterface
{

public function setFirstName(string $firstName);
public function setLastName(string $lastName);
public function setPhoneNumber(string $phoneNumber);
public function setZipCode(string $zipCode);
public function setCity(string $city);
public function setStreet(string $city);
public function setCountryCode(string $countryCode);
public function setCompanyName(string $companyName);

public function getFirstName(): ?string;
public function getLastName(): ?string;
public function getPhoneNumber(): ?string;
public function getZipCode(): ?string;
public function getCity(): ?string;
public function getStreet(): ?string;
public function getCountryCode(): ?string;
public function getCompanyName(): ?string;

public function setRawData(array $rawData);

/**
* @param OrderAddressInterface|QuoteAddressInterface $orderAddress
* @return void
*/
public function fillAddress($orderAddress);
}
13 changes: 13 additions & 0 deletions Api/Data/CheckoutForm/Delivery/CostInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Macopedia\Allegro\Api\Data\CheckoutForm\Delivery;

interface CostInterface
{

public function setAmount(float $amount);

public function getAmount(): ?float;

public function setRawData(array $rawData);
}
24 changes: 24 additions & 0 deletions Api/Data/CheckoutForm/Delivery/MethodInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace Macopedia\Allegro\Api\Data\CheckoutForm\Delivery;

interface MethodInterface
{

/**
* @param string $id
* @return void
*/
public function setId(string $id);

/**
* @return string
*/
public function getId(): ?string;

/**
* @param array $rawData
* @return void
*/
public function setRawData(array $rawData);
}
50 changes: 50 additions & 0 deletions Api/Data/CheckoutForm/DeliveryInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

namespace Macopedia\Allegro\Api\Data\CheckoutForm;

use Macopedia\Allegro\Api\Data\CheckoutForm\Delivery\AddressInterface;
use Macopedia\Allegro\Api\Data\CheckoutForm\Delivery\CostInterface;
use Macopedia\Allegro\Api\Data\CheckoutForm\Delivery\MethodInterface;

interface DeliveryInterface
{

/**
* @param MethodInterface $method
* @return void
*/
public function setMethod(MethodInterface $method);

/**
* @param AddressInterface $address
* @return void
*/
public function setAddress(AddressInterface $address);

/**
* @param CostInterface $cost
* @return void
*/
public function setCost(CostInterface $cost);

/**
* @return MethodInterface
*/
public function getMethod(): MethodInterface;

/**
* @return AddressInterface
*/
public function getAddress(): AddressInterface;

/**
* @return CostInterface
*/
public function getCost(): CostInterface;

/**
* @param array $rawData
* @return void
*/
public function setRawData(array $rawData);
}
15 changes: 15 additions & 0 deletions Api/Data/CheckoutForm/Invoice/Address/CompanyInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Macopedia\Allegro\Api\Data\CheckoutForm\Invoice\Address;

interface CompanyInterface
{

public function setName(string $name);
public function setVatId(string $vatId);

public function getName(): ?string;
public function getVatId(): ?string;

public function setRawData(array $rawData);
}
15 changes: 15 additions & 0 deletions Api/Data/CheckoutForm/Invoice/Address/NaturalPersonInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Macopedia\Allegro\Api\Data\CheckoutForm\Invoice\Address;

interface NaturalPersonInterface
{

public function setFirstName(string $firstName);
public function setLastName(string $lastName);

public function getFirstName(): ?string;
public function getLastName(): ?string;

public function setRawData(array $rawData);
}
35 changes: 35 additions & 0 deletions Api/Data/CheckoutForm/Invoice/AddressInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

namespace Macopedia\Allegro\Api\Data\CheckoutForm\Invoice;

use Macopedia\Allegro\Api\Data\CheckoutForm\Delivery\AddressInterface as DeliveryAddressInterface;
use Macopedia\Allegro\Api\Data\CheckoutForm\Invoice\Address\NaturalPersonInterface;
use Macopedia\Allegro\Api\Data\CheckoutForm\Invoice\Address\CompanyInterface;
use Magento\Sales\Api\Data\OrderAddressInterface;
use Magento\Quote\Api\Data\AddressInterface as QuoteAddressInterface;

interface AddressInterface
{

public function setZipCode(string $zipCode);
public function setCity(string $city);
public function setStreet(string $city);
public function setCountryCode(string $countryCode);
public function setCompany(CompanyInterface $company);
public function setNaturalPerson(NaturalPersonInterface $naturalPerson);

public function getZipCode(): ?string;
public function getCity(): ?string;
public function getStreet(): ?string;
public function getCountryCode(): ?string;
public function getCompany(): CompanyInterface;
public function getNaturalPerson(): NaturalPersonInterface;

public function setRawData(array $rawData);

/**
* @param QuoteAddressInterface|OrderAddressInterface $address
* @param DeliveryAddressInterface $deliveryAddress
*/
public function fillAddress($address, DeliveryAddressInterface $deliveryAddress);
}
Loading

0 comments on commit c6e492e

Please sign in to comment.