Method: DocuSign_Maestro::WorkflowInstance#initialize

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

#initialize(attributes = {}) ⇒ WorkflowInstance

Initializes the object

Parameters:

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

    Model attributes in the form of hash

[View source]

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
127
128
129
130
# File 'lib/docusign_maestro/models/workflow_instance.rb', line 79

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?(:'creatorId')
    self.creator_id = attributes[:'creatorId']
  end

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

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

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

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

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

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

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

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

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