def sync_bitcoin(customer, source):
    defaults = dict(
        customer=customer,
        active=source["active"],
        amount=utils.convert_amount_for_db(source["amount"], source["currency"]),
        amount_received=utils.convert_amount_for_db(source["amount_received"], source["currency"]),
        bitcoin_amount=source["bitcoin_amount"],
        bitcoin_amount_received=source["bitcoin_amount_received"],
        bitcoin_uri=source["bitcoin_uri"],
        currency=source["currency"],
        description=source["description"],
        email=source["email"],
        filled=source["filled"],
        inbound_address=source["inbound_address"],
        payment=source["payment"] if "payment" in source else "",
        refund_address=source["refund_address"] or "",
        uncaptured_funds=source["uncaptured_funds"],
        used_for_payment=source["used_for_payment"]
    )
    receiver, created = models.BitcoinReceiver.objects.get_or_create(
        stripe_id=source["id"],
        defaults=defaults
    )
    return utils.update_with_defaults(receiver, defaults, created)
Syncronizes the data for a Bitcoin receiver locally for a given customer
dataset/ETHPy150Open pinax/pinax-stripe/pinax/stripe/actions/sources.py/sync_bitcoin