| @@ 18-76 (lines=59) @@ | ||
| 15 | * |
|
| 16 | * @version 1 |
|
| 17 | */ |
|
| 18 | class Apps extends Api |
|
| 19 | { |
|
| 20 | /** |
|
| 21 | * List (permission needed: #billing:read) |
|
| 22 | * List all of your app subscriptions |
|
| 23 | */ |
|
| 24 | public function list_apps() |
|
| 25 | { |
|
| 26 | return $this->get('/user/billing/subscriptions/apps'); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * Search, sort, and paginate (permission needed: #billing:read) |
|
| 31 | * Search, sort, and paginate your subscriptions |
|
| 32 | * |
|
| 33 | * @param int|null $page Page number of paginated results |
|
| 34 | * @param int|null $per_page Number of items per page |
|
| 35 | * @param string|null $order Field to order subscriptions by |
|
| 36 | * @param string|null $status The state of the subscription |
|
| 37 | * @param string|null $price The price of the subscription that will be billed, in US dollars |
|
| 38 | * @param string|null $activated_on When the subscription was activated |
|
| 39 | * @param string|null $expires_on When the subscription will expire |
|
| 40 | * @param string|null $expired_on When the subscription expired |
|
| 41 | * @param string|null $cancelled_on When the subscription was cancelled |
|
| 42 | * @param string|null $renewed_on When the subscription was renewed |
|
| 43 | * @param string|null $direction Direction to order subscriptions |
|
| 44 | * @param string|null $match Whether to match all search requirements or at least one (any) |
|
| 45 | */ |
|
| 46 | public function search_sort_paginate($page = null, $per_page = null, $order = null, $status = null, $price = null, $activated_on = null, $expires_on = null, $expired_on = null, $cancelled_on = null, $renewed_on = null, $direction = null, $match = null) |
|
| 47 | { |
|
| 48 | $data = [ |
|
| 49 | 'page' => $page, |
|
| 50 | 'per_page' => $per_page, |
|
| 51 | 'order' => $order, |
|
| 52 | 'status' => $status, |
|
| 53 | 'price' => $price, |
|
| 54 | 'activated_on' => $activated_on, |
|
| 55 | 'expires_on' => $expires_on, |
|
| 56 | 'expired_on' => $expired_on, |
|
| 57 | 'cancelled_on' => $cancelled_on, |
|
| 58 | 'renewed_on' => $renewed_on, |
|
| 59 | 'direction' => $direction, |
|
| 60 | 'match' => $match, |
|
| 61 | ]; |
|
| 62 | ||
| 63 | return $this->get('/user/billing/subscriptions/apps', $data); |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * Info (permission needed: #billing:read) |
|
| 68 | * Billing subscription details |
|
| 69 | * |
|
| 70 | * @param string $identifier |
|
| 71 | */ |
|
| 72 | public function info($identifier) |
|
| 73 | { |
|
| 74 | return $this->get('/user/billing/subscriptions/apps/'.$identifier); |
|
| 75 | } |
|
| 76 | } |
|
| 77 | ||
| @@ 18-76 (lines=59) @@ | ||
| 15 | * |
|
| 16 | * @version 1 |
|
| 17 | */ |
|
| 18 | class Zones extends Api |
|
| 19 | { |
|
| 20 | /** |
|
| 21 | * List (permission needed: #billing:read) |
|
| 22 | * List all of your zone plan subscriptions |
|
| 23 | */ |
|
| 24 | public function list_zones() |
|
| 25 | { |
|
| 26 | return $this->get('/user/billing/subscriptions/zones'); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * Search, sort, and paginate (permission needed: #billing:read) |
|
| 31 | * Search, sort, and paginate your subscriptions |
|
| 32 | * |
|
| 33 | * @param int|null $page Page number of paginated results |
|
| 34 | * @param int|null $per_page Number of items per page |
|
| 35 | * @param string|null $order Field to order subscriptions by |
|
| 36 | * @param string|null $status The state of the subscription |
|
| 37 | * @param string|null $price The price of the subscription that will be billed, in US dollars |
|
| 38 | * @param string|null $activated_on When the subscription was activated |
|
| 39 | * @param string|null $expires_on When the subscription will expire |
|
| 40 | * @param string|null $expired_on When the subscription expired |
|
| 41 | * @param string|null $cancelled_on When the subscription was cancelled |
|
| 42 | * @param string|null $renewed_on When the subscription was renewed |
|
| 43 | * @param string|null $direction Direction to order subscriptions |
|
| 44 | * @param string|null $match Whether to match all search requirements or at least one (any) |
|
| 45 | */ |
|
| 46 | public function search_sort_paginate($page = null, $per_page = null, $order = null, $status = null, $price = null, $activated_on = null, $expires_on = null, $expired_on = null, $cancelled_on = null, $renewed_on = null, $direction = null, $match = null) |
|
| 47 | { |
|
| 48 | $data = [ |
|
| 49 | 'page' => $page, |
|
| 50 | 'per_page' => $per_page, |
|
| 51 | 'order' => $order, |
|
| 52 | 'status' => $status, |
|
| 53 | 'price' => $price, |
|
| 54 | 'activated_on' => $activated_on, |
|
| 55 | 'expires_on' => $expires_on, |
|
| 56 | 'expired_on' => $expired_on, |
|
| 57 | 'cancelled_on' => $cancelled_on, |
|
| 58 | 'renewed_on' => $renewed_on, |
|
| 59 | 'direction' => $direction, |
|
| 60 | 'match' => $match, |
|
| 61 | ]; |
|
| 62 | ||
| 63 | return $this->get('/user/billing/subscriptions/zones', $data); |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * Info (permission needed: #billing:read) |
|
| 68 | * Billing subscription details |
|
| 69 | * |
|
| 70 | * @param string $identifier API item identifier tag |
|
| 71 | */ |
|
| 72 | public function info($identifier) |
|
| 73 | { |
|
| 74 | return $this->get('/user/billing/subscriptions/zones/'.$identifier); |
|
| 75 | } |
|
| 76 | } |
|
| 77 | ||