async FinalizeABRMezzanine({libraryId, objectId, writeToken, offeringKey="default"}) {
    const mezzanineMetadata = await this.ContentObjectMetadata({
      libraryId,
      objectId,
      writeToken,
      metadataSubtree: UrlJoin("abr_mezzanine", "offerings")
    });

    const masterHash = mezzanineMetadata.default.prod_master_hash;

    // Authorization token for mezzanine and master
    let authorizationTokens = [
      await this.authClient.AuthorizationToken({libraryId, objectId, update: true}),
      await this.authClient.AuthorizationToken({versionHash: masterHash})
    ];

    const headers = {
      Authorization: authorizationTokens.map(token => `Bearer ${token}`).join(",")
    };

    const {data, errors, warnings, logs} = await this.CallBitcodeMethod({
      objectId,
      libraryId,
      writeToken,
      method: UrlJoin("media", "abr_mezzanine", "offerings", offeringKey, "finalize"),
      headers,
      constant: false
    });

    const finalizeResponse = await this.FinalizeContentObject({
      libraryId,
      objectId: objectId,
      writeToken,
      awaitCommitConfirmation: false
    });

    return {
      data,
      logs: logs || [],
      warnings: warnings || [],
      errors: errors || [],
      ...finalizeResponse
    };
  }
/**
   * Finalize a mezzanine object after all jobs have finished
   *
   * @methodGroup Media
   * @namedParams
   * @param {string} libraryId - ID of the mezzanine library
   * @param {string} objectId - ID of the mezzanine object
   * @param {string} writeToken - Write token for the mezzanine object
   * @param {string=} offeringKey=default - The offering to process
   *
   * @return {Promise<Object>} - The finalize response for the mezzanine object, as well as any logs, warnings and errors from the finalization
   */


@return {Promise} - The finalize response for the mezzanine object, as well as any logs, warnings and errors from the finalization
@return { Promise } - The finalize response for the mezzanine object as well as any logs warnings and errors from the finalization
async FinalizeABRMezzanine({libraryId, objectId, writeToken, offeringKey="default"}) {
    const mezzanineMetadata = await this.ContentObjectMetadata({
      libraryId,
      objectId,
      writeToken,
      metadataSubtree: UrlJoin("abr_mezzanine", "offerings")
    });
    const masterHash = mezzanineMetadata.default.prod_master_hash;
    let authorizationTokens = [
      await this.authClient.AuthorizationToken({libraryId, objectId, update: true}),
      await this.authClient.AuthorizationToken({versionHash: masterHash})
    ];
    const headers = {
      Authorization: authorizationTokens.map(token => `Bearer ${token}`).join(",")
    };
    const {data, errors, warnings, logs} = await this.CallBitcodeMethod({
      objectId,
      libraryId,
      writeToken,
      method: UrlJoin("media", "abr_mezzanine", "offerings", offeringKey, "finalize"),
      headers,
      constant: false
    });
    const finalizeResponse = await this.FinalizeContentObject({
      libraryId,
      objectId: objectId,
      writeToken,
      awaitCommitConfirmation: false
    });
    return {
      data,
      logs: logs || [],
      warnings: warnings || [],
      errors: errors || [],
      ...finalizeResponse
    };
  }
async FinalizeABRMezzanine ( { libraryId , objectId , writeToken , offeringKey = "default" } ) { const mezzanineMetadata = await this . ContentObjectMetadata ( { libraryId , objectId , writeToken , metadataSubtree : UrlJoin ( "abr_mezzanine" , "offerings" ) } ) ; const masterHash = mezzanineMetadata . default . prod_master_hash ; let authorizationTokens = [ await this . authClient . AuthorizationToken ( { libraryId , objectId , update : true } ) , await this . authClient . AuthorizationToken ( { versionHash : masterHash } ) ] ; const headers = { Authorization : authorizationTokens . map ( token => ` ${ token } ` ) . join ( "," ) } ; const { data , errors , warnings , logs } = await this . CallBitcodeMethod ( { objectId , libraryId , writeToken , method : UrlJoin ( "media" , "abr_mezzanine" , "offerings" , offeringKey , "finalize" ) , headers , constant : false } ) ; const finalizeResponse = await this . FinalizeContentObject ( { libraryId , objectId : objectId , writeToken , awaitCommitConfirmation : false } ) ; return { data , logs : logs || [ ] , warnings : warnings || [ ] , errors : errors || [ ] , ... finalizeResponse } ; }
Finalize a mezzanine object after all jobs have finished
 @methodGroup Media
 @namedParams
 @param {string} libraryId - ID of the mezzanine library
 @param {string} objectId - ID of the mezzanine object
 @param {string} writeToken - Write token for the mezzanine object
 @param {string=} offeringKey=default - The offering to process
Finalize a mezzanine object after all jobs have finished @methodGroup Media @namedParams @param { string } libraryId - ID of the mezzanine library @param { string } objectId - ID of the mezzanine object @param { string } writeToken - Write token for the mezzanine object @param { string = } offeringKey = default - The offering to process
// Authorization token for mezzanine and master