• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

podio-community / podio-php / 5883458979

16 Aug 2023 08:19PM UTC coverage: 47.564% (-5.9%) from 53.497%
5883458979

Pull #242

github

web-flow
Merge 89cf31048 into 51d68f28d
Pull Request #242: More fixes

181 of 181 new or added lines in 43 files covered. (100.0%)

996 of 2094 relevant lines covered (47.56%)

33.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/models/PodioOrganization.php
1
<?php
2
/**
3
 * @see https://developers.podio.com/doc/organizations
4
 */
5
class PodioOrganization extends PodioObject
6
{
7
    public function __construct($attributes = array())
8
    {
9
        parent::__construct();
×
10
        $this->property('org_id', 'integer', array('id' => true));
×
11
        $this->property('name', 'string');
×
12
        $this->property('type', 'string');
×
13
        $this->property('logo', 'integer');
×
14
        $this->property('url', 'string');
×
15
        $this->property('user_limit', 'integer');
×
16
        $this->property('url_label', 'string');
×
17
        $this->property('premium', 'boolean');
×
18
        $this->property('role', 'string');
×
19
        $this->property('status', 'string');
×
20
        $this->property('sales_agent_id', 'integer');
×
21
        $this->property('created_on', 'datetime');
×
22
        $this->property('domains', 'array');
×
23
        $this->property('rights', 'array');
×
24
        $this->property('rank', 'integer');
×
25

26
        $this->has_one('created_by', 'ByLine');
×
27
        $this->has_one('image', 'File');
×
28
        $this->has_many('spaces', 'Space');
×
29

30
        $this->init($attributes);
×
31
    }
32

33
    /**
34
     * @see https://developers.podio.com/doc/organizations/get-organization-22383
35
     */
36
    public static function get(PodioClient $podio_client, $org_id)
37
    {
38
        return self::member($podio_client->get("/org/{$org_id}"));
×
39
    }
40

41
    /**
42
     * @see https://developers.podio.com/doc/organizations/get-organization-by-url-22384
43
     */
44
    public static function get_for_url(PodioClient $podio_client, $attributes = array())
45
    {
46
        return self::member($podio_client->get("/org/url", $attributes));
×
47
    }
48

49
    /**
50
     * @see https://developers.podio.com/doc/organizations/get-organizations-22344
51
     */
52
    public static function get_all(PodioClient $podio_client)
53
    {
54
        return self::listing($podio_client->get("/org/"));
×
55
    }
56

57
    /**
58
     * @see https://developers.podio.com/doc/organizations/add-new-organization-22385
59
     */
60
    public static function create(PodioClient $podio_client, $attributes = array())
61
    {
62
        return self::member($podio_client->post("/org/", $attributes));
×
63
    }
64

65
    /**
66
     * @see https://developers.podio.com/doc/organizations/add-organization-admin-50854
67
     */
68
    public static function create_admin(PodioClient $podio_client, $org_id, $attributes = array())
69
    {
70
        return $podio_client->post("/org/{$org_id}/admin/", $attributes);
×
71
    }
72

73
    /**
74
     * @see https://developers.podio.com/doc/organizations/get-organization-admins-81542
75
     */
76
    public static function get_all_admins(PodioClient $podio_client, $org_id)
77
    {
78
        return PodioUser::listing($podio_client->get("/org/{$org_id}/admin/"));
×
79
    }
80

81
    /**
82
     * @see https://developers.podio.com/doc/organizations/get-organization-login-report-51730
83
     */
84
    public static function get_login_report(PodioClient $podio_client, $org_id, $attributes = array())
85
    {
86
        return $podio_client->get("/org/{$org_id}/report/login", $attributes)->json_body();
×
87
    }
88

89
    /**
90
     * @see https://developers.podio.com/doc/organizations/get-organization-statistics-28734
91
     */
92
    public static function get_statistics(PodioClient $podio_client, $org_id, $attributes = array())
93
    {
94
        return $podio_client->get("/org/{$org_id}/statistics", $attributes)->json_body();
×
95
    }
96

97
    /**
98
     * @see https://developers.podio.com/doc/organizations/update-organization-22386
99
     */
100
    public static function update(PodioClient $podio_client, $org_id, $attributes = array())
101
    {
102
        return $podio_client->put("/org/{$org_id}", $attributes);
×
103
    }
104

105
    /**
106
     * Bootstrap organization. Only applicable on Podio Platform
107
     */
108
    public static function bootstrap(PodioClient $podio_client, $attributes = array())
109
    {
110
        return $podio_client->post("/org/bootstrap", $attributes);
×
111
    }
112
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc