19 lines
874 B
Swift
19 lines
874 B
Swift
/// Why a step towards a sale was turned down.
|
|||
|
|
public enum TradeError: Error, Equatable, Sendable {
|
||
|
|
/// The amount is not a positive number of cents at or under the asking price.
|
||
|
|
case invalidAmount
|
||
|
|
/// The listing does not exist, or is sold.
|
||
|
|
case listingUnavailable
|
||
|
|
/// The account is not a party to the conversation, offer, or sale — or the step is not theirs to take now.
|
||
|
|
case notAllowed
|
||
|
|
/// The buyer already has an open offer on the listing.
|
||
|
|
case offerAlreadyOpen
|
||
|
|
/// The offer is under the floor the seller hears offers from, in euro cents.
|
||
|
|
case offerTooLow(floorCents: Int)
|
||
|
|
/// The listing's seller takes no offers.
|
||
|
|
case offersNotAccepted
|
||
|
|
/// The listing, shop, conversation, or sale belongs to the account itself.
|
||
|
|
case ownListing
|
||
|
|
/// The shop has no owner to sell on its behalf.
|
||
|
|
case shopUnattended
|
||
|
|
}
|