def list(cls, request): if request.method != 'GET': return ContractController._build_error_response('Invalid HTTP method') params = request.GET email = params.get('account', None) if not email: return ContractController._build_error_response('Missing account parameter') account = cls.customer_manager.get_account(email) if not account: return ContractController._build_error_response('Invalid account') billing_address = cls.customer_manager.get_billing_address(account) return ContractController._build_ok_with_data_response('Listing registered billing address', billing_address.to_dict())