Skip to content

Commit 1766a61

Browse files
Remove client-side state validation
1 parent 7b402bb commit 1766a61

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/Picqer/Financials/Moneybird/Entities/Estimate.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,6 @@ public function sendEstimate($deliveryMethodOrOptions = SendInvoiceOptions::METH
161161
*/
162162
public function changeState(string $state)
163163
{
164-
if (! in_array($state, [
165-
'accepted',
166-
'rejected',
167-
'open',
168-
'late',
169-
'billed',
170-
'archived',
171-
], true)) {
172-
throw new InvalidArgumentException("Expected valid state. Received: '$state'");
173-
}
174-
175164
$response = $this->connection()->patch($this->getEndpoint() . '/' . urlencode($this->id) . '/change_state', json_encode([
176165
'state' => $state,
177166
]));

0 commit comments

Comments
 (0)