Repository: stripe/stripe-php (language: php)

Issue:
`Stripe\Tax\Settings::update` requires an ID to be passed
### Describe the bug

`Stripe\Tax\Settings::update` requires an ID to be passed, which is not compatible with the Stripe API

### To Reproduce

```php
\Stripe\Tax\Settings::update(null, $taxSettings);
```

triggers the following error:

```
  Could not determine which URL to request: Stripe\Tax\Settings instance has invalid ID:
```

and sending a value of `''` (empty string) for the ID triggers the following error:

```
Unrecognized request URL (POST: /v1/tax/settings/). If you are trying to list objects, remove the trailing slash. If you are trying to retrieve an object, make sure you passed a valid (non-empty) identifier in your code. Please see https://stripe.com/docs or we can help at https://support.stripe.com/.
```

### Expected behavior

URL should be generated correctly without an ID, and error should not be triggered. Ideally the `$id` argument should not exist on this method

### Code snippets

_No response_

### OS

N/A

### PHP version

PHP 8.2

### Library version

13.10.0

### API version

2023-10-16

### Additional context

_No response_


Discussion / hints:
@JakeBooher Thanks you for flagging and sorry about the trouble. This is a surprising one, we'll investigate the right fix but it might take a bit of time on that one.

Fix patch:
diff --git a/lib/Tax/Settings.php b/lib/Tax/Settings.php
index 6a1e1d756..fe9638fa4 100644
--- a/lib/Tax/Settings.php
+++ b/lib/Tax/Settings.php
@@ -21,8 +21,27 @@ class Settings extends \Stripe\SingletonApiResource
     const OBJECT_NAME = 'tax.settings';
 
     use \Stripe\ApiOperations\SingletonRetrieve;
-    use \Stripe\ApiOperations\Update;
 
     const STATUS_ACTIVE = 'active';
     const STATUS_PENDING = 'pending';
+
+    /**
+     * @param null|array $params
+     * @param null|array|string $opts
+     *
+     * @throws \Stripe\Exception\ApiErrorException if the request fails
+     *
+     * @return static the updated resource
+     */
+    public static function update($params = null, $opts = null)
+    {
+        self::_validateParams($params);
+        $url = '/v1/tax/settings';
+
+        list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
+        $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
+        $obj->setLastResponse($response);
+
+        return $obj;
+    }
 }


Test patch:
diff --git a/tests/Stripe/Tax/SettingsTest.php b/tests/Stripe/Tax/SettingsTest.php
new file mode 100644
index 000000000..243401c23
--- /dev/null
+++ b/tests/Stripe/Tax/SettingsTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Stripe\Tax;
+
+/**
+ * @internal
+ * @covers \Stripe\Terminal\ConnectionToken
+ */
+final class SettingsTest extends \Stripe\TestCase
+{
+    use \Stripe\TestHelper;
+
+    public function testIsUpdateable()
+    {
+        $this->expectsRequest(
+            'post',
+            '/v1/tax/settings'
+        );
+        $resource = Settings::update([
+            'defaults' => [
+                'tax_behavior' => 'exclusive',
+            ],
+        ]);
+        static::assertInstanceOf(\Stripe\Tax\Settings::class, $resource);
+    }
+}