Class: Twilio::JWT::TaskRouterCapability::Policy

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/jwt/task_router.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, method, allowed, post_filters = {}, query_filters = {}) ⇒ Policy

Returns a new instance of Policy.



56
57
58
59
60
61
62
# File 'lib/twilio-ruby/jwt/task_router.rb', line 56

def initialize(url, method, allowed, post_filters = {}, query_filters = {})
  @url = url
  @method = method
  @allowed = allowed
  @post_filters = post_filters
  @query_filters = query_filters
end

Instance Attribute Details

#allowedObject

Returns the value of attribute allowed.



50
51
52
# File 'lib/twilio-ruby/jwt/task_router.rb', line 50

def allowed
  @allowed
end

#methodObject

Returns the value of attribute method.



50
51
52
# File 'lib/twilio-ruby/jwt/task_router.rb', line 50

def method
  @method
end

#post_filtersObject

Returns the value of attribute post_filters.



50
51
52
# File 'lib/twilio-ruby/jwt/task_router.rb', line 50

def post_filters
  @post_filters
end

#query_filtersObject

Returns the value of attribute query_filters.



50
51
52
# File 'lib/twilio-ruby/jwt/task_router.rb', line 50

def query_filters
  @query_filters
end

#urlObject

Returns the value of attribute url.



50
51
52
# File 'lib/twilio-ruby/jwt/task_router.rb', line 50

def url
  @url
end

Instance Method Details

#_generate_payloadObject



64
65
66
67
68
69
70
71
72
73
# File 'lib/twilio-ruby/jwt/task_router.rb', line 64

def _generate_payload
  policy = {
    url: @url,
    method: @method,
    query_filter: @query_filters,
    post_filter: @post_filters,
    allow: @allowed
  }
  policy
end