deserialize(type, payload, adapter, existingSerializer, opts = {}) {
    const serializer = (existingSerializer || new this.serializers[type](this.config));
    const meta = { shopClient: this, adapter, serializer, type };
    let serializedPayload;

    if (opts.multiple) {
      serializedPayload = serializer.deserializeMultiple(type, payload, meta);
    } else {
      serializedPayload = serializer.deserializeSingle(type, payload, meta);
    }

    return serializedPayload;
  }
/**
   * Proxy to serializer's deserialize.
   *
   * @method deserialize
   * @private
   * @param {String} type The pluralized name of the type, in lower case.
   * @param {Object} payload The raw payload returned by the adapter.
   * @param {BaseAdapter} adapter The adapter that yielded the payload.
   * @param {BaseSerializer} existingSerializer The serializer to attach. If
   * none is passed, then `this.deserialize` will create one for the type.
   * @param {Object} opts Options that determine which deserialization method to
   * use.
   * @param {Boolean} opts.multiple true when the payload represents multiple
   * models
   * @param {Boolean} opts.single true when the payload represents one model.
   * @return {BaseModel} an instance of `type` reified into a model.
   */
Proxy to serializer's deserialize.
@method deserialize
@private
@param {String} type The pluralized name of the type, in lower case.
@param {Object} payload The raw payload returned by the adapter.
@param {BaseAdapter} adapter The adapter that yielded the payload.
@param {BaseSerializer} existingSerializer The serializer to attach. If
none is passed, then `this.deserialize` will create one for the type.
@param {Object} opts Options that determine which deserialization method to
use.
@param {Boolean} opts.multiple true when the payload represents multiple
models
@param {Boolean} opts.single true when the payload represents one model.
@return {BaseModel} an instance of `type` reified into a model.
Proxy to serializer ' s deserialize . @method deserialize @private @param { String } type The pluralized name of the type in lower case . @param { Object } payload The raw payload returned by the adapter . @param { BaseAdapter } adapter The adapter that yielded the payload . @param { BaseSerializer } existingSerializer The serializer to attach . If none is passed then ` this . deserialize ` will create one for the type . @param { Object } opts Options that determine which deserialization method to use . @param { Boolean } opts . multiple true when the payload represents multiple models @param { Boolean } opts . single true when the payload represents one model . @return { BaseModel } an instance of ` type ` reified into a model .
deserialize(type, payload, adapter, existingSerializer, opts = {}) {
    const serializer = (existingSerializer || new this.serializers[type](this.config));
    const meta = { shopClient: this, adapter, serializer, type };
    let serializedPayload;
    if (opts.multiple) {
      serializedPayload = serializer.deserializeMultiple(type, payload, meta);
    } else {
      serializedPayload = serializer.deserializeSingle(type, payload, meta);
    }
    return serializedPayload;
  }
deserialize ( type , payload , adapter , existingSerializer , opts = { } ) { const serializer = ( existingSerializer || new this . serializers [ type ] ( this . config ) ) ; const meta = { shopClient : this , adapter , serializer , type } ; let serializedPayload ; if ( opts . multiple ) { serializedPayload = serializer . deserializeMultiple ( type , payload , meta ) ; } else { serializedPayload = serializer . deserializeSingle ( type , payload , meta ) ; } return serializedPayload ; }
Proxy to serializer's deserialize.
Proxy to serializer ' s deserialize .