@classmethod
def from_api_data(cls, data):
    """Convert data from the API into a native object.

        Args:
            data (dict): API data describing a currency.

        Returns:
            :class:`Currency <pyticketswitch.currency.Currency>`: the currency.

        """
    kwargs = {'factor': data.get('currency_factor'), 'places': data.get(
        'currency_places'), 'number': data.get('currency_number'),
        'pre_symbol': data.get('currency_pre_symbol'), 'post_symbol': data.
        get('currency_post_symbol')}
    return cls(data.get('currency_code'), **kwargs)
