Skip to content

Commit b35e2d0

Browse files
committed
Merge branch 'upstream/master' into ramin/add_isolate
2 parents 963728a + b0221c0 commit b35e2d0

File tree

2 files changed

+101
-105
lines changed

2 files changed

+101
-105
lines changed

lib/api/response/service_token_response_result.dart

+91-103
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,17 @@ class ServiceTokenResponse extends ServiceTokenResponseModel {
9292
serviceToken: serviceToken ?? this.serviceToken,
9393
);
9494
}
95-
9695
/// Service token model class.
9796
abstract class ServiceTokenModel {
9897
/// Initializes Service token model class .
9998
const ServiceTokenModel({
10099
this.banxa,
101100
this.ctrader,
102101
this.dxtrade,
102+
this.freshworksAuthJwt,
103+
this.freshworksUserJwt,
103104
this.onfido,
104-
this.pandats,
105105
this.sendbird,
106-
this.wyre,
107106
});
108107

109108
/// Banxa order data.
@@ -115,17 +114,17 @@ abstract class ServiceTokenModel {
115114
/// Deriv X data.
116115
final Dxtrade? dxtrade;
117116

117+
/// Freshchat data.
118+
final FreshworksAuthJwt? freshworksAuthJwt;
119+
120+
/// Freshchat data.
121+
final FreshworksUserJwt? freshworksUserJwt;
122+
118123
/// Onfido data.
119124
final Onfido? onfido;
120125

121-
/// Deriv EZ data.
122-
final Pandats? pandats;
123-
124126
/// Sendbird data.
125127
final Sendbird? sendbird;
126-
127-
/// Wyre reservation data.
128-
final Wyre? wyre;
129128
}
130129

131130
/// Service token class.
@@ -135,10 +134,10 @@ class ServiceToken extends ServiceTokenModel {
135134
super.banxa,
136135
super.ctrader,
137136
super.dxtrade,
137+
super.freshworksAuthJwt,
138+
super.freshworksUserJwt,
138139
super.onfido,
139-
super.pandats,
140140
super.sendbird,
141-
super.wyre,
142141
});
143142

144143
/// Creates an instance from JSON.
@@ -148,13 +147,16 @@ class ServiceToken extends ServiceTokenModel {
148147
json['ctrader'] == null ? null : Ctrader.fromJson(json['ctrader']),
149148
dxtrade:
150149
json['dxtrade'] == null ? null : Dxtrade.fromJson(json['dxtrade']),
150+
freshworksAuthJwt: json['freshworks_auth_jwt'] == null
151+
? null
152+
: FreshworksAuthJwt.fromJson(json['freshworks_auth_jwt']),
153+
freshworksUserJwt: json['freshworks_user_jwt'] == null
154+
? null
155+
: FreshworksUserJwt.fromJson(json['freshworks_user_jwt']),
151156
onfido: json['onfido'] == null ? null : Onfido.fromJson(json['onfido']),
152-
pandats:
153-
json['pandats'] == null ? null : Pandats.fromJson(json['pandats']),
154157
sendbird: json['sendbird'] == null
155158
? null
156159
: Sendbird.fromJson(json['sendbird']),
157-
wyre: json['wyre'] == null ? null : Wyre.fromJson(json['wyre']),
158160
);
159161

