mirror of
https://github.com/anikeen-com/id.git
synced 2026-05-08 22:59:01 +00:00
refactor code
This commit is contained in:
@@ -34,7 +34,8 @@ class OrderItem extends BaseResource
|
||||
*/
|
||||
public function update(array $attributes = []): self
|
||||
{
|
||||
return (new self(fn() => $this->billable->request('PUT', sprintf('v1/orders/%s/items/%s', $this->parent->id, $this->id), $attributes)))
|
||||
return (new self(fn() => $this->billable->anikeenId()
|
||||
->request('PUT', sprintf('v1/orders/%s/items/%s', $this->parent->id, $this->id), $attributes)))
|
||||
->setBillable($this->billable)
|
||||
->setParent($this->parent);
|
||||
}
|
||||
@@ -46,6 +47,7 @@ class OrderItem extends BaseResource
|
||||
*/
|
||||
public function delete(): bool
|
||||
{
|
||||
return $this->billable->request('DELETE', sprintf('v1/orders/%s/items/%s', $this->parent->id, $this->id))->success();
|
||||
return $this->billable->anikeenId()
|
||||
->request('DELETE', sprintf('v1/orders/%s/items/%s', $this->parent->id, $this->id))->success();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user