forked from php-twinfield/twinfield
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSalesTransaction.php
64 lines (55 loc) · 1.71 KB
/
SalesTransaction.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
namespace PhpTwinfield;
use PhpTwinfield\Transactions\TransactionFields\InvoiceNumberField;
use PhpTwinfield\Transactions\TransactionFields\PaymentReferenceField;
use PhpTwinfield\Transactions\TransactionLineFields\ThreeDimFields;
use PhpTwinfield\Transactions\TransactionFields\DueDateField;
/**
* @link https://accounting.twinfield.com/webservices/documentation/#/ApiReference/SalesTransactions
*/
class SalesTransaction extends BaseTransaction
{
use InvoiceNumberField;
use PaymentReferenceField;
use ThreeDimFields;
use DueDateField;
/**
* @var string|null The sales transaction origin reference (id). Provided in form of Guid. Read-only attribute.
* Sample: "f386393c-e4ba-439a-add4-3b366535d7bf".
*/
private $originReference;
/**
* @return string
*/
public function getLineClassName(): string
{
return SalesTransactionLine::class;
}
/**
* @return string|null
*/
public function getOriginReference(): ?string
{
return $this->originReference;
}
/**
* @param string|null $originReference
* @return $this
*/
public function setOriginReference(?string $originReference): SalesTransaction
{
$this->originReference = $originReference;
return $this;
}
/**
* When creating a new sales transaction, don't include this tag as the transaction number is determined by the
* system. When updating a sales transaction, the related transaction number should be provided.
*
* @param int|null $number
* @return $this
*/
public function setNumber(?int $number): BaseTransaction
{
return parent::setNumber($number);
}
}