Files
daily_mobileapp_merchant/lib/Model/Request/Authentication/Sms/Smsrequest.dart
2026-05-27 10:35:09 +05:30

67 lines
1.6 KiB
Dart

class SmsRequest {
String? locale;
int? channelTimeout;
// String? clientRef;
int? codeLength;
String? code;
String? brand;
List<Workflow>? workflow;
SmsRequest(
{this.locale,
this.channelTimeout,
// this.clientRef,
this.codeLength,
this.code,
this.brand,
this.workflow});
SmsRequest.fromJson(Map<String, dynamic> json) {
locale = json['locale'];
channelTimeout = json['channel_timeout'];
// clientRef = json['client_ref'];
codeLength = json['code_length'];
code = json['code'];
brand = json['brand'];
if (json['workflow'] != null) {
workflow = <Workflow>[];
json['workflow'].forEach((v) {
workflow!.add(new Workflow.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['locale'] = this.locale;
data['channel_timeout'] = this.channelTimeout;
// data['client_ref'] = this.clientRef;
data['code_length'] = this.codeLength;
data['code'] = this.code;
data['brand'] = this.brand;
if (this.workflow != null) {
data['workflow'] = this.workflow!.map((v) => v.toJson()).toList();
}
return data;
}
}
class Workflow {
String? channel;
String? to;
Workflow({this.channel, this.to});
Workflow.fromJson(Map<String, dynamic> json) {
channel = json['channel'];
to = json['to'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['channel'] = this.channel;
data['to'] = this.to;
return data;
}
}