Class: Twilio::JWT::AccessToken::TaskRouterGrant

Inherits:
Object
  • Object
show all
Includes:
Twilio::JWT::AccessTokenGrant
Defined in:
lib/twilio-ruby/jwt/access_token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#roleObject

Returns the value of attribute role


250
251
252
# File 'lib/twilio-ruby/jwt/access_token.rb', line 250

def role
  @role
end

#worker_sidObject

Returns the value of attribute worker_sid


250
251
252
# File 'lib/twilio-ruby/jwt/access_token.rb', line 250

def worker_sid
  @worker_sid
end

#workspace_sidObject

Returns the value of attribute workspace_sid


250
251
252
# File 'lib/twilio-ruby/jwt/access_token.rb', line 250

def workspace_sid
  @workspace_sid
end

Instance Method Details

#_generate_payloadObject


258
259
260
261
262
263
264
265
266
267
268
# File 'lib/twilio-ruby/jwt/access_token.rb', line 258

def _generate_payload
  payload = {}

  payload[:workspace_sid] = workspace_sid if workspace_sid

  payload[:worker_sid] = worker_sid if worker_sid

  payload[:role] = role if role

  payload
end

#_keyObject


254
255
256
# File 'lib/twilio-ruby/jwt/access_token.rb', line 254

def _key
  'task_router'
end