ResourceCreated constructor

ResourceCreated(
  1. Response rawResponse
)

Implementation

ResourceCreated(this.rawResponse) {
  final document = InboundDocument(rawResponse.document ??
      (throw FormatException('The document must not be empty')));
  resource = document.dataAsResource();
  included.addAll(document.included());
  meta.addAll(document.meta());
  links.addAll(document.links());
}