Class: Twilio::REST::Intelligence::V2::TranscriptContext::EncryptedSentencesContext

Inherits:
Twilio::REST::InstanceContext show all
Defined in:
lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, transcript_sid) ⇒ EncryptedSentencesContext

Initialize the EncryptedSentencesContext



52
53
54
55
56
57
58
59
60
61
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb', line 52

def initialize(version, transcript_sid)
    super(version)
    

    # Path Solution
    @solution = { transcript_sid: transcript_sid,  }
    @uri = "/Transcripts/#{@solution[:transcript_sid]}/Sentences/Encrypted"

    
end

Instance Method Details

#fetch(redacted: :unset) ⇒ EncryptedSentencesInstance

Fetch the EncryptedSentencesInstance



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb', line 66

def fetch(
    redacted: :unset
)

    params = Twilio::Values.of({
        'Redacted' => redacted,
    })
    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, params: params, headers: headers)
    EncryptedSentencesInstance.new(
        @version,
        payload,
        transcript_sid: @solution[:transcript_sid],
    )
end

#fetch_with_metadata(redacted: :unset) ⇒ EncryptedSentencesInstance

Fetch the EncryptedSentencesInstanceMetadata



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb', line 91

def (
  redacted: :unset
)

    params = Twilio::Values.of({
        'Redacted' => redacted,
    })
    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    response = @version.('GET', @uri, params: params, headers: headers)
    encrypted_sentences_instance = EncryptedSentencesInstance.new(
        @version,
        response.body,
        transcript_sid: @solution[:transcript_sid],
    )
    .new(
        @version,
        encrypted_sentences_instance,
        response.headers,
        response.status_code
    )
end

#inspectObject

Provide a detailed, user friendly representation



128
129
130
131
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb', line 128

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Intelligence.V2.EncryptedSentencesContext #{context}>"
end

#to_sObject

Provide a user friendly representation



121
122
123
124
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb', line 121

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Intelligence.V2.EncryptedSentencesContext #{context}>"
end