Method: UpBankingClient::WebhookDeliveryLogResourceAttributes#_to_hash

Defined in:
lib/up_banking/models/webhook_delivery_log_resource_attributes.rb

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value



248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/up_banking/models/webhook_delivery_log_resource_attributes.rb', line 248

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end