Class: NotionRubyMapping::RollupProperty

Inherits:
DateBaseProperty show all
Includes:
ContainsDoesNotContain, GreaterThanLessThan, StartsWithEndsWith
Defined in:
lib/notion_ruby_mapping/rollup_property.rb

Overview

Rollup property

Constant Summary collapse

TYPE =
"rollup"

Instance Attribute Summary

Attributes inherited from Property

#name, #will_update

Instance Method Summary collapse

Methods included from GreaterThanLessThan

#filter_greater_than, #filter_greater_than_or_equal_to, #filter_less_than, #filter_less_than_or_equal_to

Methods included from StartsWithEndsWith

#filter_ends_with, #filter_starts_with

Methods included from ContainsDoesNotContain

#filter_contains, #filter_does_not_contain

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, json: nil) ⇒ RollupProperty

Returns a new instance of RollupProperty.

Parameters:

  • name (String)
  • json (Hash) (defaults to: nil)


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

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

Instance Method Details

#property_values_jsonHash

Returns {} created_time cannot be updated.

Returns:

  • (Hash)

    {} created_time cannot be updated



19
20
21
# File 'lib/notion_ruby_mapping/rollup_property.rb', line 19

def property_values_json
  {}
end

#update_from_json(json) ⇒ Object

Parameters:

  • json (Hash)


24
25
26
27
# File 'lib/notion_ruby_mapping/rollup_property.rb', line 24

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