InvoiceOrId.fromJson constructor

InvoiceOrId.fromJson(
  1. Object? json
)

Implementation

factory InvoiceOrId.fromJson(Object? json) {
  if (json is String?) {
    return InvoiceId(id: json);
  }
  return Invoice.fromJson(json);
}