maxResults = new MaxResults(MaxResults::DEFAULT); } /** * @param string $orderBy * @param string $dir * @return void */ public function setOrderBy(string $orderBy, string $dir): void { $this->sortParameter = SortParameter::from($orderBy); $this->sortDirection = SortDirection::from(strtoupper($dir)); } /** * @param string $id * @param string $dir * @return ListPlansCommand */ public function setCursor(string $id, string $dir = 'starting_after'): self { $this->cursor = new Id($id); $this->cursorDirection = CursorDirection::from($dir); return $this; } /** * @param int $limit * @return ListPlansCommand */ public function setLimit(int $limit): self { $this->maxResults = new MaxResults($limit); return $this; } }