Skip to content

Commit bd87fe4

Browse files
committed
🌿 Update README.md
1 parent 5fd4e02 commit bd87fe4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,23 @@ const response = await client.payments.create(..., {
201201
});
202202
```
203203

204+
### Receive extra properties
205+
206+
Every response includes any extra properties in the JSON response that were not specified in the type.
207+
This can be useful for API features not present in the SDK yet.
208+
209+
You can receive and interact with the extra properties by accessing each one directly like so:
210+
211+
```typescript
212+
const response = await client.locations.create(...);
213+
214+
// Cast the response type into an `any`.
215+
const location = response.location as any;
216+
217+
// Then access the extra property by its name.
218+
const undocumentedProperty = location.undocumentedProperty;
219+
```
220+
204221
### Retries
205222

206223
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long

0 commit comments

Comments
 (0)