Module: BookingSync::Engine::Models::MultiApplicationsAccount

Extended by:
ActiveSupport::Concern
Includes:
BaseAccount
Defined in:
lib/bookingsync/engine/models/multi_applications_account.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from BaseAccount

#api, #clear_token!, #refresh_token!, #token, #update_token

Instance Method Details

#applicationObject



50
51
52
# File 'lib/bookingsync/engine/models/multi_applications_account.rb', line 50

def application
  @application ||= Application.find_by_host(host)
end

#application_tokenObject



36
37
38
39
40
41
# File 'lib/bookingsync/engine/models/multi_applications_account.rb', line 36

def application_token
  BookingSync::Engine.application_token(
    client_id: application.client_id,
    client_secret: application.client_secret
  )
end

#oauth_clientObject



43
44
45
46
47
48
# File 'lib/bookingsync/engine/models/multi_applications_account.rb', line 43

def oauth_client
  BookingSync::Engine.oauth_client(
    client_id: application.client_id,
    client_secret: application.client_secret
  )
end