Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
order.php
1<?php
3
6
7class Order extends Entity
8{
9 public function getEntityTypeId()
10 {
11 return $this->fields->get('entityTypeId');
12 }
13
14 public function setEntityTypeId($value)
15 {
16 $this->fields->set('entityTypeId', $value);
17 return $this;
18 }
19
20 public function getEntityId()
21 {
22 return $this->fields->get('entityId');
23 }
24
25 public function setEntityId($value)
26 {
27 $this->fields->set('entityId', $value);
28 return $this;
29 }
30
31 public function getDateUpdate()
32 {
33 return $this->fields->get('dateUpdate');
34 }
35
36 public function setDateUpdate($value)
37 {
38 $this->fields->set('dateUpdate', $value);
39 return $this;
40 }
41
42 public function getProviderId()
43 {
44 return $this->fields->get('providerId');
45 }
46
47 public function setProviderId($value)
48 {
49 $this->fields->set('providerId', $value);
50 return $this;
51 }
52
53 public function getCurrency()
54 {
55 return $this->fields->get('currency');
56 }
57
58 public function setCurrency($value)
59 {
60 $this->fields->set('currency', $value);
61 return $this;
62 }
63
64 public function getStatus()
65 {
66 return $this->fields->get('status');
67 }
68
69 public function setStatus($value)
70 {
71 $this->fields->set('status', $value);
72 return $this;
73 }
74
75 public function getXmlId()
76 {
77 return $this->fields->get('xmlId');
78 }
79
80 public function setXmlId($value)
81 {
82 $this->fields->set('xmlId', $value);
83 return $this;
84 }
85
86 public function getAmount()
87 {
88 return $this->fields->get('amount');
89 }
90
91 public function setAmount($value)
92 {
93 $this->fields->set('amount', $value);
94 return $this;
95 }
96
97 static public function createFromArray(array $fields)
98 {
99 return new static([
100 'entityTypeId' => EntityType::ORDER,
101 'entityId' => $fields['ENTITY_ID'],
102 'dateUpdate' => $fields['DATE_UPDATE']->format('c'),
103 'providerId' => $fields['PROVIDER_ID'],
104 'currency' => $fields['CURRENCY'],
105 'status' => $fields['STATUS'],
106 'xmlId' => $fields['XML_ID'],
107 'amount' => $fields['AMOUNT'],
108 ]);
109 }
110
111 public function getType()
112 {
113 return EntityType::ORDER;
114 }
115}