Skip to content

Commit bb83aff

Browse files
committed
Merge branch 'freshworks' of github.com:sahani-deriv/flutter-deriv-api into freshworks
2 parents 9634d55 + f1e4e8a commit bb83aff

4 files changed

+10
-7
lines changed

lib/api/response/get_account_status_response_result.dart

+9-4
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ class GetAccountStatusResponse extends GetAccountStatusResponseModel {
5555
///
5656
/// For parameters information refer to [GetAccountStatusRequest].
5757
/// Throws an [BaseAPIException] if API response contains an error.
58-
static Future<GetAccountStatusReceive> fetchAccountStatusRaw() async {
58+
static Future<GetAccountStatusReceive> fetchAccountStatusRaw({
59+
String? loginId,
60+
}) async {
5961
final GetAccountStatusReceive response = await _api.call(
60-
request: const GetAccountStatusRequest(),
62+
request: GetAccountStatusRequest(loginid: loginId),
6163
);
6264

6365
checkException(
@@ -73,8 +75,11 @@ class GetAccountStatusResponse extends GetAccountStatusResponseModel {
7375
///
7476
/// For parameters information refer to [GetAccountStatusRequest].
7577
/// Throws an [BaseAPIException] if API response contains an error.
76-
static Future<GetAccountStatusResponse> fetchAccountStatus() async {
77-
final GetAccountStatusReceive response = await fetchAccountStatusRaw();
78+
static Future<GetAccountStatusResponse> fetchAccountStatus({
79+
String? loginId,
80+
}) async {
81+
final GetAccountStatusReceive response =
82+
await fetchAccountStatusRaw(loginId: loginId);
7883

7984
return GetAccountStatusResponse.fromJson(response.getAccountStatus);
8085
}

lib/api/response/p2p_advert_create_response_result.dart

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import 'package:equatable/equatable.dart';
44
import 'package:flutter_deriv_api/api/exceptions/base_api_exception.dart';
5-
65
import 'package:flutter_deriv_api/api/models/base_exception_model.dart';
76
import 'package:flutter_deriv_api/basic_api/generated/p2p_advert_create_receive.dart';
87
import 'package:flutter_deriv_api/basic_api/generated/p2p_advert_create_send.dart';

lib/api/response/p2p_advert_list_response_result.dart

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import 'package:equatable/equatable.dart';
44
import 'package:flutter_deriv_api/api/exceptions/base_api_exception.dart';
5-
65
import 'package:flutter_deriv_api/api/models/base_exception_model.dart';
76
import 'package:flutter_deriv_api/basic_api/generated/p2p_advert_list_receive.dart';
87
import 'package:flutter_deriv_api/basic_api/generated/p2p_advert_list_send.dart';
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"methods": "static final BaseAPI _api = Injector()<BaseAPI>(); \n \n /// Gets the account's status. \n /// \n /// For parameters information refer to [GetAccountStatusRequest]. \n /// Throws an [BaseAPIException] if API response contains an error. \n static Future<GetAccountStatusReceive> fetchAccountStatusRaw() async { \n final GetAccountStatusReceive response = await _api.call( \n request: const GetAccountStatusRequest(), \n ); \n \n checkException( \n response: response, \n exceptionCreator: ({BaseExceptionModel? baseExceptionModel}) => \n BaseAPIException(baseExceptionModel: baseExceptionModel), \n ); \n \n return response; \n } \n \n /// Gets the account's status. \n /// \n /// For parameters information refer to [GetAccountStatusRequest]. \n /// Throws an [BaseAPIException] if API response contains an error. \n static Future<GetAccountStatusResponse> fetchAccountStatus() async { \n final GetAccountStatusReceive response = await fetchAccountStatusRaw(); \n \n return GetAccountStatusResponse.fromJson(response.getAccountStatus); \n }",
2+
"methods": "static final BaseAPI _api = Injector()<BaseAPI>(); \n \n /// Gets the account's status. \n /// \n /// For parameters information refer to [GetAccountStatusRequest]. \n /// Throws an [BaseAPIException] if API response contains an error. \n static Future<GetAccountStatusReceive> fetchAccountStatusRaw({String? loginId,}) async { \n final GetAccountStatusReceive response = await _api.call( \n request: GetAccountStatusRequest(loginid: loginId), \n ); \n \n checkException( \n response: response, \n exceptionCreator: ({BaseExceptionModel? baseExceptionModel}) => \n BaseAPIException(baseExceptionModel: baseExceptionModel), \n ); \n \n return response; \n } \n \n /// Gets the account's status. \n /// \n /// For parameters information refer to [GetAccountStatusRequest]. \n /// Throws an [BaseAPIException] if API response contains an error. \n static Future<GetAccountStatusResponse> fetchAccountStatus({String? loginId,}) async { \n final GetAccountStatusReceive response = await fetchAccountStatusRaw(loginId: loginId); \n \n return GetAccountStatusResponse.fromJson(response.getAccountStatus); \n }",
33
"imports": "import 'package:flutter_deriv_api/api/exceptions/exceptions.dart';\nimport 'package:flutter_deriv_api/api/models/base_exception_model.dart';\nimport 'package:flutter_deriv_api/basic_api/generated/get_account_status_receive.dart';\nimport 'package:flutter_deriv_api/basic_api/generated/get_account_status_send.dart';\nimport 'package:flutter_deriv_api/helpers/helpers.dart';\nimport 'package:flutter_deriv_api/services/connection/api_manager/base_api.dart';\nimport 'package:deriv_dependency_injector/dependency_injector.dart';\n"
44
}

0 commit comments

Comments
 (0)