Skip to content

Commit

Permalink
added raw fetch method on TradingPlatformAvailableAccountsResponseExt…
Browse files Browse the repository at this point in the history
…ended
  • Loading branch information
raslan-deriv committed Dec 27, 2024
1 parent 17ff41c commit b8d0123
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,23 @@ class TradingPlatformAvailableAccountsResponseExtended

return TradingPlatformAvailableAccountsResponse.fromJson(response.toJson());
}

/// Fetch available platform accounts in raw format.
/// This method returns the raw response from the API call, which includes
/// all records regardless of already registered products and account types.
/// Returns a [TradingPlatformAvailableAccountsReceive] object containing the raw response.
static Future<TradingPlatformAvailableAccountsReceive>
fetchAvailableAccountsRaw(
{required TradingPlatformAvailableAccountsRequest request}) async {
final TradingPlatformAvailableAccountsReceive response =
await _api.call(request: request);

checkException(
response: response,
exceptionCreator: ({BaseExceptionModel? baseExceptionModel}) =>
BaseAPIException(baseExceptionModel: baseExceptionModel),
);

return response;
}
}

0 comments on commit b8d0123

Please sign in to comment.