Class: NotionRubyMapping::LastEditedByProperty

Inherits:
MultiProperty show all
Defined in:
lib/notion_ruby_mapping/last_edited_by_property.rb

Overview

LastEditedByProperty

Constant Summary collapse

TYPE =
"last_edited_by"

Instance Attribute Summary collapse

Attributes inherited from Property

#name, #will_update

Instance Method Summary collapse

Methods included from IsEmptyIsNotEmpty

#filter_is_empty, #filter_is_not_empty

Methods included from ContainsDoesNotContain

#filter_contains, #filter_does_not_contain

Methods inherited from Property

create_from_json, #make_filter_query, #type

Constructor Details

#initialize(name, user_id: nil, json: nil) ⇒ LastEditedByProperty

Returns a new instance of LastEditedByProperty.

Parameters:

  • name (String)

    Property name

  • user_id (String) (defaults to: nil)

    user_id (optional)

  • json (Hash) (defaults to: nil)

    json (optional)



11
12
13
14
# File 'lib/notion_ruby_mapping/last_edited_by_property.rb', line 11

def initialize(name, user_id: nil, json: nil)
  super name, will_update: false
  @user = UserObject.new user_id: user_id, json: json
end

Instance Attribute Details

#userObject (readonly)

Returns the value of attribute user.



15
16
17
# File 'lib/notion_ruby_mapping/last_edited_by_property.rb', line 15

def user
  @user
end

Instance Method Details

#property_values_jsonHash

Returns {} created_time cannot be updated.

Returns:

  • (Hash)

    {} created_time cannot be updated



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

def property_values_json
  {}
end

#update_from_json(json) ⇒ Object

Parameters:

  • json (Hash)


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

def update_from_json(json)
  @will_update = false
  @user = UserObject.new json: json["last_edited_by"]
end