The `<device-id>` is shown in the `xinput list` output - you can use the name as a string or the id number. You can query the actual button state using `xinput query-state <device-id>`.
According to this the default configuration (`xinput set-button-map <device-id> 1 2 3 4 5 6 7 8 9`) would give you middle click on the wheel button and right-click on the middle finger.
The ring finger button would be for special use as well as the thumb button.
I for myself prefer having the middle-button on the middle finger and the right-click on the ring finger.
So I mapped 8→3 and 3→2 and I also mapped 9→8 and 2→9 to have the wheel button and thumb button for special use in some programs which make use of additional buttons.