PaymentMethodOrId.fromJson constructor

PaymentMethodOrId.fromJson(
  1. Object? json
)

Implementation

factory PaymentMethodOrId.fromJson(Object? json) {
  if (json is String) {
    return PaymentMethodId(id: json);
  }
  return PaymentMethod.fromJson(json);
}