Class: RDStationClient::Authenticated

Inherits:
Base
  • Object
show all
Defined in:
lib/rd_station_client/authenticated.rb

Direct Known Subclasses

Contact::Find, Contact::Update, Event::Create

Constant Summary collapse

AUTH_DATA_KEY =
:auth_data

Instance Method Summary collapse

Methods inherited from Base

config

Instance Method Details

#runObject



7
8
9
10
11
12
13
14
# File 'lib/rd_station_client/authenticated.rb', line 7

def run
  ensure_access_token
    .and_then do
      super.on_failure(:unauthorized) do
        return refresh_access_token.and_then { super }
      end
    end
end