diff --git a/SilMock/Google/Service/Directory.php b/SilMock/Google/Service/Directory.php index 9e55aa7..666a932 100644 --- a/SilMock/Google/Service/Directory.php +++ b/SilMock/Google/Service/Directory.php @@ -3,6 +3,7 @@ namespace SilMock\Google\Service; use SilMock\Google\Service\Directory\Asps; +use SilMock\Google\Service\Directory\Members; use SilMock\Google\Service\Directory\Tokens; use SilMock\Google\Service\Directory\UsersResource; use SilMock\Google\Service\Directory\UsersAliasesResource; @@ -12,6 +13,7 @@ class Directory { public $asps; + public Members $members; public $tokens; public $users; public $users_aliases; @@ -28,6 +30,7 @@ class Directory public function __construct($client, $dbFile = null) { $this->asps = new Asps($dbFile); + $this->members = new Members($dbFile); $this->tokens = new Tokens($dbFile); $this->users = new UsersResource($dbFile); $this->users_aliases = new UsersAliasesResource($dbFile); diff --git a/SilMock/Google/Service/Directory/Members.php b/SilMock/Google/Service/Directory/Members.php new file mode 100644 index 0000000..97c246f --- /dev/null +++ b/SilMock/Google/Service/Directory/Members.php @@ -0,0 +1,37 @@ + $groupKey, + 'member' => get_object_vars($postBody), + ]); + $sqliteUtils = $this->getSqliteUtils(); + $sqliteUtils->recordData( + $this->dataType, + $this->dataClass, + $dataAsJson + ); + + $newMember = new Member(); + ObjectUtils::initialize($newMember, $postBody); + + return $newMember; + } +}