PaymentLinkCreateOptionsInvoiceCreation.fromJson constructor

PaymentLinkCreateOptionsInvoiceCreation.fromJson(
  1. Object? json
)

Implementation

factory PaymentLinkCreateOptionsInvoiceCreation.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentLinkCreateOptionsInvoiceCreation(
    enabled: (map['enabled'] as bool),
    invoiceData: map['invoice_data'] == null
        ? null
        : PaymentLinkInvoiceData.fromJson(map['invoice_data']),
  );
}