def set_attributes_from_headers(self, headers):
        """Set instance attributes with HTTP header

        :param headers: HTTP header
        """
        self.total_count = headers.get('x-total-count', None)
        self.current_page = headers.get('x-current-page', None)
        self.per_page = headers.get('x-per-page', None)
        self.user_type = headers.get('x-user-type', None)

        if self.total_count:
            self.total_count = int(self.total_count)
        if self.current_page:
            self.current_page = int(self.current_page)
        if self.per_page:
            self.per_page = int(self.per_page)
def set_attributes_from_headers ( self , headers ) : self . total_count = headers . get ( 'x-total-count' , None ) self . current_page = headers . get ( 'x-current-page' , None ) self . per_page = headers . get ( 'x-per-page' , None ) self . user_type = headers . get ( 'x-user-type' , None ) if self . total_count : self . total_count = int ( self . total_count ) if self . current_page : self . current_page = int ( self . current_page ) if self . per_page : self . per_page = int ( self . per_page )
Set instance attributes with HTTP header

        :param headers: HTTP header