PaymentPagesCheckoutSessionCustomFieldsText.fromJson constructor

PaymentPagesCheckoutSessionCustomFieldsText.fromJson(
  1. Object? json
)

Implementation

factory PaymentPagesCheckoutSessionCustomFieldsText.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentPagesCheckoutSessionCustomFieldsText(
    maximumLength: map['maximum_length'] == null
        ? null
        : (map['maximum_length'] as num).toInt(),
    minimumLength: map['minimum_length'] == null
        ? null
        : (map['minimum_length'] as num).toInt(),
    value: map['value'] == null ? null : (map['value'] as String),
  );
}