CustomerSessionCreateOptions.fromJson constructor

CustomerSessionCreateOptions.fromJson(
  1. Object? json
)

Implementation

factory CustomerSessionCreateOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return CustomerSessionCreateOptions(
    components: CustomerSessionComponents.fromJson(map['components']),
    customer: (map['customer'] as String),
    expand: map['expand'] == null
        ? null
        : (map['expand'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
  );
}