Class: Typecast::Models::CustomVoice
- Inherits:
-
Object
- Object
- Typecast::Models::CustomVoice
- Defined in:
- lib/typecast/models.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#voice_id ⇒ Object
readonly
Returns the value of attribute voice_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(voice_id:, name:, model: nil, source: nil, status: nil, error: nil, created_at: nil) ⇒ CustomVoice
constructor
A new instance of CustomVoice.
Constructor Details
#initialize(voice_id:, name:, model: nil, source: nil, status: nil, error: nil, created_at: nil) ⇒ CustomVoice
Returns a new instance of CustomVoice.
236 237 238 239 240 241 242 243 244 |
# File 'lib/typecast/models.rb', line 236 def initialize(voice_id:, name:, model: nil, source: nil, status: nil, error: nil, created_at: nil) @voice_id = voice_id @name = name @model = model @source = source @status = status @error = error @created_at = created_at end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
230 231 232 |
# File 'lib/typecast/models.rb', line 230 def created_at @created_at end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
230 231 232 |
# File 'lib/typecast/models.rb', line 230 def error @error end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
230 231 232 |
# File 'lib/typecast/models.rb', line 230 def model @model end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
230 231 232 |
# File 'lib/typecast/models.rb', line 230 def name @name end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
230 231 232 |
# File 'lib/typecast/models.rb', line 230 def source @source end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
230 231 232 |
# File 'lib/typecast/models.rb', line 230 def status @status end |
#voice_id ⇒ Object (readonly)
Returns the value of attribute voice_id.
230 231 232 |
# File 'lib/typecast/models.rb', line 230 def voice_id @voice_id end |
Class Method Details
.from_h(hash) ⇒ Object
232 233 234 |
# File 'lib/typecast/models.rb', line 232 def self.from_h(hash) new(voice_id: hash.fetch("voice_id", ""), name: hash.fetch("name", ""), model: hash["model"], source: hash["source"], status: hash["status"], error: hash["error"], created_at: hash["created_at"]) end |