Basic Sendcloud integration with Shipment rework

This commit is contained in:
Andreas Palm
2022-10-26 23:46:38 +02:00
parent 2b5d01b52a
commit cd93d643f8
24 changed files with 1358 additions and 1390 deletions
@@ -0,0 +1,25 @@
<?php
namespace Xentral\Carrier\SendCloud\Data;
class Document
{
public const TYPE_LABEL = 'label';
public const TYPE_CP71 = 'cp71';
public const TYPE_CN23 = 'cn23';
public const TYPE_CN23_DEFAULT = 'cn23-default';
public const TYPE_COMMERCIAL_INVOICE = 'commercial-invoice';
public string $Type;
public string $Size;
public string $Link;
public static function fromApiResponse(object $data): Document
{
$obj = new Document();
$obj->Type = $data->type;
$obj->Size = $data->size;
$obj->Link = $data->link;
return $obj;
}
}