CheckoutDocuments.fromJson constructor

CheckoutDocuments.fromJson(
  1. Map<Object?, Object?> value
)

Parses and validates document links from the native bridge.

Implementation

factory CheckoutDocuments.fromJson(Map<Object?, Object?> value) {
  _expectFields(value, const {'invoiceUrl', 'receiptUrl'});
  final invoiceUrl = _optionalAbsoluteUri(value['invoiceUrl']);
  final receiptUrl = _optionalAbsoluteUri(value['receiptUrl']);
  return CheckoutDocuments(invoiceUrl: invoiceUrl, receiptUrl: receiptUrl);
}