1
1
// ignore_for_file: prefer_single_quotes, unnecessary_import, unused_import
2
2
3
+ import 'package:deriv_dependency_injector/dependency_injector.dart' ;
3
4
import 'package:equatable/equatable.dart' ;
4
-
5
5
import 'package:flutter_deriv_api/api/exceptions/exceptions.dart' ;
6
6
import 'package:flutter_deriv_api/api/models/base_exception_model.dart' ;
7
7
import 'package:flutter_deriv_api/basic_api/generated/profit_table_receive.dart' ;
8
8
import 'package:flutter_deriv_api/basic_api/generated/profit_table_send.dart' ;
9
9
import 'package:flutter_deriv_api/helpers/helpers.dart' ;
10
10
import 'package:flutter_deriv_api/services/connection/api_manager/base_api.dart' ;
11
- import 'package:deriv_dependency_injector/dependency_injector.dart' ;
12
11
13
12
/// Profit table response model class.
14
13
abstract class ProfitTableResponseModel {
@@ -158,6 +157,7 @@ abstract class TransactionsItemModel {
158
157
this .sellTime,
159
158
this .shortcode,
160
159
this .transactionId,
160
+ this .underlyingSymbol,
161
161
});
162
162
163
163
/// ID of the application where this contract was purchased.
@@ -192,6 +192,9 @@ abstract class TransactionsItemModel {
192
192
193
193
/// The transaction Identifier. Every contract (buy or sell) and every payment has a unique transaction identifier.
194
194
final int ? transactionId;
195
+
196
+ /// The underlying symbol for the contract.
197
+ final String ? underlyingSymbol;
195
198
}
196
199
197
200
/// Transactions item class.
@@ -209,6 +212,7 @@ class TransactionsItem extends TransactionsItemModel {
209
212
DateTime ? sellTime,
210
213
String ? shortcode,
211
214
int ? transactionId,
215
+ String ? underlyingSymbol,
212
216
}) : super (
213
217
appId: appId,
214
218
buyPrice: buyPrice,
@@ -221,6 +225,7 @@ class TransactionsItem extends TransactionsItemModel {
221
225
sellTime: sellTime,
222
226
shortcode: shortcode,
223
227
transactionId: transactionId,
228
+ underlyingSymbol: underlyingSymbol,
224
229
);
225
230
226
231
/// Creates an instance from JSON.
@@ -237,6 +242,7 @@ class TransactionsItem extends TransactionsItemModel {
237
242
sellTime: getDateTime (json['sell_time' ]),
238
243
shortcode: json['shortcode' ],
239
244
transactionId: json['transaction_id' ],
245
+ underlyingSymbol: json['underlying_symbol' ],
240
246
);
241
247
242
248
/// Converts an instance to JSON.
0 commit comments