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.



191
192
193
# File 'lib/twilio-ruby/jwt/access_token.rb', line 191

def role
  @role
end

#worker_sidObject

Returns the value of attribute worker_sid.



191
192
193
# File 'lib/twilio-ruby/jwt/access_token.rb', line 191

def worker_sid
  @worker_sid
end

#workspace_sidObject

Returns the value of attribute workspace_sid.



191
192
193
# File 'lib/twilio-ruby/jwt/access_token.rb', line 191

def workspace_sid
  @workspace_sid
end

Instance Method Details

#_generate_payloadObject



199
200
201
202
203
204
205
206
207
208
209
# File 'lib/twilio-ruby/jwt/access_token.rb', line 199

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



195
196
197
# File 'lib/twilio-ruby/jwt/access_token.rb', line 195

def _key
  'task_router'
end