@@ -86,6 +86,7 @@ abstract class GetLimitsModel {
86
86
this .dailyTransfers,
87
87
this .dailyTurnover,
88
88
this .lifetimeLimit,
89
+ this .lifetimeTransfers,
89
90
this .marketSpecific,
90
91
this .numOfDays,
91
92
this .numOfDaysLimit,
@@ -113,6 +114,9 @@ abstract class GetLimitsModel {
113
114
/// Lifetime withdrawal limit
114
115
final double ? lifetimeLimit;
115
116
117
+ /// Lifetime transfer limits. Only present when applicable to the current accout.
118
+ final LifetimeTransfers ? lifetimeTransfers;
119
+
116
120
/// Contains limitation information for each market.
117
121
final Map <String , List <MarketSpecificPropertyItem >>? marketSpecific;
118
122
@@ -153,6 +157,7 @@ class GetLimits extends GetLimitsModel {
153
157
super .dailyTransfers,
154
158
super .dailyTurnover,
155
159
super .lifetimeLimit,
160
+ super .lifetimeTransfers,
156
161
super .marketSpecific,
157
162
super .numOfDays,
158
163
super .numOfDaysLimit,
@@ -173,6 +178,9 @@ class GetLimits extends GetLimitsModel {
173
178
dailyTransfers: json['daily_transfers' ],
174
179
dailyTurnover: getDouble (json['daily_turnover' ]),
175
180
lifetimeLimit: getDouble (json['lifetime_limit' ]),
181
+ lifetimeTransfers: json['lifetime_transfers' ] == null
182
+ ? null
183
+ : LifetimeTransfers .fromJson (json['lifetime_transfers' ]),
176
184
marketSpecific: json['market_specific' ] == null
177
185
? null
178
186
: Map <String , List <MarketSpecificPropertyItem >>.fromEntries (json[
@@ -214,6 +222,9 @@ class GetLimits extends GetLimitsModel {
214
222
resultMap['daily_transfers' ] = dailyTransfers;
215
223
resultMap['daily_turnover' ] = dailyTurnover;
216
224
resultMap['lifetime_limit' ] = lifetimeLimit;
225
+ if (lifetimeTransfers != null ) {
226
+ resultMap['lifetime_transfers' ] = lifetimeTransfers! .toJson ();
227
+ }
217
228
resultMap['market_specific' ] = marketSpecific;
218
229
resultMap['num_of_days' ] = numOfDays;
219
230
resultMap['num_of_days_limit' ] = numOfDaysLimit;
@@ -239,6 +250,7 @@ class GetLimits extends GetLimitsModel {
239
250
Map <String , dynamic >? dailyTransfers,
240
251
double ? dailyTurnover,
241
252
double ? lifetimeLimit,
253
+ LifetimeTransfers ? lifetimeTransfers,
242
254
Map <String , List <MarketSpecificPropertyItem >>? marketSpecific,
243
255
int ? numOfDays,
244
256
double ? numOfDaysLimit,
@@ -257,6 +269,7 @@ class GetLimits extends GetLimitsModel {
257
269
dailyTransfers: dailyTransfers ?? this .dailyTransfers,
258
270
dailyTurnover: dailyTurnover ?? this .dailyTurnover,
259
271
lifetimeLimit: lifetimeLimit ?? this .lifetimeLimit,
272
+ lifetimeTransfers: lifetimeTransfers ?? this .lifetimeTransfers,
260
273
marketSpecific: marketSpecific ?? this .marketSpecific,
261
274
numOfDays: numOfDays ?? this .numOfDays,
262
275
numOfDaysLimit: numOfDaysLimit ?? this .numOfDaysLimit,
@@ -272,6 +285,224 @@ class GetLimits extends GetLimitsModel {
272
285
this .withdrawalSinceInceptionMonetary,
273
286
);
274
287
}
288
+ /// Lifetime transfers model class.
289
+ abstract class LifetimeTransfersModel {
290
+ /// Initializes Lifetime transfers model class .
291
+ const LifetimeTransfersModel ({
292
+ this .cryptoToCrypto,
293
+ this .cryptoToFiat,
294
+ this .fiatToCrypto,
295
+ });
296
+
297
+ /// Lifetime transfer limit for crypto to crypto currencies.
298
+ final CryptoToCrypto ? cryptoToCrypto;
299
+
300
+ /// Lifetime transfer limit for crypto to fiat currencies.
301
+ final CryptoToFiat ? cryptoToFiat;
302
+
303
+ /// Lifetime transfer limit for fiat to crypto currencies.
304
+ final FiatToCrypto ? fiatToCrypto;
305
+ }
306
+
307
+ /// Lifetime transfers class.
308
+ class LifetimeTransfers extends LifetimeTransfersModel {
309
+ /// Initializes Lifetime transfers class.
310
+ const LifetimeTransfers ({
311
+ super .cryptoToCrypto,
312
+ super .cryptoToFiat,
313
+ super .fiatToCrypto,
314
+ });
315
+
316
+ /// Creates an instance from JSON.
317
+ factory LifetimeTransfers .fromJson (Map <String , dynamic > json) =>
318
+ LifetimeTransfers (
319
+ cryptoToCrypto: json['crypto_to_crypto' ] == null
320
+ ? null
321
+ : CryptoToCrypto .fromJson (json['crypto_to_crypto' ]),
322
+ cryptoToFiat: json['crypto_to_fiat' ] == null
323
+ ? null
324
+ : CryptoToFiat .fromJson (json['crypto_to_fiat' ]),
325
+ fiatToCrypto: json['fiat_to_crypto' ] == null
326
+ ? null
327
+ : FiatToCrypto .fromJson (json['fiat_to_crypto' ]),
328
+ );
329
+
330
+ /// Converts an instance to JSON.
331
+ Map <String , dynamic > toJson () {
332
+ final Map <String , dynamic > resultMap = < String , dynamic > {};
333
+
334
+ if (cryptoToCrypto != null ) {
335
+ resultMap['crypto_to_crypto' ] = cryptoToCrypto! .toJson ();
336
+ }
337
+ if (cryptoToFiat != null ) {
338
+ resultMap['crypto_to_fiat' ] = cryptoToFiat! .toJson ();
339
+ }
340
+ if (fiatToCrypto != null ) {
341
+ resultMap['fiat_to_crypto' ] = fiatToCrypto! .toJson ();
342
+ }
343
+
344
+ return resultMap;
345
+ }
346
+
347
+ /// Creates a copy of instance with given parameters.
348
+ LifetimeTransfers copyWith ({
349
+ CryptoToCrypto ? cryptoToCrypto,
350
+ CryptoToFiat ? cryptoToFiat,
351
+ FiatToCrypto ? fiatToCrypto,
352
+ }) =>
353
+ LifetimeTransfers (
354
+ cryptoToCrypto: cryptoToCrypto ?? this .cryptoToCrypto,
355
+ cryptoToFiat: cryptoToFiat ?? this .cryptoToFiat,
356
+ fiatToCrypto: fiatToCrypto ?? this .fiatToCrypto,
357
+ );
358
+ }
359
+ /// Crypto to crypto model class.
360
+ abstract class CryptoToCryptoModel {
361
+ /// Initializes Crypto to crypto model class .
362
+ const CryptoToCryptoModel ({
363
+ this .allowed,
364
+ this .available,
365
+ });
366
+
367
+ /// Total limit in client's currency.
368
+ final double ? allowed;
369
+
370
+ /// Remaining limit in client's currency.
371
+ final double ? available;
372
+ }
373
+
374
+ /// Crypto to crypto class.
375
+ class CryptoToCrypto extends CryptoToCryptoModel {
376
+ /// Initializes Crypto to crypto class.
377
+ const CryptoToCrypto ({
378
+ super .allowed,
379
+ super .available,
380
+ });
381
+
382
+ /// Creates an instance from JSON.
383
+ factory CryptoToCrypto .fromJson (Map <String , dynamic > json) => CryptoToCrypto (
384
+ allowed: getDouble (json['allowed' ]),
385
+ available: getDouble (json['available' ]),
386
+ );
387
+
388
+ /// Converts an instance to JSON.
389
+ Map <String , dynamic > toJson () {
390
+ final Map <String , dynamic > resultMap = < String , dynamic > {};
391
+
392
+ resultMap['allowed' ] = allowed;
393
+ resultMap['available' ] = available;
394
+
395
+ return resultMap;
396
+ }
397
+
398
+ /// Creates a copy of instance with given parameters.
399
+ CryptoToCrypto copyWith ({
400
+ double ? allowed,
401
+ double ? available,
402
+ }) =>
403
+ CryptoToCrypto (
404
+ allowed: allowed ?? this .allowed,
405
+ available: available ?? this .available,
406
+ );
407
+ }
408
+ /// Crypto to fiat model class.
409
+ abstract class CryptoToFiatModel {
410
+ /// Initializes Crypto to fiat model class .
411
+ const CryptoToFiatModel ({
412
+ this .allowed,
413
+ this .available,
414
+ });
415
+
416
+ /// Total limit in client's currency.
417
+ final double ? allowed;
418
+
419
+ /// Remaining limit in client's currency.
420
+ final double ? available;
421
+ }
422
+
423
+ /// Crypto to fiat class.
424
+ class CryptoToFiat extends CryptoToFiatModel {
425
+ /// Initializes Crypto to fiat class.
426
+ const CryptoToFiat ({
427
+ super .allowed,
428
+ super .available,
429
+ });
430
+
431
+ /// Creates an instance from JSON.
432
+ factory CryptoToFiat .fromJson (Map <String , dynamic > json) => CryptoToFiat (
433
+ allowed: getDouble (json['allowed' ]),
434
+ available: getDouble (json['available' ]),
435
+ );
436
+
437
+ /// Converts an instance to JSON.
438
+ Map <String , dynamic > toJson () {
439
+ final Map <String , dynamic > resultMap = < String , dynamic > {};
440
+
441
+ resultMap['allowed' ] = allowed;
442
+ resultMap['available' ] = available;
443
+
444
+ return resultMap;
445
+ }
446
+
447
+ /// Creates a copy of instance with given parameters.
448
+ CryptoToFiat copyWith ({
449
+ double ? allowed,
450
+ double ? available,
451
+ }) =>
452
+ CryptoToFiat (
453
+ allowed: allowed ?? this .allowed,
454
+ available: available ?? this .available,
455
+ );
456
+ }
457
+ /// Fiat to crypto model class.
458
+ abstract class FiatToCryptoModel {
459
+ /// Initializes Fiat to crypto model class .
460
+ const FiatToCryptoModel ({
461
+ this .allowed,
462
+ this .available,
463
+ });
464
+
465
+ /// Total limit in client's currency.
466
+ final double ? allowed;
467
+
468
+ /// Remaining limit in client's currency.
469
+ final double ? available;
470
+ }
471
+
472
+ /// Fiat to crypto class.
473
+ class FiatToCrypto extends FiatToCryptoModel {
474
+ /// Initializes Fiat to crypto class.
475
+ const FiatToCrypto ({
476
+ super .allowed,
477
+ super .available,
478
+ });
479
+
480
+ /// Creates an instance from JSON.
481
+ factory FiatToCrypto .fromJson (Map <String , dynamic > json) => FiatToCrypto (
482
+ allowed: getDouble (json['allowed' ]),
483
+ available: getDouble (json['available' ]),
484
+ );
485
+
486
+ /// Converts an instance to JSON.
487
+ Map <String , dynamic > toJson () {
488
+ final Map <String , dynamic > resultMap = < String , dynamic > {};
489
+
490
+ resultMap['allowed' ] = allowed;
491
+ resultMap['available' ] = available;
492
+
493
+ return resultMap;
494
+ }
495
+
496
+ /// Creates a copy of instance with given parameters.
497
+ FiatToCrypto copyWith ({
498
+ double ? allowed,
499
+ double ? available,
500
+ }) =>
501
+ FiatToCrypto (
502
+ allowed: allowed ?? this .allowed,
503
+ available: available ?? this .available,
504
+ );
505
+ }
275
506
/// Market specific property item model class.
276
507
abstract class MarketSpecificPropertyItemModel {
277
508
/// Initializes Market specific property item model class .
0 commit comments