BillingPortalSessionCreateOptions.fromJson constructor

BillingPortalSessionCreateOptions.fromJson(
  1. Object? json
)

Implementation

factory BillingPortalSessionCreateOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return BillingPortalSessionCreateOptions(
    configuration: map['configuration'] == null
        ? null
        : (map['configuration'] as String),
    customer: (map['customer'] as String),
    expand: map['expand'] == null
        ? null
        : (map['expand'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
    flowData: map['flow_data'] == null
        ? null
        : SessionFlowData.fromJson(map['flow_data']),
    locale:
        map['locale'] == null ? null : SessionLocale.fromJson(map['locale']),
    onBehalfOf:
        map['on_behalf_of'] == null ? null : (map['on_behalf_of'] as String),
    returnUrl:
        map['return_url'] == null ? null : (map['return_url'] as String),
  );
}