def __init__(self, game, meta_data, offering_keys, resource_keys):
        super(StoreOffering, self).__init__(game, meta_data, offering_keys)

        prices = meta_data.get('price', meta_data.get('prices'))
        if prices is None:
            self.error('price property missing for store offering "%s"' % self.key)
            prices = {DEFAULT_CURRENCY_TYPE: 1}

        self.prices = {}
        for currency, currency_price in prices.items():
            if currency_price <= 0:
                self.error('price %s must be greater than zero for store offering "%s"' % (currency, self.key))
            try:
                self.prices[currency] = Money(get_currency(currency), currency_price)
            except TypeError:
                self.error('price %s invalid precision for store offering "%s" using default 1 %s'
                           % (currency, self.key, currency))
                self.prices[currency] = Money(get_currency(currency), 1)

        output = meta_data.get('output')
        if output is None:
            self.error('output property missing for store offering "%s"' % self.key)
            output = {}

        if not isinstance(output, dict):
            self.error('output property should be a dictionary for store offering "%s"' % self.key)
            output = {}

        self.output = {}
        for output_key, output_amount in output.items():
            if output_key not in resource_keys:
                self.error('no resource with key "%s".' % output_key)
            elif not isinstance(output_amount, int):
                self.error('output key "%s" amount must be an integer.' % output_key)
            elif output_amount <= 0:
                self.error('output key "%s" amount must be greater than zero.' % output_key)
            else:
                self.output[output_key] = output_amount

        try:
            self.available = asbool(meta_data.get('available', True))
        except ValueError:
            self.error('available property must be a boolean value.')
dataset/ETHPy150Open turbulenz/turbulenz_local/turbulenz_local/models/apiv1/store.py/StoreOffering.__init__/original