You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-20Lines changed: 17 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -366,10 +366,10 @@ If a HTTP request fails, an operation my also throw an error from the `sdk/model
366
366
367
367
In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `createTransactions` method may throw the following errors:
@@ -442,12 +442,16 @@ Validation errors can also occur when either method arguments or data returned f
442
442
443
443
### Select Server by Index
444
444
445
-
You can override the default server globally by passing a server index to the `serverIdx` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
445
+
You can override the default server globally by passing a server index to the `serverIdx: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
446
446
447
-
| # | Server | Variables |
448
-
| - | ------ | --------- |
449
-
| 0 |`http://localhost`| None |
450
-
| 1 |`https://{organization}.{environment}.formance.cloud`|`environment` (default is `sandbox`), `organization` (default is `orgID-stackID`) |
If the selected server has variables, you may override their default values through the additional parameters made available in the SDK constructor.
453
+
454
+
#### Example
451
455
452
456
```typescript
453
457
import { SDK } from"@formance/formance-sdk";
@@ -471,16 +475,9 @@ run();
471
475
472
476
```
473
477
474
-
#### Variables
475
-
476
-
Some of the server options above contain variables. If you want to set the values of those variables, the following optional parameters are available when initializing the SDK client instance:
477
-
*`environment: models.ServerEnvironment`
478
-
*`organization: string`
479
-
480
478
### Override Server URL Per-Client
481
479
482
-
The default server can also be overridden globally by passing a URL to the `serverURL` optional parameter when initializing the SDK client instance. For example:
483
-
480
+
The default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:
0 commit comments