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

podio-community / podio-php / 5730982429

pending completion
5730982429

push

github

web-flow
Merge pull request #233 from podio-community/232-improvements-beta

fix: make podio_client first parameter of functions + remove podio_client member from models

235 of 235 new or added lines in 67 files covered. (100.0%)

916 of 2104 relevant lines covered (43.54%)

32.17 hits per line

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

0.0
/models/PodioSubscription.php
1
<?php
2
/**
3
 * @see https://developers.podio.com/doc/subscriptions
4
 */
5
class PodioSubscription extends PodioObject
6
{
7
    public function __construct($attributes = array())
8
    {
9
        parent::__construct();
×
10
        $this->property('started_on', 'datetime');
×
11
        $this->property('notifications', 'integer');
×
12

13
        $this->has_one('ref', 'Reference');
×
14

15
        $this->init($attributes);
×
16
    }
17

18
    /**
19
     * @see https://developers.podio.com/doc/subscriptions/get-subscription-by-id-22446
20
     */
21
    public static function get(PodioClient $podio_client, $subscription_id)
22
    {
23
        return self::member($podio_client, $podio_client->get("/subscription/{$subscription_id}"));
×
24
    }
25

26
    /**
27
     * @see https://developers.podio.com/doc/subscriptions/get-subscription-by-reference-22408
28
     */
29
    public static function get_for(PodioClient $podio_client, $ref_type, $ref_id)
30
    {
31
        return self::member($podio_client, $podio_client->get("/subscription/{$ref_type}/{$ref_id}"));
×
32
    }
33

34
    /**
35
     * @see https://developers.podio.com/doc/subscriptions/subscribe-22409
36
     */
37
    public static function create(PodioClient $podio_client, $ref_type, $ref_id)
38
    {
39
        return $podio_client->post("/subscription/{$ref_type}/{$ref_id}")->json_body();
×
40
    }
41

42
    /**
43
     * @see https://developers.podio.com/doc/subscriptions/unsubscribe-by-id-22445
44
     */
45
    public static function delete(PodioClient $podio_client, $subscription_id)
46
    {
47
        return $podio_client->delete("/subscription/{$subscription_id}");
×
48
    }
49

50
    /**
51
     * @see https://developers.podio.com/doc/subscriptions/unsubscribe-by-reference-22410
52
     */
53
    public static function delete_for(PodioClient $podio_client, $ref_type, $ref_id)
54
    {
55
        return $podio_client->delete("/subscription/{$ref_type}/{$ref_id}");
×
56
    }
57
}
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