Skip to content

Commit e18b0e4

Browse files
[2026-05-18] - Sync content (26038414715) (#67)
> [!NOTE] > This PR copies content from the source repo. > Source repo commit [3b622c5](shoptet/cms4@3b622c5) **List of changes:** - Add support for new delivery endpoints: - `getListOfShipments` - `createShipment` - `getShipmentDetail` - `createShipmentByOrderCode` - `shipmentCancellationRequest` - `getShipmentShippingOptionsByOrderCode` - `getListOfShipmentCarriers` - `getShipmentCarrierDetail` - `closeCarrierShipments` Co-authored-by: sochurekmichael <1220229+sochurekmichael@users.noreply.github.com>
1 parent 2d97bf5 commit e18b0e4

55 files changed

Lines changed: 2708 additions & 0 deletions

File tree

Some content is hidden

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

init.php

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,58 @@
685685
require_once __DIR__ . '/src/Endpoint/Customers/UpdateCustomerResponse/UpdateCustomerResponse.php';
686686
require_once __DIR__ . '/src/Endpoint/Customers/UpdateCustomerResponse/UpdateCustomerResponse/Data.php';
687687
require_once __DIR__ . '/src/Endpoint/Delete.php';
688+
require_once __DIR__ . '/src/Endpoint/Delivery/CloseCarrierShipments.php';
689+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipment.php';
690+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipmentByOrderCode.php';
691+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipmentByOrderCodeResponse/CreateShipmentByOrderCodeResponse.php';
692+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipmentByOrderCodeResponse/CreateShipmentByOrderCodeResponse/Data.php';
693+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipmentByOrderCodeResponse/CreateShipmentByOrderCodeResponse/Data/CheckUrls.php';
694+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipmentRequest/CreateShipmentRequest.php';
695+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipmentRequest/CreateShipmentRequest/Data.php';
696+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipmentRequest/CreateShipmentRequest/Data/Packages.php';
697+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipmentRequest/CreateShipmentRequest/Data/Packages/Item1.php';
698+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipmentRequest/CreateShipmentRequest/Data/Packages/Item2.php';
699+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipmentRequest/CreateShipmentRequest/Data/Packages/Item3.php';
700+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipmentResponse/CreateShipmentResponse.php';
701+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipmentResponse/CreateShipmentResponse/Data.php';
702+
require_once __DIR__ . '/src/Endpoint/Delivery/CreateShipmentResponse/CreateShipmentResponse/Data/CheckUrls.php';
703+
require_once __DIR__ . '/src/Endpoint/Delivery/GetListOfShipmentCarriers.php';
704+
require_once __DIR__ . '/src/Endpoint/Delivery/GetListOfShipmentCarriersResponse/GetListOfShipmentCarriersResponse.php';
705+
require_once __DIR__ . '/src/Endpoint/Delivery/GetListOfShipmentCarriersResponse/GetListOfShipmentCarriersResponse/Data.php';
706+
require_once __DIR__ . '/src/Endpoint/Delivery/GetListOfShipmentCarriersResponse/GetListOfShipmentCarriersResponse/Data/ShipmentCarriers.php';
707+
require_once __DIR__ . '/src/Endpoint/Delivery/GetListOfShipmentCarriersResponse/GetListOfShipmentCarriersResponse/Data/ShipmentCarriers/Item.php';
708+
require_once __DIR__ . '/src/Endpoint/Delivery/GetListOfShipmentCarriersResponse/GetListOfShipmentCarriersResponse/Data/ShipmentCarriers/Item/Countries.php';
709+
require_once __DIR__ . '/src/Endpoint/Delivery/GetListOfShipments.php';
710+
require_once __DIR__ . '/src/Endpoint/Delivery/GetListOfShipmentsResponse/GetListOfShipmentsResponse.php';
711+
require_once __DIR__ . '/src/Endpoint/Delivery/GetListOfShipmentsResponse/GetListOfShipmentsResponse/Data.php';
712+
require_once __DIR__ . '/src/Endpoint/Delivery/GetListOfShipmentsResponse/GetListOfShipmentsResponse/Data/Items.php';
713+
require_once __DIR__ . '/src/Endpoint/Delivery/GetListOfShipmentsResponse/GetListOfShipmentsResponse/Data/Items/Item.php';
714+
require_once __DIR__ . '/src/Endpoint/Delivery/GetListOfShipmentsResponse/GetListOfShipmentsResponse/Data/Items/Item/Packages.php';
715+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentCarrierDetail.php';
716+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentCarrierDetailResponse/GetShipmentCarrierDetailResponse.php';
717+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentCarrierDetailResponse/GetShipmentCarrierDetailResponse/Data.php';
718+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentCarrierDetailResponse/GetShipmentCarrierDetailResponse/Data/Addresses.php';
719+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentCarrierDetailResponse/GetShipmentCarrierDetailResponse/Data/BankAccounts.php';
720+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentCarrierDetailResponse/GetShipmentCarrierDetailResponse/Data/BankAccounts/Item.php';
721+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentCarrierDetailResponse/GetShipmentCarrierDetailResponse/Data/Methods.php';
722+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentCarrierDetailResponse/GetShipmentCarrierDetailResponse/Data/Methods/Item.php';
723+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentCarrierDetailResponse/GetShipmentCarrierDetailResponse/Data/Services.php';
724+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentCarrierDetailResponse/GetShipmentCarrierDetailResponse/Data/Services/Item.php';
725+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentCarrierDetailResponse/GetShipmentCarrierDetailResponse/Data/Services/Item/Countries.php';
726+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentDetail.php';
727+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentDetailResponse/GetShipmentDetailResponse.php';
728+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentDetailResponse/GetShipmentDetailResponse/Data.php';
729+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentDetailResponse/GetShipmentDetailResponse/Data/Packages.php';
730+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentShippingOptionsByOrderCode.php';
731+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentShippingOptionsByOrderCodeResponse/GetShipmentShippingOptionsByOrderCodeResponse.php';
732+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentShippingOptionsByOrderCodeResponse/GetShipmentShippingOptionsByOrderCodeResponse/Data.php';
733+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentShippingOptionsByOrderCodeResponse/GetShipmentShippingOptionsByOrderCodeResponse/Data/ShippingOptions.php';
734+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentShippingOptionsByOrderCodeResponse/GetShipmentShippingOptionsByOrderCodeResponse/Data/ShippingOptions/Item.php';
735+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentShippingOptionsByOrderCodeResponse/GetShipmentShippingOptionsByOrderCodeResponse/Data/ShippingOptions/Item/BankAccounts.php';
736+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentShippingOptionsByOrderCodeResponse/GetShipmentShippingOptionsByOrderCodeResponse/Data/ShippingOptions/Item/BankAccounts/Item.php';
737+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentShippingOptionsByOrderCodeResponse/GetShipmentShippingOptionsByOrderCodeResponse/Data/ShippingOptions/Item/CarrierAddresses.php';
738+
require_once __DIR__ . '/src/Endpoint/Delivery/GetShipmentShippingOptionsByOrderCodeResponse/GetShipmentShippingOptionsByOrderCodeResponse/Data/ShippingOptions/Item/CarrierAddresses/Item.php';
739+
require_once __DIR__ . '/src/Endpoint/Delivery/ShipmentCancellationRequest.php';
688740
require_once __DIR__ . '/src/Endpoint/DeliveryNotes/DeliveryNoteFromOrder.php';
689741
require_once __DIR__ . '/src/Endpoint/DeliveryNotes/DeliveryNoteFromOrderRequest/DeliveryNoteFromOrderRequest.php';
690742
require_once __DIR__ . '/src/Endpoint/DeliveryNotes/DeliveryNoteFromOrderRequest/DeliveryNoteFromOrderRequest/Data.php';
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
namespace Shoptet\Api\Sdk\Php\Endpoint\Delivery;
4+
5+
use Shoptet\Api\Sdk\Php\Endpoint\Post;
6+
7+
/**
8+
* @see https://api.docs.shoptet.com/shoptet-api/openapi/Delivery/closecarriershipments
9+
*
10+
* @method CloseCarrierShipments setBody(null $entity)
11+
* @method null getBody()
12+
*/
13+
class CloseCarrierShipments extends Post
14+
{
15+
protected array $supportedPathParams = ['code' => true];
16+
protected array $supportedQueryParams = ['language' => false];
17+
18+
public function getRequestEntityClass(): null
19+
{
20+
return null;
21+
}
22+
23+
public function getResponseEntityClass(): null
24+
{
25+
return null;
26+
}
27+
28+
public function getEndpoint(): string
29+
{
30+
return '/api/shipments/carriers/{code}/close';
31+
}
32+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
namespace Shoptet\Api\Sdk\Php\Endpoint\Delivery;
4+
5+
use Shoptet\Api\Sdk\Php\Endpoint\Delivery\CreateShipmentRequest\CreateShipmentRequest;
6+
use Shoptet\Api\Sdk\Php\Endpoint\Delivery\CreateShipmentResponse\CreateShipmentResponse;
7+
use Shoptet\Api\Sdk\Php\Endpoint\Post;
8+
9+
/**
10+
* @see https://api.docs.shoptet.com/shoptet-api/openapi/Delivery/createshipment
11+
*
12+
* @method CreateShipment setBody(null|array<string, mixed>|CreateShipmentRequest $entity)
13+
* @method null|CreateShipmentRequest getBody()
14+
*/
15+
class CreateShipment extends Post
16+
{
17+
protected array $supportedPathParams = [];
18+
protected array $supportedQueryParams = ['language' => false];
19+
20+
public function getRequestEntityClass(): string
21+
{
22+
return CreateShipmentRequest::class;
23+
}
24+
25+
public function getResponseEntityClass(): string
26+
{
27+
return CreateShipmentResponse::class;
28+
}
29+
30+
public function getEndpoint(): string
31+
{
32+
return '/api/shipments';
33+
}
34+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
namespace Shoptet\Api\Sdk\Php\Endpoint\Delivery;
4+
5+
use Shoptet\Api\Sdk\Php\Endpoint\Delivery\CreateShipmentByOrderCodeResponse\CreateShipmentByOrderCodeResponse;
6+
use Shoptet\Api\Sdk\Php\Endpoint\Post;
7+
8+
/**
9+
* @see https://api.docs.shoptet.com/shoptet-api/openapi/Delivery/createshipmentbyordercode
10+
*
11+
* @method CreateShipmentByOrderCode setBody(null $entity)
12+
* @method null getBody()
13+
*/
14+
class CreateShipmentByOrderCode extends Post
15+
{
16+
protected array $supportedPathParams = ['code' => true];
17+
protected array $supportedQueryParams = ['language' => false];
18+
19+
public function getRequestEntityClass(): null
20+
{
21+
return null;
22+
}
23+
24+
public function getResponseEntityClass(): string
25+
{
26+
return CreateShipmentByOrderCodeResponse::class;
27+
}
28+
29+
public function getEndpoint(): string
30+
{
31+
return '/api/shipments/order/{code}';
32+
}
33+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
namespace Shoptet\Api\Sdk\Php\Endpoint\Delivery\CreateShipmentByOrderCodeResponse;
4+
5+
use Shoptet\Api\Sdk\Php\Component\Entity\Entity;
6+
use Shoptet\Api\Sdk\Php\Component\Entity\Errors;
7+
use Shoptet\Api\Sdk\Php\Endpoint\Delivery\CreateShipmentByOrderCodeResponse\CreateShipmentByOrderCodeResponse\Data;
8+
9+
class CreateShipmentByOrderCodeResponse extends Entity
10+
{
11+
protected ?Data $data;
12+
protected ?Errors $errors;
13+
14+
public function getData(): ?Data
15+
{
16+
return $this->data;
17+
}
18+
19+
public function setData(?Data $data): static
20+
{
21+
$this->data = $data;
22+
return $this;
23+
}
24+
25+
public function getErrors(): ?Errors
26+
{
27+
return $this->errors;
28+
}
29+
30+
public function setErrors(?Errors $errors): static
31+
{
32+
$this->errors = $errors;
33+
return $this;
34+
}
35+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
namespace Shoptet\Api\Sdk\Php\Endpoint\Delivery\CreateShipmentByOrderCodeResponse\CreateShipmentByOrderCodeResponse;
4+
5+
use Shoptet\Api\Sdk\Php\Component\Entity\Entity;
6+
use Shoptet\Api\Sdk\Php\Endpoint\Delivery\CreateShipmentByOrderCodeResponse\CreateShipmentByOrderCodeResponse\Data\CheckUrls;
7+
8+
class Data extends Entity
9+
{
10+
protected ?string $guid;
11+
protected ?CheckUrls $checkUrls;
12+
13+
public function getGuid(): ?string
14+
{
15+
return $this->guid;
16+
}
17+
18+
public function setGuid(?string $guid): static
19+
{
20+
$this->guid = $guid;
21+
return $this;
22+
}
23+
24+
public function getCheckUrls(): ?CheckUrls
25+
{
26+
return $this->checkUrls;
27+
}
28+
29+
public function setCheckUrls(?CheckUrls $checkUrls): static
30+
{
31+
$this->checkUrls = $checkUrls;
32+
return $this;
33+
}
34+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
namespace Shoptet\Api\Sdk\Php\Endpoint\Delivery\CreateShipmentByOrderCodeResponse\CreateShipmentByOrderCodeResponse\Data;
4+
5+
use Shoptet\Api\Sdk\Php\Component\Entity\EntityCollection;
6+
7+
/**
8+
* @extends EntityCollection<string>
9+
* @property string[] $data
10+
* @method string[] toArray()
11+
* @method void set(int $key, string $item)
12+
* @method null|string get(int $key)
13+
* @method void add(string $item)
14+
* @method null|string remove(int $key)
15+
* @method bool removeItem(string $item, bool $strict = true)
16+
* @method bool contains(string $item, bool $strict = true)
17+
* @method null|string offsetGet(int $offset)
18+
* @method void offsetSet(int $offset, string $value)
19+
*/
20+
class CheckUrls extends EntityCollection
21+
{
22+
/**
23+
* @param array<string, mixed> $data
24+
* @return string
25+
*/
26+
public function getItemType(array $data): string
27+
{
28+
return 'string';
29+
}
30+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace Shoptet\Api\Sdk\Php\Endpoint\Delivery\CreateShipmentRequest;
4+
5+
use Shoptet\Api\Sdk\Php\Component\Entity\Entity;
6+
use Shoptet\Api\Sdk\Php\Endpoint\Delivery\CreateShipmentRequest\CreateShipmentRequest\Data;
7+
8+
class CreateShipmentRequest extends Entity
9+
{
10+
protected Data $data;
11+
12+
public function getData(): Data
13+
{
14+
return $this->data;
15+
}
16+
17+
public function setData(Data $data): static
18+
{
19+
$this->data = $data;
20+
return $this;
21+
}
22+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?php
2+
3+
namespace Shoptet\Api\Sdk\Php\Endpoint\Delivery\CreateShipmentRequest\CreateShipmentRequest;
4+
5+
use Shoptet\Api\Sdk\Php\Component\Entity\Entity;
6+
use Shoptet\Api\Sdk\Php\Component\ValueObject\TypePriceNullable;
7+
use Shoptet\Api\Sdk\Php\Endpoint\Delivery\CreateShipmentRequest\CreateShipmentRequest\Data\Packages;
8+
9+
class Data extends Entity
10+
{
11+
protected string $orderCode;
12+
protected ?string $note;
13+
protected ?TypePriceNullable $cod;
14+
protected ?int $shippingId;
15+
protected ?int $addressId;
16+
protected ?int $bankAccountId;
17+
protected ?Packages $packages;
18+
19+
public function getOrderCode(): string
20+
{
21+
return $this->orderCode;
22+
}
23+
24+
public function setOrderCode(string $orderCode): static
25+
{
26+
$this->orderCode = $orderCode;
27+
return $this;
28+
}
29+
30+
public function getNote(): ?string
31+
{
32+
return $this->note;
33+
}
34+
35+
public function setNote(?string $note): static
36+
{
37+
$this->note = $note;
38+
return $this;
39+
}
40+
41+
public function getCod(): ?TypePriceNullable
42+
{
43+
return $this->cod;
44+
}
45+
46+
public function setCod(?TypePriceNullable $cod): static
47+
{
48+
$this->cod = $cod;
49+
return $this;
50+
}
51+
52+
public function getShippingId(): ?int
53+
{
54+
return $this->shippingId;
55+
}
56+
57+
public function setShippingId(?int $shippingId): static
58+
{
59+
$this->shippingId = $shippingId;
60+
return $this;
61+
}
62+
63+
public function getAddressId(): ?int
64+
{
65+
return $this->addressId;
66+
}
67+
68+
public function setAddressId(?int $addressId): static
69+
{
70+
$this->addressId = $addressId;
71+
return $this;
72+
}
73+
74+
public function getBankAccountId(): ?int
75+
{
76+
return $this->bankAccountId;
77+
}
78+
79+
public function setBankAccountId(?int $bankAccountId): static
80+
{
81+
$this->bankAccountId = $bankAccountId;
82+
return $this;
83+
}
84+
85+
public function getPackages(): ?Packages
86+
{
87+
return $this->packages;
88+
}
89+
90+
public function setPackages(?Packages $packages): static
91+
{
92+
$this->packages = $packages;
93+
return $this;
94+
}
95+
}

0 commit comments

Comments
 (0)