Class: Retab::CreateWorkflowRequest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::CreateWorkflowRequest
- Defined in:
- lib/retab/workflows/create_workflow_request.rb
Constant Summary collapse
- HASH_ATTRS =
{ name: :name, description: :description, project_id: :project_id }.freeze
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ CreateWorkflowRequest
constructor
A new instance of CreateWorkflowRequest.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ CreateWorkflowRequest
Returns a new instance of CreateWorkflowRequest.
20 21 22 23 24 25 26 |
# File 'lib/retab/workflows/create_workflow_request.rb', line 20 def initialize(json) super() hash = self.class.normalize(json) @name = hash[:name].nil? ? "Untitled Workflow" : hash[:name] @description = hash[:description].nil? ? "" : hash[:description] @project_id = hash[:project_id] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
14 15 16 |
# File 'lib/retab/workflows/create_workflow_request.rb', line 14 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/retab/workflows/create_workflow_request.rb', line 14 def name @name end |
#project_id ⇒ Object
Returns the value of attribute project_id.
14 15 16 |
# File 'lib/retab/workflows/create_workflow_request.rb', line 14 def project_id @project_id end |