PaymentLinksResourceCustomFields.fromJson constructor

PaymentLinksResourceCustomFields.fromJson(
  1. Object? json
)

Implementation

factory PaymentLinksResourceCustomFields.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentLinksResourceCustomFields(
    dropdown: map['dropdown'] == null
        ? null
        : PaymentLinksResourceCustomFieldsDropdown.fromJson(map['dropdown']),
    key: (map['key'] as String),
    label: PaymentLinksResourceCustomFieldsLabel.fromJson(map['label']),
    numeric: map['numeric'] == null
        ? null
        : PaymentLinksResourceCustomFieldsNumeric.fromJson(map['numeric']),
    optional: (map['optional'] as bool),
    text: map['text'] == null
        ? null
        : PaymentLinksResourceCustomFieldsText.fromJson(map['text']),
    type: PaymentLinksResourceCustomFieldsType.fromJson(map['type']),
  );
}