Class: Fetcher::Notion::PtoToday
- Defined in:
- lib/bas/fetcher/notion/use_case/pto_today.rb
Overview
This class is an implementation of the Fetcher::Notion::Base interface, specifically designed for fetching Paid Time Off (PTO) data from Notion.
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#fetch ⇒ Object
Implements the data fetching filter for todays PTO’s data from Notion.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Fetcher::Base
Instance Method Details
#fetch ⇒ Object
Implements the data fetching filter for todays PTO’s data from Notion.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/bas/fetcher/notion/use_case/pto_today.rb', line 14 def fetch today = Time.now.utc.strftime("%F").to_s filter = { filter: { "and": [ { property: "Desde?", date: { on_or_before: today } }, { property: "Hasta?", date: { on_or_after: today } } ] } } execute(filter) end |