# WARNING: Do not edit by hand, this file was generated by Crank:
#
#   https://github.com/gocardless/crank
#

class BankAuthorisation(object):
    """A thin wrapper around a bank_authorisation, providing easy access to its
    attributes.

    Example:
      bank_authorisation = client.bank_authorisations.get()
      bank_authorisation.id
    """

    def __init__(self, attributes, api_response):
        self.attributes = attributes
        self.api_response = api_response

    @property
    def authorisation_type(self):
        return self.attributes.get('authorisation_type')
  

    @property
    def authorised_at(self):
        return self.attributes.get('authorised_at')
  

    @property
    def created_at(self):
        return self.attributes.get('created_at')
  

    @property
    def expires_at(self):
        return self.attributes.get('expires_at')
  

    @property
    def id(self):
        return self.attributes.get('id')
  

    @property
    def last_visited_at(self):
        return self.attributes.get('last_visited_at')
  

    @property
    def links(self):
        return self.Links(self.attributes.get('links'))
  

    @property
    def redirect_uri(self):
        return self.attributes.get('redirect_uri')
  

    @property
    def url(self):
        return self.attributes.get('url')
  


  

  

  

  

  

  

  
    class Links(object):
        """Wrapper for the response's 'links' attribute."""

        def __init__(self, attributes):
            self.attributes = attributes
    
        @property
        def billing_request(self):
            return self.attributes.get('billing_request')
    
        @property
        def institution(self):
            return self.attributes.get('institution')
    
  

  

  

