/**
  * Create a new account type
  *
  * @param array $data
  * 	An array as follows: array('name'=>$name, 'pl_bs_category'=>$plBsCategory, 'deferral_method'=>$deferralMethod,
  *                              'lang_key'=>$langKey, 'organization_id'=>$organizationId
  *                            );
  *
  * @return boolean
  */
 public function create(array $data)
 {
     $AccountType = new AccountType();
     $AccountType->setConnection($this->databaseConnectionName);
     $AccountType->fill($data)->save();
     return $AccountType;
 }
 /**
  * Retrieve accounts types by organization
  *
  * @param  int $id Organization id
  *
  * @return Illuminate\Database\Eloquent\Collection
  */
 public function byOrganization($id)
 {
     return $this->AccountType->where('organization_id', '=', $id)->get();
 }