Class: BigShift::GetAccessTokenCommand

Inherits:
BaseCommand show all
Defined in:
lib/big_shift/commands/get_access_token_command.rb

Class Method Summary collapse

Class Method Details

.endpointObject



23
24
25
# File 'lib/big_shift/commands/get_access_token_command.rb', line 23

def endpoint
  'token'
end

.executeObject



4
5
6
# File 'lib/big_shift/commands/get_access_token_command.rb', line 4

def execute
  GetAccessTokenResponse.new post
end

.headersObject



8
9
10
11
12
# File 'lib/big_shift/commands/get_access_token_command.rb', line 8

def headers
  {
    'Content-Type' => 'application/json',
  }
end

.paramsObject



14
15
16
17
18
19
20
21
# File 'lib/big_shift/commands/get_access_token_command.rb', line 14

def params
  {
    :client_id     => client_id,
    :client_secret => client_secret,
    :refresh_token => refresh_token,
    :grant_type    => 'refresh_token',
  }
end