Total Complexity | 4 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | trait BillingPortal |
||
6 | { |
||
7 | /** |
||
8 | * Get billing portal details for a customer. |
||
9 | * |
||
10 | * @param int $customer_id |
||
11 | * |
||
12 | * @return array |
||
13 | */ |
||
14 | public function customer_billing_portal_details($customer_id): array |
||
15 | { |
||
16 | $this->apiEndPoint = "/portal/customers/{$customer_id}/management_link.json"; |
||
17 | |||
18 | $this->verb = 'get'; |
||
19 | |||
20 | return $this->doChargifyRequest(); |
||
|
|||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Enable billing portal for a customer. |
||
25 | * |
||
26 | * @param int $customer_id |
||
27 | * @param bool $auto_invite |
||
28 | * |
||
29 | * @return string |
||
30 | */ |
||
31 | public function customer_enable_billing_portal($customer_id, $auto_invite=false): string |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Revoke billing portal invitation for a customer. |
||
43 | * |
||
44 | * @param int $customer_id |
||
45 | * |
||
46 | * @return array |
||
47 | */ |
||
48 | public function customer_revoke_billing_portal($customer_id): array |
||
55 | } |
||
56 | } |
||
57 |