code: def _calculate_refund_amount(self, amount=None):
  		
  		eligible_to_refund = self.amount - (self.amount_refunded or 0)
  		if amount:
  			amount_to_refund = min(eligible_to_refund, amount)
  		else:
  			amount_to_refund = eligible_to_refund
  		return int(amount_to_refund * 100)
docs: :rtype: int
  		:return: amount that can be refunded, in CENTS