GetCustomersSearchResponse.fromJson constructor
GetCustomersSearchResponse.fromJson(
- Object? json
Implementation
factory GetCustomersSearchResponse.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return GetCustomersSearchResponse(
data: (map['data'] as List<Object?>)
.map((el) => Customer.fromJson(el))
.toList(),
hasMore: (map['has_more'] as bool),
nextPage: map['next_page'] == null ? null : (map['next_page'] as String),
totalCount: map['total_count'] == null
? null
: (map['total_count'] as num).toInt(),
url: (map['url'] as String),
);
}