-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Services/Ident* models. Added Smart models with tests
- Loading branch information
Jakub Elias
committed
May 13, 2015
1 parent
5b5eb23
commit a2be050
Showing
26 changed files
with
610 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/** | ||
* Contact Common model class | ||
*/ | ||
|
||
namespace secucard\models\Common; | ||
|
||
use secucard\client\base\BaseModel; | ||
|
||
/** | ||
* Contact Data Model class | ||
* | ||
*/ | ||
class Contact extends BaseModel | ||
{ | ||
protected $_attribute_defs = array( | ||
'salutation' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'title' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'forename' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'surname' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'name' => array('type' => BaseModel::DATA_TYPE_STRING), // not used for now | ||
'companyname' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
// TODO check if date is correct! | ||
'dob' => array('type' => BaseModel::DATA_TYPE_DATE), | ||
'birthplace' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'nationality' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'gender' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'phone' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'mobile' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'email' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'picture' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'url_website' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
// Address is subarray | ||
'address' => array('type' => BaseModel::DATA_TYPE_ARRAY_SUBOBJECT, 'category' => 'Common', 'model' => 'Contactaddress'), | ||
); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
/** | ||
* Contactaddress Common model class | ||
*/ | ||
|
||
namespace secucard\models\Common; | ||
|
||
use secucard\client\base\BaseModel; | ||
|
||
/** | ||
* Contactaddress Data Model class | ||
* | ||
*/ | ||
class Contactaddress extends BaseModel | ||
{ | ||
protected $_attribute_defs = array( | ||
'street' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'street_number' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'city' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'postal_code' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'country' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Devices Api Model class | ||
*/ | ||
|
||
namespace secucard\models\General; | ||
|
||
use secucard\client\base\BaseModel; | ||
use secucard\client\base\MainModel; | ||
|
||
/** | ||
* Devices Api Model class | ||
* | ||
*/ | ||
class Devices extends MainModel | ||
{ | ||
// TODO this model is not yet implemented correctly | ||
protected $_attribute_defs = array( | ||
'object' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'id' => array('type' => BaseModel::DATA_TYPE_STRING, 'options' => array('id' => true)), | ||
); | ||
|
||
protected $_relations = array(); | ||
|
||
// model specific functions | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
/** | ||
* Merchants Api Model class | ||
*/ | ||
|
||
namespace secucard\models\General; | ||
|
||
use secucard\client\base\BaseModel; | ||
use secucard\client\base\MainModel; | ||
|
||
/** | ||
* Merchants Api Model class | ||
* | ||
*/ | ||
class Merchants extends MainModel | ||
{ | ||
// TODO this class is not yet implemented | ||
protected $_attribute_defs = array( | ||
'object' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'id' => array('type' => BaseModel::DATA_TYPE_STRING, 'options' => array('id' => true)), | ||
); | ||
|
||
protected $_relations = array( | ||
// | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
/** | ||
* Stores Api Model class | ||
*/ | ||
|
||
namespace secucard\models\General; | ||
|
||
use secucard\client\base\BaseModel; | ||
use secucard\client\base\MainModel; | ||
|
||
/** | ||
* Stores Api Model class | ||
* | ||
*/ | ||
class Stores extends MainModel | ||
{ | ||
// TODO this model is not yet implemented correctly | ||
protected $_attribute_defs = array( | ||
'object' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'id' => array('type' => BaseModel::DATA_TYPE_STRING, 'options' => array('id' => true)), | ||
); | ||
|
||
protected $_relations = array(); | ||
|
||
|
||
// model specific functions | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* Identcontracts Api Model class | ||
*/ | ||
|
||
namespace secucard\models\Services; | ||
|
||
use secucard\client\base\BaseModel; | ||
use secucard\client\base\MainModel; | ||
|
||
/** | ||
* Identcontracts Api Model class | ||
* | ||
*/ | ||
class Identcontracts extends MainModel | ||
{ | ||
protected $_attribute_defs = array( | ||
'object' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'id' => array('type' => BaseModel::DATA_TYPE_STRING, 'options' => array('id' => true)), | ||
'demo' => array('type' => BaseModel::DATA_TYPE_BOOLEAN), | ||
'redirect_url_success' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'redirect_url_failed' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'push_url' => array('type' => BaseModel::DATA_TYPE_STRING), | ||
'created' => array('type' => BaseModel::DATA_TYPE_DATETIME), | ||
); | ||
|
||
protected $_relations = array( | ||
'merchant' => array('type' => MainModel::RELATION_HAS_ONE, 'category' => 'General', 'model' => 'Merchants'), | ||
); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.