first commit

This commit is contained in:
2024-10-25 14:16:28 +02:00
commit 925276dbb2
33795 changed files with 4780077 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
<?php
namespace x13allegro\Api\Model\Order;
use x13allegro\Component\Enum;
/**
* @method static CarrierOperator OTHER()
*/
final class CarrierOperator extends Enum
{
const OTHER = 'Inny';
}

View File

@@ -0,0 +1,13 @@
<?php
namespace x13allegro\Api\Model\Order\Enum;
use x13allegro\Component\Enum;
final class CheckoutFormStatus extends Enum
{
const BOUGHT = 'BOUGHT'; // purchase without checkout form filled in
const FILLED_IN = 'FILLED_IN'; // checkout form filled in but payment is not completed yet so data could still change
const READY_FOR_PROCESSING = 'READY_FOR_PROCESSING'; // payment completed, purchase is ready for processing
const CANCELLED = 'CANCELLED'; // purchase cancelled by buyer
}

View File

@@ -0,0 +1,15 @@
<?php
namespace x13allegro\Api\Model\Order\Enum;
use x13allegro\Component\Enum;
final class EventType extends Enum
{
const BOUGHT = 'BOUGHT';
const FILLED_IN = 'FILLED_IN';
const READY_FOR_PROCESSING = 'READY_FOR_PROCESSING';
const FULFILLMENT_STATUS_CHANGED = 'FULFILLMENT_STATUS_CHANGED';
const AUTO_CANCELLED = 'AUTO_CANCELLED';
const BUYER_CANCELLED = 'BUYER_CANCELLED';
}

View File

@@ -0,0 +1,16 @@
<?php
namespace x13allegro\Api\Model\Order\Enum;
use x13allegro\Component\Enum;
class FulfillmentStatus extends Enum
{
const PROCESSING = 'W realizacji';
const SUSPENDED = 'Wstrzymane';
const READY_FOR_SHIPMENT = 'Do wysłania';
const READY_FOR_PICKUP = 'Do odbioru';
const SENT = 'Wysłane';
const PICKED_UP = 'Odebrane';
const CANCELLED = 'Anulowane';
}

View File

@@ -0,0 +1,13 @@
<?php
namespace x13allegro\Api\Model\Order\Enum;
use x13allegro\Component\Enum;
final class PaymentType extends Enum
{
const ONLINE = 'ONLINE';
const EXTENDED_TERM = 'EXTENDED_TERM';
const SPLIT_PAYMENT = 'SPLIT_PAYMENT';
const CASH_ON_DELIVERY = 'CASH_ON_DELIVERY';
}

View File

@@ -0,0 +1,12 @@
<?php
namespace x13allegro\Api\Model\Order\Enum;
use x13allegro\Component\Enum;
final class ShipmentSummarySent extends Enum
{
const NONE = 'Żadne';
const SOME = 'Niektóre';
const ALL = 'Wszystkie';
}

View File

@@ -0,0 +1,12 @@
<?php
namespace x13allegro\Api\Model\Order;
final class Fulfillment
{
/** @var string */
public $status;
/** @var ShipmentSummary */
public $shipmentSummary;
}

View File

@@ -0,0 +1,12 @@
<?php
namespace x13allegro\Api\Model\Order;
final class Invoice
{
/** @var InvoiceFile */
public $file;
/** @var string */
public $invoiceNumber;
}

View File

@@ -0,0 +1,9 @@
<?php
namespace x13allegro\Api\Model\Order;
final class InvoiceFile
{
/** @var string */
public $name;
}

View File

@@ -0,0 +1,17 @@
<?php
namespace x13allegro\Api\Model\Order;
final class LineItem
{
/** @var string */
public $id;
/**
* @param string $id
*/
public function __construct($id = null)
{
$this->id = $id;
}
}

View File

@@ -0,0 +1,49 @@
<?php
namespace x13allegro\Api\Model\Order;
use JsonSerializable;
final class ParcelTrackingNumber implements JsonSerializable
{
/** @var string */
public $carrierId;
/** @var string */
public $waybill;
/** @var string */
public $carrierName;
/** @var LineItem[] */
public $lineItems;
/** @var array */
private $lineItemsCollection = [];
/**
* @param string $id
* @return $this
*/
public function lineItem($id)
{
if (!array_key_exists($id, $this->lineItemsCollection)) {
$this->lineItemsCollection[$id] = new LineItem($id);
}
return $this;
}
/**
* @return array
*/
public function jsonSerialize()
{
return array(
'carrierId' => $this->carrierId,
'waybill' => $this->waybill,
'carrierName' => $this->carrierName,
'lineItems' => array_values($this->lineItemsCollection)
);
}
}

View File

@@ -0,0 +1,9 @@
<?php
namespace x13allegro\Api\Model\Order;
final class ShipmentSummary
{
/** @var string */
public $lineItemsSent;
}