package com.growthbeat.model;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.growthbeat.Context;

public class Account extends Model {

	private String id;
	private String name;
	private Date created;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	public static Account findById(String id, Context context) {
		return get(context, String.format("1/accounts/%s", id), new HashMap<String, Object>(), Account.class);
	}

	public static Account create(String name, Context context) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("name", name);
		return post(context, "1/accounts", params, Account.class);
	}

	public static void deleteById(String id, Context context) {
		delete(context, String.format("1/accounts/%s", id), new HashMap<String, Object>(), Void.class);
	}

}

@@ -208,16 +208,46 @@
 g name;%0A
+%09private PlanGrade planGrade;%0A
 %09private
@@ -504,32 +504,174 @@
 rn created;%0A%09%7D%0A%0A
+%09public PlanGrade getPlanGrade() %7B%0A%09%09return planGrade;%0A%09%7D%0A%0A%09public void setPlanGrade(PlanGrade planGrade) %7B%0A%09%09this.planGrade = planGrade;%0A%09%7D%0A%0A
 %09public void set
@@ -1275,10 +1275,76 @@
 s);%0A%09%7D%0A%0A
+%09public enum PlanGrade %7B%0A%09%09micro, small, medium, large, extra%0A%09%7D%0A%0A
 %7D%0A

add PlanGrade to Account