| @@ 7-40 (lines=34) @@ | ||
| 4 | ||
| 5 | use JulianoBailao\DomusApi\Core\DataReceiver; |
|
| 6 | ||
| 7 | class PersonData extends DataReceiver |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * Put a address on person data. |
|
| 11 | * |
|
| 12 | * @param array $address |
|
| 13 | * |
|
| 14 | * @return stdClass |
|
| 15 | */ |
|
| 16 | public function address(array $address) |
|
| 17 | { |
|
| 18 | if (!isset($this->data->addresses)) { |
|
| 19 | $this->data->addresses = []; |
|
| 20 | } |
|
| 21 | ||
| 22 | return $this->data->addresses[] = (object) $address; |
|
| 23 | } |
|
| 24 | ||
| 25 | /** |
|
| 26 | * Put a contact on person data. |
|
| 27 | * |
|
| 28 | * @param array $contact |
|
| 29 | * |
|
| 30 | * @return stdClass |
|
| 31 | */ |
|
| 32 | public function contacts(array $contact) |
|
| 33 | { |
|
| 34 | if (!isset($this->data->contacts)) { |
|
| 35 | $this->data->contacts = []; |
|
| 36 | } |
|
| 37 | ||
| 38 | return $this->data->contacts[] = (object) $contact; |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||
| @@ 7-40 (lines=34) @@ | ||
| 4 | ||
| 5 | use JulianoBailao\DomusApi\Core\DataReceiver; |
|
| 6 | ||
| 7 | class ProfitabilityData extends DataReceiver |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * Put a filter on profitability data. |
|
| 11 | * |
|
| 12 | * @param array $filters |
|
| 13 | * |
|
| 14 | * @return stdClass |
|
| 15 | */ |
|
| 16 | public function filtros(array $filters) |
|
| 17 | { |
|
| 18 | if (!isset($this->data->Filtros)) { |
|
| 19 | $this->data->Filtros = []; |
|
| 20 | } |
|
| 21 | ||
| 22 | return $this->data->Filtros[] = (object) $filters; |
|
| 23 | } |
|
| 24 | ||
| 25 | /** |
|
| 26 | * Put a ordernation on profitability data. |
|
| 27 | * |
|
| 28 | * @param array $orders |
|
| 29 | * |
|
| 30 | * @return stdClass |
|
| 31 | */ |
|
| 32 | public function ordenacoes(array $orders) |
|
| 33 | { |
|
| 34 | if (!isset($this->data->Ordenacoes)) { |
|
| 35 | $this->data->Ordenacoes = []; |
|
| 36 | } |
|
| 37 | ||
| 38 | return $this->data->Ordenacoes[] = (object) $orders; |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||