Class: Retell::SDK::Unofficial::Agent
- Inherits:
-
Base
- Object
- Base
- Retell::SDK::Unofficial::Agent
show all
- Defined in:
- lib/retell/sdk/unofficial/agent.rb
Instance Attribute Summary
Attributes inherited from Base
#changed_attributes, #client
Instance Method Summary
collapse
Methods inherited from Base
#[], #[]=, #each, each_attribute, #fetch, inherited, #initialize, #keys, #to_h, #values, writeable_attributes
Instance Method Details
#delete ⇒ Object
67
68
69
|
# File 'lib/retell/sdk/unofficial/agent.rb', line 67
def delete
@client.agent.delete(self)
end
|
#fallback_voices ⇒ Object
41
42
43
|
# File 'lib/retell/sdk/unofficial/agent.rb', line 41
def fallback_voices
fallback_voice_ids
end
|
#fallback_voices=(value) ⇒ Object
45
46
47
|
# File 'lib/retell/sdk/unofficial/agent.rb', line 45
def fallback_voices=(value)
self[:fallback_voice_ids] = value
end
|
#id ⇒ Object
21
22
23
|
# File 'lib/retell/sdk/unofficial/agent.rb', line 21
def id
agent_id
end
|
#name ⇒ Object
25
26
27
|
# File 'lib/retell/sdk/unofficial/agent.rb', line 25
def name
agent_name
end
|
#name=(value) ⇒ Object
29
30
31
|
# File 'lib/retell/sdk/unofficial/agent.rb', line 29
def name=(value)
self[:agent_name] = value
end
|
#retrieve ⇒ Object
49
50
51
|
# File 'lib/retell/sdk/unofficial/agent.rb', line 49
def retrieve
@client.agent.retrieve(self)
end
|
#update(**params) ⇒ Object
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/retell/sdk/unofficial/agent.rb', line 53
def update(**params)
update_params = @changed_attributes.merge(params)
if update_params.any?
updated_agent = @client.agent.update(self, **update_params)
self.class.attributes.each do |attr|
instance_variable_set("@#{attr}", updated_agent.send(attr))
end
@changed_attributes.clear
end
self
end
|
#voice ⇒ Object
33
34
35
|
# File 'lib/retell/sdk/unofficial/agent.rb', line 33
def voice
voice_id
end
|
#voice=(value) ⇒ Object
37
38
39
|
# File 'lib/retell/sdk/unofficial/agent.rb', line 37
def voice=(value)
self[:voice_id] = value
end
|