PaymentPagesCheckoutSessionCustomFields.fromJson constructor

PaymentPagesCheckoutSessionCustomFields.fromJson(
  1. Object? json
)

Implementation

factory PaymentPagesCheckoutSessionCustomFields.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentPagesCheckoutSessionCustomFields(
    dropdown: map['dropdown'] == null
        ? null
        : PaymentPagesCheckoutSessionCustomFieldsDropdown.fromJson(
            map['dropdown']),
    key: (map['key'] as String),
    label:
        PaymentPagesCheckoutSessionCustomFieldsLabel.fromJson(map['label']),
    numeric: map['numeric'] == null
        ? null
        : PaymentPagesCheckoutSessionCustomFieldsNumeric.fromJson(
            map['numeric']),
    optional: (map['optional'] as bool),
    text: map['text'] == null
        ? null
        : PaymentPagesCheckoutSessionCustomFieldsText.fromJson(map['text']),
    type: PaymentLinksResourceCustomFieldsType.fromJson(map['type']),
  );
}