Skip to content

Commit 693a37f

Browse files
osama-derivabedelaziz-deriv
authored andcommitted
Add underlyingSymbol
1 parent 41892a3 commit 693a37f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/api/response/profit_table_response_result.dart

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// ignore_for_file: prefer_single_quotes, unnecessary_import, unused_import
22

3+
import 'package:deriv_dependency_injector/dependency_injector.dart';
34
import 'package:equatable/equatable.dart';
4-
55
import 'package:flutter_deriv_api/api/exceptions/exceptions.dart';
66
import 'package:flutter_deriv_api/api/models/base_exception_model.dart';
77
import 'package:flutter_deriv_api/basic_api/generated/profit_table_receive.dart';
88
import 'package:flutter_deriv_api/basic_api/generated/profit_table_send.dart';
99
import 'package:flutter_deriv_api/helpers/helpers.dart';
1010
import 'package:flutter_deriv_api/services/connection/api_manager/base_api.dart';
11-
import 'package:deriv_dependency_injector/dependency_injector.dart';
1211

1312
/// Profit table response model class.
1413
abstract class ProfitTableResponseModel {
@@ -158,6 +157,7 @@ abstract class TransactionsItemModel {
158157
this.sellTime,
159158
this.shortcode,
160159
this.transactionId,
160+
this.underlyingSymbol,
161161
});
162162

163163
/// ID of the application where this contract was purchased.
@@ -192,6 +192,9 @@ abstract class TransactionsItemModel {
192192

193193
/// The transaction Identifier. Every contract (buy or sell) and every payment has a unique transaction identifier.
194194
final int? transactionId;
195+
196+
/// The underlying symbol for the contract.
197+
final String? underlyingSymbol;
195198
}
196199

197200
/// Transactions item class.
@@ -209,6 +212,7 @@ class TransactionsItem extends TransactionsItemModel {
209212
DateTime? sellTime,
210213
String? shortcode,
211214
int? transactionId,
215+
String? underlyingSymbol,
212216
}) : super(
213217
appId: appId,
214218
buyPrice: buyPrice,
@@ -221,6 +225,7 @@ class TransactionsItem extends TransactionsItemModel {
221225
sellTime: sellTime,
222226
shortcode: shortcode,
223227
transactionId: transactionId,
228+
underlyingSymbol: underlyingSymbol,
224229
);
225230

226231
/// Creates an instance from JSON.
@@ -237,6 +242,7 @@ class TransactionsItem extends TransactionsItemModel {
237242
sellTime: getDateTime(json['sell_time']),
238243
shortcode: json['shortcode'],
239244
transactionId: json['transaction_id'],
245+
underlyingSymbol: json['underlying_symbol'],
240246
);
241247

242248
/// Converts an instance to JSON.

0 commit comments

Comments
 (0)