module FlowNodePatron::FlowPromisedLandBoxOperation
Public Instance Methods
closed_box?(box_id)
click to toggle source
# File lib/flow_node_patron/operations/flow_promised_land_box_operation.rb, line 16 def closed_box?(box_id) answer = get_box_info(box_id) answer[:status] == 'closed' end
delete_box(id)
click to toggle source
# File lib/flow_node_patron/operations/flow_promised_land_box_operation.rb, line 21 def delete_box(id) FlowPromisedLandRest.post("/#{specific_org_patrons_url}/delete_box", box_id: id) end
fetch_outqueue_box()
click to toggle source
去promised_land 拿出队的box info
# File lib/flow_node_patron/operations/flow_promised_land_box_operation.rb, line 6 def fetch_outqueue_box answer = FlowPromisedLandRest.get "/#{specific_org_patrons_url}/fetch_outqueue_box", {} return nil if answer.dig(:json, :queue) == 'empty' answer end
get_box_info(box_id)
click to toggle source
# File lib/flow_node_patron/operations/flow_promised_land_box_operation.rb, line 12 def get_box_info(box_id) FlowPromisedLandRest.get "/#{specific_org_patrons_url}/get_box_info", box_id: box_id end
push_a_test_box()
click to toggle source
主要给测试用的函数,平时不要乱用
# File lib/flow_node_patron/operations/flow_promised_land_box_operation.rb, line 26 def push_a_test_box FlowPromisedLandRest.post("/#{specific_org_patrons_url}/push_a_test_box", {}) end
queue_list()
click to toggle source
# File lib/flow_node_patron/operations/flow_promised_land_box_operation.rb, line 30 def queue_list FlowPromisedLandRest.get("/#{specific_org_patrons_url}/queue_box_list") end
Private Instance Methods
specific_org_patrons_url()
click to toggle source
# File lib/flow_node_patron/operations/flow_promised_land_box_operation.rb, line 36 def specific_org_patrons_url "org_patrons/#{::FlowNodePatron::Config::PROMISED_LAND_ORG_PATRON_TOKEN}" end