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.
246 247 248 249 250 251 252 253 254 |
# File 'lib/typecast/models.rb', line 246 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.
240 241 242 |
# File 'lib/typecast/models.rb', line 240 def created_at @created_at end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
240 241 242 |
# File 'lib/typecast/models.rb', line 240 def error @error end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
240 241 242 |
# File 'lib/typecast/models.rb', line 240 def model @model end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
240 241 242 |
# File 'lib/typecast/models.rb', line 240 def name @name end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
240 241 242 |
# File 'lib/typecast/models.rb', line 240 def source @source end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
240 241 242 |
# File 'lib/typecast/models.rb', line 240 def status @status end |
#voice_id ⇒ Object (readonly)
Returns the value of attribute voice_id.
240 241 242 |
# File 'lib/typecast/models.rb', line 240 def voice_id @voice_id end |
Class Method Details
.from_h(hash) ⇒ Object
242 243 244 |
# File 'lib/typecast/models.rb', line 242 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 |