Class: Influxdb::Api::Namespaces::Shards

Inherits:
Base
  • Object
show all
Defined in:
lib/influxdb/api/namespaces/shards.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#all, #delete, #initialize

Constructor Details

This class inherits a constructor from Influxdb::Api::Namespaces::Base

Instance Method Details

#create(attributes) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/influxdb/api/namespaces/shards.rb', line 7

def create(attributes)
  attributes['startTime'] = cast_datetime(attributes['startTime']) if attributes['startTime']
  attributes[:startTime] = cast_datetime(attributes[:startTime]) if attributes[:startTime]
  attributes['endTime'] = cast_datetime(attributes['endTime']) if attributes['endTime']
  attributes[:endTime] = cast_datetime(attributes[:endTime]) if attributes[:endTime]

  super(attributes)
end