<aside> 👉 Links (Property base class)
Notion Ruby Mapping Public API Reference
</aside>
<aside> 💡
[P] means methods for Page Property, [DB/DS] means methods for Database or DataSource Property.
</aside>
filter_contains creates a Query object for contains filter.
ds.properties["CreatedByTitle"].filter_contains "a_user_id"
# => #<NotionRubyMapping::Query:0x0000000110525498 @filter={"property"=>"CreatedByTitle", "created_by"=>{"contains"=>"a_user_id"}}, @page_size=100, @sort=[], @start_cursor=nil>
### only RollupProperty (none, any, every)
ds.properties["RollupTitle"].filter_contains "abc", condition: "any", another_type: "rich_text"
# => #<NotionRubyMapping::Query:0x0000000105394f30 @filter={"property"=>"RollupTitle", "any"=>{"rich_text"=>{"contains"=>"abc"}}}, @page_size=100, @sort=[], @start_cursor=nil>
filter_contains creates a Query object for contains filter.
ds.properties["CreatedByTitle"].filter_contains "a_user_id"
# => #<NotionRubyMapping::Query:0x0000000110525498 @filter={"property"=>"CreatedByTitle", "created_by"=>{"contains"=>"a_user_id"}}, @page_size=100, @sort=[], @start_cursor=nil>
### only RollupProperty (none, any, every)
ds.properties["RollupTitle"].filter_contains "abc", condition: "any", another_type: "rich_text"
# => #<NotionRubyMapping::Query:0x0000000105394f30 @filter={"property"=>"RollupTitle", "any"=>{"rich_text"=>{"contains"=>"abc"}}}, @page_size=100, @sort=[], @start_cursor=nil>
filter_ends_with(str) creates a Query object for ends_with filter.
ds.properties["MailTitle"].filter_ends_with "ac.jp"
=> #<NotionRubyMapping::Query:0x0000000105281b48 @filter={"property"=>"MailTitle", "email"=>{"ends_with"=>"ac.jp"}}, @page_size=100, @sort=[], @start_cursor=nil>
### only RollupProperty (none, any, every)
ds.properties["RollupTitle"].filter_ends_with "abc", condition: "none", another_type: "rich_text"
# => #<NotionRubyMapping::Query:0x00000001054d9558 @filter={"property"=>"RollupTitle", "none"=>{"rich_text"=>{"ends_with"=>"abc"}}}, @page_size=100, @sort=[], @start_cursor=nil>
filter_starts_with(str) creates a Query object for starts_with filter.
ds.properties["MailTitle"].filter_starts_with "hkob"
=> #<NotionRubyMapping::Query:0x0000000101377218 @filter={"property"=>"MailTitle", "email"=>{"starts_with"=>"hkob"}}, @page_size=100, @sort=[], @start_cursor=nil>
### only RollupProperty (none, any, every)
ds.properties["RollupTitle"].filter_starts_with "abc", condition: "none", another_type: "rich_text"
=> #<NotionRubyMapping::Query:0x0000000105523c70 @filter={"property"=>"RollupTitle", "none"=>{"rich_text"=>{"starts_with"=>"abc"}}}, @page_size=100, @sort=[], @start_cursor=nil>
phone_number of Page property returns the phone number value.
phone_number of Page property returns nil when the phone number is empty.
phone_number of Database or DataSource property returns the schema Hash. For Phone number property, it is an empty Hash {}.
page.properties["TelTitle"].phone_number
# => "zz-zzzz-zzzz"
page.properties["TelTitle"].phone_number
# => nil
ds.properties["TelTitle"].phone_number
# => {}
String), or nil to clear the valuephone_number=(value) of Page property sets the phone number value and sets will_update_flag to true.phone_number = nil clears the phone number value.phone_number = "" keeps an empty string as-is. It is not converted to nil by NotionRubyMapping.