Method: DocuSign_Maestro::WorkflowDefinition#initialize

Defined in:
lib/docusign_maestro/models/workflow_definition.rb

#initialize(attributes = {}) ⇒ WorkflowDefinition

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

[View source]

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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
117
118
119
120
121
122
123
124
125
126
# File 'lib/docusign_maestro/models/workflow_definition.rb', line 75

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'accountId')
    self. = attributes[:'accountId']
  end

  if attributes.has_key?(:'createdByName')
    self.created_by_name = attributes[:'createdByName']
  end

  if attributes.has_key?(:'documentVersion')
    self.document_version = attributes[:'documentVersion']
  end

  if attributes.has_key?(:'participants')
    if (value = attributes[:'participants']).is_a?(Hash)
      self.participants = value
    end
  end

  if attributes.has_key?(:'schemaVersion')
    self.schema_version = attributes[:'schemaVersion']
  end

  if attributes.has_key?(:'steps')
    if (value = attributes[:'steps']).is_a?(Array)
      self.steps = value
    end
  end

  if attributes.has_key?(:'trigger')
    self.trigger = attributes[:'trigger']
  end

  if attributes.has_key?(:'variables')
    if (value = attributes[:'variables']).is_a?(Hash)
      self.variables = value
    end
  end

  if attributes.has_key?(:'workflowDescription')
    self.workflow_description = attributes[:'workflowDescription']
  end

  if attributes.has_key?(:'workflowName')
    self.workflow_name = attributes[:'workflowName']
  end
end