Ejemplo n.º 1
0
def make_mangopay_account(FirstName):
    account = UserNatural()
    account.FirstName = FirstName
    account.LastName = 'Foobar'
    account.CountryOfResidence = 'BE'
    account.Nationality = 'BE'
    account.Birthday = 0
    account.Email = '*****@*****.**'
    return mangoapi.users.Create(account).Id
Ejemplo n.º 2
0
def make_mangopay_account(FirstName):
    account = UserNatural()
    account.FirstName = FirstName
    account.LastName = 'Foobar'
    account.CountryOfResidence = 'BE'
    account.Nationality = 'BE'
    account.Birthday = 0
    account.Email = '*****@*****.**'
    return mangoapi.users.Create(account).Id
Ejemplo n.º 3
0
 def _build(self):
     mangopay_user = UserNatural()
     mangopay_user.FirstName = self._first_name
     mangopay_user.LastName = self._last_name
     mangopay_user.Email = self._email
     mangopay_user.Birthday = self._birthday_fmt()
     mangopay_user.CountryOfResidence = self.country_of_residence.code
     mangopay_user.Nationality = self.nationality.code
     mangopay_user.Occupation = self.occupation
     mangopay_user.IncomeRange = self.income_range
     mangopay_user.Address = self.address
     mangopay_user.Id = self.mangopay_id
     return mangopay_user
Ejemplo n.º 4
0
 def _build(self):
     mangopay_user = UserNatural()
     mangopay_user.FirstName = self._first_name
     mangopay_user.LastName = self._last_name
     mangopay_user.Email = self._email
     mangopay_user.Birthday = self._birthday_fmt()
     mangopay_user.CountryOfResidence = self.country_of_residence.code
     mangopay_user.Nationality = self.nationality.code
     mangopay_user.Occupation = self.occupation
     mangopay_user.IncomeRange = self.income_range
     mangopay_user.Address = self.address
     mangopay_user.Id = self.mangopay_id
     return mangopay_user
Ejemplo n.º 5
0
 def getJohn(self):
     """Creates TestBase._john (test natural user) if not created yet"""
     if (self._john == None):
         user = UserNatural()
         user.FirstName = "John"
         user.LastName = "Doe"
         user.Email = "*****@*****.**"
         user.Address = self.getNewAddress()
         user.Birthday = int(time.mktime((1975, 12, 21, 0,0,0, -1, -1, -1)))
         user.Nationality = "FR"
         user.CountryOfResidence = "FR"
         user.Occupation = "programmer"
         user.IncomeRange = 3
         self._john = self.sdk.users.Create(user)
         self.assertEqualInputProps(self._john, user, True)
     return self._john
Ejemplo n.º 6
0
 def getJohn(self):
     """Creates TestBase._john (test natural user) if not created yet"""
     if (self._john == None):
         user = UserNatural()
         user.FirstName = "John"
         user.LastName = "Doe"
         user.Email = "*****@*****.**"
         user.Address = "Some Address"
         user.Birthday = int(time.mktime((1975, 12, 21, 0,0,0, -1, -1, -1)))
         user.Nationality = "FR"
         user.CountryOfResidence = "FR"
         user.Occupation = "programmer"
         user.IncomeRange = 3
         self._john = self.sdk.users.Create(user)
         self.assertEqualInputProps(self._john, user, True)
     return self._john
Ejemplo n.º 7
0
	def create_user(self, dj_user):
		return self.sdk.users.GetAll()[0] #FIXME
		user = UserNatural()
		user.FirstName = dj_user.first_name
		user.LastName = dj_user.last_name
		user.Email = dj_user.email
		user.Birthday = int(time.mktime(
				(dj_user.profile.birth_date.year,
				 dj_user.profile.birth_date.month,
				 dj_user.profile.birth_date.day,
				 0, 0, 0, -1, -1, -1))
		)
		user.Nationality = dj_user.profile.nationality
		user.CountryOfResidence = dj_user.country_of_residence

		# user.IncomeRange = dj_user.

		return self.sdk.users.Create(user)