Exemplo n.º 1
0
 def create(self):
     client = get_mangopay_api_client()
     mangopay_bank_account = BankAccount()
     mangopay_bank_account.UserId = self.mangopay_user.mangopay_id
     mangopay_bank_account.OwnerName = \
         self.mangopay_user.user.get_full_name()
     mangopay_bank_account.OwnerAddress = self.address
     mangopay_bank_account.IBAN = self.iban
     mangopay_bank_account.BIC = self.bic
     created_bank_account = client.users.CreateBankAccount(
         str(self.mangopay_user.mangopay_id), mangopay_bank_account)
     self.mangopay_id = created_bank_account.Id
     self.save()
Exemplo n.º 2
0
 def create(self):
     client = get_mangopay_api_client()
     mangopay_bank_account = BankAccount()
     mangopay_bank_account.UserId = self.mangopay_user.mangopay_id
     mangopay_bank_account.OwnerName = \
         self.mangopay_user.user.get_full_name()
     mangopay_bank_account.OwnerAddress = self.address
     mangopay_bank_account.IBAN = self.iban
     mangopay_bank_account.BIC = self.bic
     created_bank_account = client.users.CreateBankAccount(
         str(self.mangopay_user.mangopay_id), mangopay_bank_account)
     self.mangopay_id = created_bank_account.Id
     self.save()
Exemplo n.º 3
0
 def getJohnsAccount(self):
     """Creates TestBase._johnsAccount (bank account belonging to John) if not created yet"""
     if self._johnsAccount == None:
         john = self.getJohn()
         account = BankAccount()
         account.Type = 'IBAN'
         account.OwnerName = john.FirstName + ' ' +  john.LastName
         account.OwnerAddress = john.Address
         account.IBAN = 'FR7617906000320008335232973'
         account.BIC = 'BINAADADXXX'
         self._johnsAccount = self.sdk.users.CreateBankAccount(john.Id, account)
         self.assertEqualInputProps(self._johnsAccount, account, True)
     return self._johnsAccount
Exemplo n.º 4
0
 def create(self):
     client = get_mangopay_api_client()
     mangopay_bank_account = BankAccount()
     mangopay_bank_account.UserId = self.mangopay_user.mangopay_id
     mangopay_bank_account.OwnerName = \
         self.mangopay_user.user.get_full_name()
     mangopay_bank_account.OwnerAddress = self.address
     mangopay_bank_account.IBAN = self.iban
     mangopay_bank_account.BIC = self.bic
     if not mangopay_bank_account.IBAN:
         mangopay_bank_account.Type = 'OTHER'
         bank_details = BankAccountDetailsOTHER()
         bank_details.AccountNumber = self.account_number
         bank_details.Country = self.country
     else:
         bank_details = BankAccountDetailsIBAN()
     mangopay_bank_account.Details = bank_details
     created_bank_account = client.users.CreateBankAccount(
         str(self.mangopay_user.mangopay_id), mangopay_bank_account)
     self.mangopay_id = created_bank_account.Id
     self.save()