async updateCode(code, uniqueChecker) {
        if (code.equals(this.props.code)) {
            return;
        }
        if (this.changed.code) {
            throw new errors.InvalidOfferCode({
                message: 'Offer `code` cannot be updated more than once.'
            });
        }
        if (!await uniqueChecker.isUniqueCode(code)) {
            throw new errors.InvalidOfferCode({
                message: `Offer 'code' must be unique. Please change and try again.`
            });
        }

        this.events.push(OfferCodeChangeEvent.create({
            offerId: this.id,
            previousCode: this.props.code,
            currentCode: code
        }));

        this.changed.code = this.props.code;
        this.props.code = code;
    }
@param {OfferCode} code
@param {UniqueChecker} uniqueChecker
@returns {Promise<void>}