class Legistar::CodeSection
Public Class Methods
new(host:)
click to toggle source
# File lib/legistar/code_section.rb, line 6 def initialize(host:) @host = host end
Public Instance Methods
create(options = {})
click to toggle source
# File lib/legistar/code_section.rb, line 33 def create(options = {}) response = self.class.post("/v1/#{@host}/CodeSections/", options) end
destroy(id)
click to toggle source
# File lib/legistar/code_section.rb, line 41 def destroy(id) response = self.class.delete("/v1/#{@host}/CodeSections/#{id}") end
get(id)
click to toggle source
# File lib/legistar/code_section.rb, line 28 def get(id) response = self.class.get("/v1/#{@host}/CodeSections/#{id}") response.to_h end
index()
click to toggle source
Example Response
{
"CodeSectionId"=>38, "CodeSectionGuid"=>"A24F2163-A67F-47EE-860C-EDA29BACFE37", "CodeSectionLastModifiedUtc"=>"2014-05-24T04:15:19.107", "CodeSectionRowVersion"=>"AAAAAAAFsMc=", "CodeSectionNumber"=>"11.222", "CodeSectionName"=>"Water ", "CodeSectionActiveFlag"=>1, "CodeSectionUsedFlag"=>0
}
# File lib/legistar/code_section.rb, line 23 def index response = self.class.get("/v1/#{@host}/CodeSections") actions = response.to_a end
update(id, options = {})
click to toggle source
# File lib/legistar/code_section.rb, line 37 def update(id, options = {}) response = self.class.put("/v1/#{@host}/CodeSections/#{id}", options) end