Skip to content

Commit 189fe5c

Browse files
committed
Fixes
1 parent 088a47a commit 189fe5c

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/QueryParameters/GetAllocationsParams.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(
2525
public ?int $repeatState = null,
2626
public ?string $modifiedSince = null,
2727
public ?array $fields = null,
28-
public ?array $expand = null,
28+
public ?string $expand = null,
2929
?int $page = null,
3030
?int $perPage = null,
3131
?string $sort = null,
@@ -53,7 +53,7 @@ public function toArray(): array
5353
'repeat_state' => $this->repeatState,
5454
'modified_since' => $this->modifiedSince,
5555
'fields' => $this->fields ? implode(',', $this->fields) : null,
56-
'expand' => $this->expand ? implode(',', $this->expand) : null,
56+
'expand' => $this->expand ?? null,
5757
'page' => $this->page,
5858
'per-page' => $this->perPage,
5959
'sort' => $this->sort,

src/Requests/GetAllocations.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function resolveEndpoint(): string
3131
/** @return array<int, ProjectTaskResource> */
3232
public function createDtoFromResponse(Response $response): array
3333
{
34+
ray($response->json());
3435
return array_map(
3536
fn (array $object) => AllocationResource::createFromResponse($object),
3637
$response->json()

src/Resources/AllocationResource.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public function __construct(
3030
public ?string $created,
3131
public ?int $modifiedBy,
3232
public ?string $modified,
33+
public ?array $taskDays,
3334
) {}
3435

3536
/** @param array<string, mixed> $data */
@@ -57,6 +58,7 @@ public static function createFromResponse(array $data): self
5758
created: $data['created'] ?? null,
5859
modifiedBy: $data['modified_by'] ?? null,
5960
modified: $data['modified'] ?? null,
61+
taskDays: $data['task_days'] ?? null,
6062
);
6163
}
6264
}

0 commit comments

Comments
 (0)