diff --git a/src/Resources/Sheet.php b/src/Resources/Sheet.php index 3ea5b1e..129ba83 100644 --- a/src/Resources/Sheet.php +++ b/src/Resources/Sheet.php @@ -332,6 +332,18 @@ public function getColumns(): array return $this->columns; } + public function addColumn(array $column) + { + return $this->addColumns([$column]); + } + + public function addColumns(array $column) + { + return $this->client->post("sheets/$this->id/columns", [ + 'json' => $column + ]); + } + public function addSummaryField(String $title, String $formula, String $type = 'TEXT_NUMBER') { $options = [ @@ -360,4 +372,13 @@ public function deleteSummaryField(String $fieldId) { return $this->deleteSummaryFields([$fieldId]); } + + public function deleteAllSummaryFields() + { + return $this->deleteSummaryFields( + collect($this->getSummaryFields()->fields) + ->pluck('id') + ->toArray() + ); + } }