What am I doing wrong? Required parameter projectId was null

const { InventoryApi } = require("@unity-services/economy-2.3");
const _ = require('lodash-4.17');

module.exports = async ({ params, context, logger }) => {
  const { projectId, playerId, accessToken } = context;
  const inventoryApi = new InventoryApi(context);


   await inventoryApi.addInventoryItem(projectId, playerId,
   { inventoryItemId:"MINOR_HEALTH_POTION"
   });
}

Running this in cloud code returns:

Invocation Error
------------------------------
RequiredError: Required parameter projectId was null or undefined when calling addInventoryItem.

{
  "message": "Required parameter projectId was null or undefined when calling addInventoryItem.",
  "name": "RequiredError",
  "stackTrace": []
}

Any ideas?

I just figured it out as I posted, incase anyone else runs into this issue:

const { InventoryApi } = require("@unity-services/economy-2.3");

This is the bit of code giving me the problem. Switching to:

const { InventoryApi } = require("@unity-services/economy-2.0");

Solved the problem.
I was following the documentation here: Use cases (unity.com) which shows to use 2.3 in the example code...

Hey thanks for reaching out. We did notice that there was a change in the new Economy v2.3 that was undocumented. The new updated samples should be published soon.

In your case this should work:

await inventoryApi.addInventoryItem({
  projectId,
  playerId,
  addInventoryRequest: {
    inventoryItemId: "MINOR_HEALTH_POTION"
  }
});

More information on the addInventoryItem can be found here

Please do reach out with any other inconsistencies that you notice or feedback you have.

[quote=“MariusUrbelis”, post:3, topic: 888063]
Hey thanks for reaching out. We did notice that there was a change in the new Economy v2.3 that was undocumented. The new updated samples should be published soon.

In your case this should work:

await inventoryApi.addInventoryItem({
  projectId,
  playerId,
  addInventoryRequest: {
    inventoryItemId: "MINOR_HEALTH_POTION"
  }
});

More information on the addInventoryItem can be found here

Please do reach out with any other inconsistencies that you notice or feedback you have.
[/quote]

Should I switch all of my code to use this new 2.3 implementation? Is there a changelog for economy somewhere so I can see the differences between 2.0 or 2.3?