Class: NotionRubyMapping::LastEditedTimeProperty

Inherits:
DateBaseProperty show all
Defined in:
lib/notion_ruby_mapping/last_edited_time_property.rb

Overview

LastEditedTimeProperty

Constant Summary collapse

TYPE =
"last_edited_time"

Instance Attribute Summary collapse

Attributes inherited from Property

#name, #will_update

Instance Method Summary collapse

Methods inherited from DateBaseProperty

#filter_after, #filter_before, #filter_does_not_equal, #filter_equals, #filter_next_month, #filter_next_week, #filter_next_year, #filter_on_or_after, #filter_on_or_before, #filter_past_month, #filter_past_week, #filter_past_year

Methods included from IsEmptyIsNotEmpty

#filter_is_empty, #filter_is_not_empty

Methods inherited from Property

create_from_json, #make_filter_query, #type

Constructor Details

#initialize(name, last_edited_time: nil) ⇒ LastEditedTimeProperty

Returns a new instance of LastEditedTimeProperty.

Parameters:

  • name (String)

    Property name

  • last_edited_time (String) (defaults to: nil)

    last_edited_time value (optional)



10
11
12
13
# File 'lib/notion_ruby_mapping/last_edited_time_property.rb', line 10

def initialize(name, last_edited_time: nil)
  super name, will_update: false
  @last_edited_time = last_edited_time
end

Instance Attribute Details

#last_edited_timeObject (readonly)

Returns the value of attribute last_edited_time.



14
15
16
# File 'lib/notion_ruby_mapping/last_edited_time_property.rb', line 14

def last_edited_time
  @last_edited_time
end

Instance Method Details

#property_values_jsonHash

Returns {} created_time cannot be updated.

Returns:

  • (Hash)

    {} created_time cannot be updated



23
24
25
# File 'lib/notion_ruby_mapping/last_edited_time_property.rb', line 23

def property_values_json
  {}
end

#update_from_json(json) ⇒ Object

Parameters:

  • json (Hash)


17
18
19
20
# File 'lib/notion_ruby_mapping/last_edited_time_property.rb', line 17

def update_from_json(json)
  @will_update = false
  @last_edited_time = json["last_edited_time"]
end