def create_new_bank_informations(self, application_details: ApplicationDetail, offerer_id: str) -> BankInformations: new_bank_informations = BankInformations() new_bank_informations.application_id = application_details.application_id new_bank_informations.offerer_id = offerer_id new_bank_informations.status = application_details.status if application_details.status == BankInformationStatus.ACCEPTED: new_bank_informations.iban = application_details.iban new_bank_informations.bic = application_details.bic else: new_bank_informations.iban = None new_bank_informations.bic = None return new_bank_informations
def create_new_bank_informations(self, application_details: ApplicationDetail, venue_id: int) -> BankInformations: new_bank_informations = BankInformations() new_bank_informations.application_id = application_details.application_id new_bank_informations.venue_id = venue_id new_bank_informations.status = application_details.status new_bank_informations.date_modified = application_details.modification_date if application_details.status == BankInformationStatus.ACCEPTED: new_bank_informations.iban = application_details.iban new_bank_informations.bic = application_details.bic else: new_bank_informations.iban = None new_bank_informations.bic = None return new_bank_informations