File tree 3 files changed +7
-4
lines changed 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 17
17
use hiqdev \php \billing \Exception \InvariantException ;
18
18
use hiqdev \php \billing \plan \PlanInterface ;
19
19
use hiqdev \php \billing \target \TargetInterface ;
20
+ use yii \helpers \Json ;
20
21
21
22
/**
22
23
* Sale.
@@ -129,9 +130,9 @@ public function setId($id)
129
130
$ this ->id = $ id ;
130
131
}
131
132
132
- public function getData (): ?string
133
+ public function getData (): ?array
133
134
{
134
- return $ this ->data ;
135
+ return ! empty ( $ this ->data ) ? Json:: decode ( $ this -> data , true ) : null ;
135
136
}
136
137
137
138
public function jsonSerialize (): array
Original file line number Diff line number Diff line change @@ -28,4 +28,6 @@ class SaleCreationDto
28
28
public $ closeTime ;
29
29
30
30
public $ data ;
31
+
32
+ public $ reason ;
31
33
}
Original file line number Diff line number Diff line change @@ -62,9 +62,9 @@ public function getTime();
62
62
public function getCloseTime (): ?DateTimeImmutable ;
63
63
64
64
/**
65
- * @return string |null
65
+ * @return array |null
66
66
*/
67
- public function getData (): ?string ;
67
+ public function getData (): ?array ;
68
68
69
69
/**
70
70
* @param DateTimeImmutable $time
You can’t perform that action at this time.
0 commit comments