Method: Dropbox::Sign::SignatureRequestGetResponse#to_hash

Defined in:
lib/dropbox-sign/models/signature_request_get_response.rb

#to_hash(include_nil = true) ⇒ Hash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



230
231
232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/dropbox-sign/models/signature_request_get_response.rb', line 230

def to_hash(include_nil = true)
  hash = {}
  self.class.merged_attributes.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      next unless include_nil
      is_nullable = self.class.merged_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value, include_nil)
  end
  hash
end