Class: Twilio::REST::Assistants::V1::KnowledgeList::AssistantsV1ServiceCreatePolicyRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/assistants/v1/knowledge.rb,
lib/twilio-ruby/rest/assistants/v1/knowledge.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ AssistantsV1ServiceCreatePolicyRequest

Returns a new instance of AssistantsV1ServiceCreatePolicyRequest.



57
58
59
60
61
62
63
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 57

def initialize(payload)
        @description = payload["description"]
        @id = payload["id"]
        @name = payload["name"]
        @policy_details = payload["policy_details"]
        @type = payload["type"]
end

Instance Attribute Details

#descriptionObject

Parameters:

  • : (description)
    String

    The description of the policy.

  • : (id)
    String

    The Policy ID.

  • : (name)
    String

    The name of the policy.

  • : (policy_details)
    Hash
  • : (type)
    String

    The description of the policy.



56
57
58
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 56

def description
  @description
end

#idObject

Parameters:

  • : (description)
    String

    The description of the policy.

  • : (id)
    String

    The Policy ID.

  • : (name)
    String

    The name of the policy.

  • : (policy_details)
    Hash
  • : (type)
    String

    The description of the policy.



56
57
58
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 56

def id
  @id
end

#nameObject

Parameters:

  • : (description)
    String

    The description of the policy.

  • : (id)
    String

    The Policy ID.

  • : (name)
    String

    The name of the policy.

  • : (policy_details)
    Hash
  • : (type)
    String

    The description of the policy.



56
57
58
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 56

def name
  @name
end

#policy_detailsObject

Parameters:

  • : (description)
    String

    The description of the policy.

  • : (id)
    String

    The Policy ID.

  • : (name)
    String

    The name of the policy.

  • : (policy_details)
    Hash
  • : (type)
    String

    The description of the policy.



56
57
58
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 56

def policy_details
  @policy_details
end

#typeObject

Parameters:

  • : (description)
    String

    The description of the policy.

  • : (id)
    String

    The Policy ID.

  • : (name)
    String

    The name of the policy.

  • : (policy_details)
    Hash
  • : (type)
    String

    The description of the policy.



56
57
58
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 56

def type
  @type
end

Instance Method Details

#to_json(options = {}) ⇒ Object



64
65
66
67
68
69
70
71
72
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge.rb', line 64

def to_json(options = {})
{
        "description": @description,
        "id": @id,
        "name": @name,
        "policy_details": @policy_details,
        "type": @type,
}.to_json(options)
end