Class: NotionRubyMapping::CreatedTimeProperty
- Inherits:
-
DateBaseProperty
- Object
- Property
- DateBaseProperty
- NotionRubyMapping::CreatedTimeProperty
- Defined in:
- lib/notion_ruby_mapping/created_time_property.rb
Overview
CreatedTimeProperty
Constant Summary collapse
- TYPE =
"created_time"
Instance Attribute Summary collapse
-
#created_time ⇒ Object
readonly
Returns the value of attribute created_time.
Attributes inherited from Property
Instance Method Summary collapse
-
#initialize(name, created_time: nil) ⇒ CreatedTimeProperty
constructor
A new instance of CreatedTimeProperty.
-
#property_values_json ⇒ Hash
{} created_time cannot be updated.
- #update_from_json(json) ⇒ Object
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, created_time: nil) ⇒ CreatedTimeProperty
Returns a new instance of CreatedTimeProperty.
10 11 12 13 |
# File 'lib/notion_ruby_mapping/created_time_property.rb', line 10 def initialize(name, created_time: nil) super name, will_update: false @created_time = created_time end |
Instance Attribute Details
#created_time ⇒ Object (readonly)
Returns the value of attribute created_time.
14 15 16 |
# File 'lib/notion_ruby_mapping/created_time_property.rb', line 14 def created_time @created_time end |
Instance Method Details
#property_values_json ⇒ Hash
Returns {} created_time cannot be updated.
23 24 25 |
# File 'lib/notion_ruby_mapping/created_time_property.rb', line 23 def property_values_json {} end |
#update_from_json(json) ⇒ Object
17 18 19 20 |
# File 'lib/notion_ruby_mapping/created_time_property.rb', line 17 def update_from_json(json) @will_update = false @created_time = json["created_time"] end |