Class: NotionRubyMapping::VerificationProperty

Inherits:
Property
  • Object
show all
Defined in:
lib/notion_ruby_mapping/properties/verification_property.rb

Overview

Status property

Constant Summary collapse

TYPE =
"verification"

Instance Attribute Summary

Attributes inherited from Property

#name, #property_cache, #property_id, #will_update

Instance Method Summary collapse

Methods inherited from Property

#assert_data_source_property, #assert_database_or_data_source_property, #assert_database_property, #assert_page_property, #clear_will_update, #contents?, create_from_json, #data_source?, #database?, #database_or_data_source?, #make_filter_query, #new_name=, #page?, #property_schema_json, #remove, #retrieve_page_property, #type, #update_from_json, #update_property_schema_json

Constructor Details

#initialize(name, will_update: false, base_type: "page", property_id: nil, property_cache: nil, json: {}) ⇒ VerificationProperty

Returns a new instance of VerificationProperty.

Parameters:

  • name (String, Symbol)

    Property name

  • json (Boolean, Hash) (defaults to: {})


27
28
29
30
31
# File 'lib/notion_ruby_mapping/properties/verification_property.rb', line 27

def initialize(name, will_update: false, base_type: "page", property_id: nil, property_cache: nil, json: {})
  super name, will_update: will_update, base_type: base_type, property_id: property_id,
              property_cache: property_cache
  @json = json
end

Instance Method Details

#filter_status(value, condition: nil, another_type: nil) ⇒ NotionRubyMapping::Query

Returns generated Query object.

Parameters:

  • value (String, Number)

    Query value

  • condition (String) (defaults to: nil)

    rollup Rollup name

  • another_type (String) (defaults to: nil)

    rollup_type Rollup type

Returns:

See Also:



40
41
42
# File 'lib/notion_ruby_mapping/properties/verification_property.rb', line 40

def filter_status(value, condition: nil, another_type: nil)
  make_filter_query "status", value, condition: condition, another_type: another_type
end

#property_values_jsonHash

Returns:

  • (Hash)


47
48
49
50
# File 'lib/notion_ruby_mapping/properties/verification_property.rb', line 47

def property_values_json
  assert_page_property __method__
  {@name => {"verification" => @json, "type" => TYPE}}
end

#verificationObject



13
14
15
# File 'lib/notion_ruby_mapping/properties/verification_property.rb', line 13

def verification
  @json
end