class ZuoraConnect::AppInstanceBase

def check_oauth_state(method=nil)

### START Connect OAUTH Methods ####
def check_oauth_state(method=nil)
  #Refresh token if already expired
  if self.oauth_expired?
    ZuoraConnect.logger.debug("Before '#{method}' method, Oauth expired")
    self.refresh_oauth
  end
end