160162
/// Converts an instance to JSON.
@@ -170,18 +172,18 @@ class ServiceToken extends ServiceTokenModel {
170172
if (dxtrade != null) {
171173
resultMap['dxtrade'] = dxtrade!.toJson();
172174
}
175+
if (freshworksAuthJwt != null) {
176+
resultMap['freshworks_auth_jwt'] = freshworksAuthJwt!.toJson();
177+
}
178+
if (freshworksUserJwt != null) {
179+
resultMap['freshworks_user_jwt'] = freshworksUserJwt!.toJson();
180+
}
173181
if (onfido != null) {
174182
resultMap['onfido'] = onfido!.toJson();
175183
}
176-
if (pandats != null) {
177-
resultMap['pandats'] = pandats!.toJson();
178-
}
179184
if (sendbird != null) {
180185
resultMap['sendbird'] = sendbird!.toJson();
181186
}
182-
if (wyre != null) {
183-
resultMap['wyre'] = wyre!.toJson();
184-
}
185187

186188
return resultMap;
187189
}
@@ -191,22 +193,21 @@ class ServiceToken extends ServiceTokenModel {
191193
Banxa? banxa,
192194
Ctrader? ctrader,
193195
Dxtrade? dxtrade,
196+
FreshworksAuthJwt? freshworksAuthJwt,
197+
FreshworksUserJwt? freshworksUserJwt,
194198
Onfido? onfido,
195-
Pandats? pandats,
196199
Sendbird? sendbird,
197-
Wyre? wyre,
198200
}) =>
199201
ServiceToken(
200202
banxa: banxa ?? this.banxa,
201203
ctrader: ctrader ?? this.ctrader,
202204
dxtrade: dxtrade ?? this.dxtrade,
205+
freshworksAuthJwt: freshworksAuthJwt ?? this.freshworksAuthJwt,
206+
freshworksUserJwt: freshworksUserJwt ?? this.freshworksUserJwt,
203207
onfido: onfido ?? this.onfido,
204-
pandats: pandats ?? this.pandats,
205208
sendbird: sendbird ?? this.sendbird,
206-
wyre: wyre ?? this.wyre,
207209
);
208210
}
209-
210211
/// Banxa model class.
211212
abstract class BanxaModel {
212213
/// Initializes Banxa model class .
@@ -265,7 +266,6 @@ class Banxa extends BanxaModel {
265266
urlIframe: urlIframe ?? this.urlIframe,
266267
);
267268
}
268-
269269
/// Ctrader model class.
270270
abstract class CtraderModel {
271271
/// Initializes Ctrader model class .
@@ -306,7 +306,6 @@ class Ctrader extends CtraderModel {
306306
token: token ?? this.token,
307307
);
308308
}
309-
310309
/// Dxtrade model class.
311310
abstract class DxtradeModel {
312311
/// Initializes Dxtrade model class .
@@ -347,27 +346,27 @@ class Dxtrade extends DxtradeModel {
347346
token: token ?? this.token,
348347
);
349348
}
350-
351-
/// Onfido model class.
352-
abstract class OnfidoModel {
353-
/// Initializes Onfido model class .
354-
const OnfidoModel({
349+
/// Freshworks auth jwt model class.
350+
abstract class FreshworksAuthJwtModel {
351+
/// Initializes Freshworks auth jwt model class .
352+
const FreshworksAuthJwtModel({
355353
this.token,
356354
});
357355

358-
/// Onfido token.
356+
/// Freshchat auth JWT token.
359357
final String? token;
360358
}
361359

362-
/// Onfido class.
363-
class Onfido extends OnfidoModel {
364-
/// Initializes Onfido class.
365-
const Onfido({
360+
/// Freshworks auth jwt class.
361+
class FreshworksAuthJwt extends FreshworksAuthJwtModel {
362+
/// Initializes Freshworks auth jwt class.
363+
const FreshworksAuthJwt({
366364
super.token,
367365
});
368366

369367
/// Creates an instance from JSON.
370-
factory Onfido.fromJson(Map<String, dynamic> json) => Onfido(
368+
factory FreshworksAuthJwt.fromJson(Map<String, dynamic> json) =>
369+
FreshworksAuthJwt(
371370
token: json['token'],
372371
);
373372

@@ -381,34 +380,34 @@ class Onfido extends OnfidoModel {
381380
}
382381

383382
/// Creates a copy of instance with given parameters.
384-
Onfido copyWith({
383+
FreshworksAuthJwt copyWith({
385384
String? token,
386385
}) =>
387-
Onfido(
386+
FreshworksAuthJwt(
388387
token: token ?? this.token,
389388
);
390389
}
391-
392-
/// Pandats model class.
393-
abstract class PandatsModel {
394-
/// Initializes Pandats model class .
395-
const PandatsModel({
390+
/// Freshworks user jwt model class.
391+
abstract class FreshworksUserJwtModel {
392+
/// Initializes Freshworks user jwt model class .
393+
const FreshworksUserJwtModel({
396394
this.token,
397395
});
398396

399-
/// Deriv EZ SSO token
397+
/// Freshchat user JWT token.
400398
final String? token;
401399
}
402400

403-
/// Pandats class.
404-
class Pandats extends PandatsModel {
405-
/// Initializes Pandats class.
406-
const Pandats({
401+
/// Freshworks user jwt class.
402+
class FreshworksUserJwt extends FreshworksUserJwtModel {
403+
/// Initializes Freshworks user jwt class.
404+
const FreshworksUserJwt({
407405
super.token,
408406
});
409407

410408
/// Creates an instance from JSON.
411-
factory Pandats.fromJson(Map<String, dynamic> json) => Pandats(
409+
factory FreshworksUserJwt.fromJson(Map<String, dynamic> json) =>
410+
FreshworksUserJwt(
412411
token: json['token'],
413412
);
414413

@@ -422,14 +421,53 @@ class Pandats extends PandatsModel {
422421
}
423422

424423
/// Creates a copy of instance with given parameters.
425-
Pandats copyWith({
424+
FreshworksUserJwt copyWith({
426425
String? token,
427426
}) =>
428-
Pandats(
427+
FreshworksUserJwt(
429428
token: token ?? this.token,
430429
);
431430
}
431+
/// Onfido model class.
432+
abstract class OnfidoModel {
433+
/// Initializes Onfido model class .
434+
const OnfidoModel({
435+
this.token,
436+
});
437+
438+
/// Onfido token.
439+
final String? token;
440+
}
441+
442+
/// Onfido class.
443+
class Onfido extends OnfidoModel {
444+
/// Initializes Onfido class.
445+
const Onfido({
446+
super.token,
447+
});
448+
449+
/// Creates an instance from JSON.
450+
factory Onfido.fromJson(Map<String, dynamic> json) => Onfido(
451+
token: json['token'],
452+
);
453+
454+
/// Converts an instance to JSON.
455+
Map<String, dynamic> toJson() {
456+
final Map<String, dynamic> resultMap = <String, dynamic>{};
457+
458+
resultMap['token'] = token;
459+
460+
return resultMap;
461+
}
432462

463+
/// Creates a copy of instance with given parameters.
464+
Onfido copyWith({
465+
String? token,
466+
}) =>
467+
Onfido(
468+
token: token ?? this.token,
469+
);
470+
}
433471
/// Sendbird model class.
434472
abstract class SendbirdModel {
435473
/// Initializes Sendbird model class .
@@ -488,53 +526,3 @@ class Sendbird extends SendbirdModel {
488526
token: token ?? this.token,
489527
);
490528
}
491-
492-
/// Wyre model class.
493-
abstract class WyreModel {
494-
/// Initializes Wyre model class .
495-
const WyreModel({
496-
this.token,
497-
this.url,
498-
});
499-
500-
/// Wyre reservation id token
501-
final String? token;
502-
503-
/// Wyre reservation URL
504-
final String? url;
505-
}
506-
507-
/// Wyre class.
508-
class Wyre extends WyreModel {
509-
/// Initializes Wyre class.
510-
const Wyre({
511-
super.token,
512-
super.url,
513-
});
514-
515-
/// Creates an instance from JSON.
516-
factory Wyre.fromJson(Map<String, dynamic> json) => Wyre(
517-
token: json['token'],
518-
url: json['url'],
519-
);
520-
521-
/// Converts an instance to JSON.
522-
Map<String, dynamic> toJson() {
523-
final Map<String, dynamic> resultMap = <String, dynamic>{};
524-
525-
resultMap['token'] = token;
526-
resultMap['url'] = url;
527-
528-
return resultMap;
529-
}
530-
531-
/// Creates a copy of instance with given parameters.
532-
Wyre copyWith({
533-
String? token,
534-
String? url,
535-
}) =>
536-
Wyre(
537-
token: token ?? this.token,
538-
url: url ?? this.url,
539-
);
540-
}

0 commit comments

Comments
 (0)