Change a bid
change_bidAdjust the bid amount on an existing outgoing offer. Specify the offer ID and new price, then verify the ok and message fields for confirmation.
Instructions
Change the amount of a bid the manager has already placed.
This changes what the manager has committed. Confirm the new amount with the user before calling it, and say what the old one was.
Ids come from get_offers; only offers whose direction is outgoing can be
changed. The player is taken from the offer itself rather than passed in, so a
change cannot end up pointing at a different player.
Like a new bid, the change waits for the next transfer round and can still be
pulled with withdraw_bid until then.
Refused before anything is sent if the id is unknown or if it belongs to an offer
for one of the manager's players. The new amount is not checked against credit:
Comunio enforces that itself and answers per item, so read ok and message.
Check ok and message in the result rather than assuming success.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| price | Yes | ||
| offer_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether this particular bid was accepted by Comunio | |
| price | Yes | Amount bid, in euros | |
| player | No | That player's name | |
| message | No | Comunio's reason, when it gives one | |
| offer_id | No | The offer Comunio created. Needed to change or withdraw it. | |
| player_id | Yes | Player the bid is for | |
| credit_after | No | Spending power left if every open bid wins, in euros. Accounts for the other bids, which Comunio's own `credit` figure does not. | |
| credit_committed | No | Already tied up in the manager's other open bids, in euros | |
| applied_immediately | Yes | False for a bid: it waits for the transfer round and can be withdrawn |