Skip to content
This repository has been archived by the owner on May 30, 2020. It is now read-only.

Commit

Permalink
#2 add entities for leaves, myorganizationprofile
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisleker committed Dec 18, 2019
1 parent c667b5a commit 001cdb5
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Valsplat/Simplicate/Entities/Employee.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class Employee extends Entity
// use Actions\Deletable;

protected $fillable = [
'id',
'person_id',
'name',
'marital_status',
Expand Down
27 changes: 27 additions & 0 deletions src/Valsplat/Simplicate/Entities/Leave.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace Valsplat\Simplicate\Entities;

use Valsplat\Simplicate\Actions;
use Valsplat\Simplicate\Entity;

class Leave extends Entity
{
use Actions\Getable;
use Actions\Listable;
use Actions\Storable;
//use Actions\Deletable;

protected $fillable = [
'employee_id',
'leave_type_id',
'start_date',
'end_date',
'year',
'hours',
'description'
];

protected $endpoint = 'hrm/leave/';
// protected $namespace = '';
}
26 changes: 26 additions & 0 deletions src/Valsplat/Simplicate/Entities/MyOrganizationProfile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace Valsplat\Simplicate\Entities;

use Valsplat\Simplicate\Actions;
use Valsplat\Simplicate\Entity;

class MyOrganizationProfile extends Entity
{
use Actions\Getable;
use Actions\Listable;
// use Actions\Storable;
// use Actions\Deletable;

protected $fillable = [
'organization_id',
'name',
'coc_code',
'vat_number',
'bank_account',
'blocked'
];

protected $endpoint = 'crm/myorganizationprofile/';
// protected $namespace = '';
}
10 changes: 10 additions & 0 deletions src/Valsplat/Simplicate/Simplicate.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ public function employee($attributes = [])
return new Entities\Employee($this->connection, $attributes);
}

public function leave($attributes = [])
{
return new Entities\Leave($this->connection, $attributes);
}

public function myorganizationprofile($attributes = [])
{
return new Entities\Entities\MyOrganizationProfile($this->connection, $attributes);
}

public function organization($attributes = [])
{
return new Entities\Organization($this->connection, $attributes);
Expand Down

0 comments on commit 001cdb5

Please sign in to comment.