How to change an int in a void?

I’m not sure if my question is worded correctly for my issue. So I’m making a store script. Here’s what I have.

public int TotalCurrency = 0; // how much money player has

public int ItemCost; // his much the item should cost

Public void ItemOne() 
{
if (TotalCurrency >= 5)
{
TotalCurrency -= 5;
}
}

What I have done is that I’ve added a ui button and set it to the ItemOne void. It works and all, but I want to be able to set the cost of the item in the inspector, corresponding to the different items. Say I had Public void ItemTwo and the cost if that item was 3. How can I make it so that in the inspector I can change what the cost of the item is depending on the different void like ItemOne or ItemTwo ItemSeven etc. Like is there a way to set the cist of each item with just one into that you can change depending in what void Item I plug into the ui button? Thanks and any help will be appreciated. If you need clarification please ask. In a way what I’m trying to make is a store script where you can buy items.
Sorry for the topic not being correct. For some reason it doesn’t let me choose another.

You shouldn’t use methods like that.
Make an item class that contains all your field/properties required.

[Serializeable]
public class Item 
{
      public int ItemCost;
}

And your manager class:

public class YourManagerClass : MonoBehaviour 
{
       public int TotalCurrency = 0;
       public Item[] Items; // Set in inspector

       public void Buy(Item item)
       {
             if (TotalCurrency >= item.ItemCost) 
             {
                     TotalCurrency -= item.ItemCost;
             }
       }
}

replace the 5 with ItemCost, then it will check if you have the itemcost amount of money then it subtracts the cost from your totalcurrency (i think this is what you mean?)

Change the “5” by “ItemCost”