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
+31-21
Original file line number
Diff line number
Diff line change
@@ -118,11 +118,11 @@ By default, an API error will raise a `Boltpay.SDK.Models.Errors.SDKException` e
118
118
119
119
When custom error responses are specified for an operation, the SDK may also throw their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `GetDetailsAsync` method throws the following exceptions:
You can override the default server globally by passing a server index to the `serverIndex: 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:
177
-
178
-
| # | Server | Variables |
179
-
| - | ------ | --------- |
180
-
| 0 |`https://{environment}.bolt.com/v3`|`environment` (default is `api-sandbox`) |
174
+
### Server Variables
181
175
176
+
The default server `https://{environment}.bolt.com/v3` contains variables and is set to `https://api-sandbox.bolt.com/v3` by default. To override default values, the following parameters are available when initializing the SDK client instance:
177
+
*`environment: ServerEnvironment`
182
178
179
+
### Override Server URL Per-Client
183
180
184
-
#### Variables
181
+
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:
182
+
```csharp
183
+
usingBoltpay.SDK;
184
+
usingBoltpay.SDK.Models.Requests;
185
+
usingBoltpay.SDK.Models.Components;
185
186
186
-
Some of the server options above contain variables. If you want to set the values of those variables, the following options are provided for doing so:
187
-
*`environment: ServerEnvironment`
187
+
varsdk=newBoltSDK(
188
+
serverUrl: "https://api-sandbox.bolt.com/v3",
189
+
security: newSecurity() {
190
+
Oauth="<YOUR_OAUTH_HERE>",
191
+
ApiKey="<YOUR_API_KEY_HERE>",
192
+
}
193
+
);
188
194
189
-
### Override Server URL Per-Client
195
+
varres=awaitsdk.Account.GetDetailsAsync(
196
+
xPublishableKey: "<value>",
197
+
xMerchantClientId: "<id>"
198
+
);
190
199
191
-
The default server can also be overridden globally by passing a URL to the `serverUrl: str` optional parameter when initializing the SDK client instance. For example:
200
+
// handle response
201
+
```
192
202
<!-- End Server Selection [server] -->
193
203
194
204
<!-- Start Authentication [security] -->
@@ -198,10 +208,10 @@ The default server can also be overridden globally by passing a URL to the `serv
198
208
199
209
This SDK supports the following security schemes globally:
200
210
201
-
| Name | Type| Scheme |
202
-
| ------------|------------ | ------------ |
203
-
|`Oauth`| oauth2| OAuth2 token |
204
-
|`ApiKey`| apiKey| API key |
211
+
| Name | Type | Scheme |
212
+
| -------- | ------ | ------------ |
213
+
|`Oauth`| oauth2 | OAuth2 token |
214
+
|`ApiKey`| apiKey | API key |
205
215
206
216
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
|`ProcessorResponse`|[ProcessorResponse](../../Models/Components/ProcessorResponse.md)|:heavy_minus_sign:| Raw authorization response from the payment processor ||
0 commit comments