from mangopaysdk.entities.entitybase import EntityBase
from mangopaysdk.types.address import Address


class BankAccount(EntityBase):
    """Bank Account entity."""
    
    def __init__(self, id = None):
        self.UserId = None
        # Type of bank account
        self.Type = None
        self.OwnerName = None
        self.OwnerAddress = None
        # must be valid ^[a-zA-Z]{2}\d{2}\s*(\w{4}\s*){2,7}\w{1,4}
        #self.IBAN = None
        self.Details = None
        # example BREXPLPWKRA
        #self.BIC = None
        return super(BankAccount, self).__init__(id)

    def GetSubObjects(self):
        """Get array with mapping which property is object and what type of object.
        return dictionary
        """
        return {'OwnerAddress' : 'Address'}

    def GetReadOnlyProperties(self):
        properties = super(BankAccount, self).GetReadOnlyProperties()
        properties.append('UserId')
        properties.append('Type')
        return properties

    def GetDependsObjects(self):
        return { 
                'Type': {
                    '_property_name': 'Details', 
                    'IBAN': 'BankAccountDetailsIBAN',
                    'GB': 'BankAccountDetailsGB',
                    'US': 'BankAccountDetailsUS',
                    'CA': 'BankAccountDetailsCA',
                    'OTHER': 'BankAccountDetailsOTHER'
                }
        }
@@ -356,168 +356,20 @@
     
-# must be valid %5E%5Ba-zA-Z%5D%7B2%7D%5Cd%7B2%7D%5Cs*(%5Cw%7B4%7D%5Cs*)%7B2,7%7D%5Cw%7B1,4%7D%0A        #self.IBAN = None%0A        self.Details = None%0A        # example BREXPLPWKRA%0A        #self.BIC
+self.Details
  = N
@@ -1231,16 +1231,17 @@
      %7D%0A        %7D
+%0A

Remove unnecessary comments