Class: NotionRubyMapping::TemplateObject

Inherits:
Object
  • Object
show all
Defined in:
lib/notion_ruby_mapping/objects/template_object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json: json) ⇒ TemplateObject

Returns a new instance of TemplateObject.



3
4
5
6
7
# File 'lib/notion_ruby_mapping/objects/template_object.rb', line 3

def initialize(json: json)
  @id = json["id"]
  @name = json["name"]
  @is_default = json["is_default"]
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/notion_ruby_mapping/objects/template_object.rb', line 8

def id
  @id
end

#is_defaultObject (readonly)

Returns the value of attribute is_default.



8
9
10
# File 'lib/notion_ruby_mapping/objects/template_object.rb', line 8

def is_default
  @is_default
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/notion_ruby_mapping/objects/template_object.rb', line 8

def name
  @name
end

Instance Method Details

#property_values_jsonHash{String->String, Boolean

Returns ].

Returns:

  • (Hash{String->String, Boolean)

    ]



11
12
13
14
15
16
17
# File 'lib/notion_ruby_mapping/objects/template_object.rb', line 11

def property_values_json
  {
    "id" => @id,
    "name" => @name,
    "is_default" => @is_default
  }
end