module Datacentred module Model class Usage < OpenStruct def initialize(params) params.delete("links") # params["last_updated_at"] = Time.parse params["last_updated_at"] super(params) end def self.show(year, month) Request::Usage.show(year, month)["projects"].map{ |project| new(project) } end end end end