class NotionRb::Operations::UpdateParent

Constants

COMMAND_TYPE
DEFAULT_ALIVE_VALUE
DEFAULT_PARENT_TABLE
OPERATION_NAME
TABLE

Attributes

alive[R]
id[R]
parent_id[R]
parent_table[R]

Public Class Methods

new(id, parent_id, opts = {}) click to toggle source
# File lib/notion_rb/operations/update_parent.rb, line 14
def initialize(id, parent_id, opts = {})
  @id = id
  @parent_id = parent_id
  @parent_table = opts.fetch(:parent_table, DEFAULT_PARENT_TABLE)
  @alive = opts.fetch(:alive, DEFAULT_ALIVE_VALUE)
end

Public Instance Methods

args() click to toggle source
# File lib/notion_rb/operations/update_parent.rb, line 32
def args
  {
    parent_id: parent_id,
    parent_table: parent_table,
    alive: alive
  }
end
commands() click to toggle source
# File lib/notion_rb/operations/update_parent.rb, line 21
def commands
  [
    Commands::Factory.build(
      COMMAND_TYPE,
      id,
      args: args,
      table: TABLE
    )
  ]
end