@classmethod
def from_pagarme_dict(cls, django_user_id, pagarme_transaction):
    """
        Creates UserPaymentProfile from pagarme api json transaction
        :param django_user_id: django user id
        :param pagarme_transaction: pagarme api transaction dict
        :return: UserPaymentProfile
        """
    customer = pagarme_transaction['customer']
    document = customer['documents'][-1]
    address = pagarme_transaction['billing']['address']
    return cls(user_id=django_user_id, customer_type=customer['type'],
        costumer_country=customer['country'], document_number=document[
        'number'], document_type=document['type'], name=customer['name'],
        email=customer['email'], phone=customer['phone_numbers'][-1].
        replace('+', ''), street=address['street'], complementary=address[
        'complementary'], street_number=address['street_number'],
        neighborhood=address['neighborhood'], city=address['city'], state=
        address['state'], zipcode=address['zipcode'], address_country=
        address['country'])
