|
5 | 5 | * @author ConvertKit |
6 | 6 | */ |
7 | 7 |
|
8 | | -namespace ConvertKit_API; |
9 | | - |
10 | 8 | /** |
11 | 9 | * ConvertKit API Traits |
12 | 10 | */ |
@@ -144,7 +142,7 @@ public function get_email_stats() |
144 | 142 | * |
145 | 143 | * @return false|mixed |
146 | 144 | */ |
147 | | - public function get_growth_stats(\DateTime|null $starting = null, \DateTime|null $ending = null) |
| 145 | + public function get_growth_stats(?\DateTime $starting = null, ?\DateTime $ending = null) |
148 | 146 | { |
149 | 147 | return $this->get( |
150 | 148 | 'account/growth_stats', |
@@ -344,10 +342,10 @@ public function add_subscriber_to_legacy_form(int $form_id, int $subscriber_id) |
344 | 342 | public function get_form_subscriptions( |
345 | 343 | int $form_id, |
346 | 344 | string $subscriber_state = 'active', |
347 | | - \DateTime|null $created_after = null, |
348 | | - \DateTime|null $created_before = null, |
349 | | - \DateTime|null $added_after = null, |
350 | | - \DateTime|null $added_before = null, |
| 345 | + ?\DateTime $created_after = null, |
| 346 | + ?\DateTime $created_before = null, |
| 347 | + ?\DateTime $added_after = null, |
| 348 | + ?\DateTime $added_before = null, |
351 | 349 | bool $include_total_count = false, |
352 | 350 | string $after_cursor = '', |
353 | 351 | string $before_cursor = '', |
@@ -471,10 +469,10 @@ public function add_subscriber_to_sequence(int $sequence_id, int $subscriber_id) |
471 | 469 | public function get_sequence_subscriptions( |
472 | 470 | int $sequence_id, |
473 | 471 | string $subscriber_state = 'active', |
474 | | - \DateTime|null $created_after = null, |
475 | | - \DateTime|null $created_before = null, |
476 | | - \DateTime|null $added_after = null, |
477 | | - \DateTime|null $added_before = null, |
| 472 | + ?\DateTime $created_after = null, |
| 473 | + ?\DateTime $created_before = null, |
| 474 | + ?\DateTime $added_after = null, |
| 475 | + ?\DateTime $added_before = null, |
478 | 476 | bool $include_total_count = false, |
479 | 477 | string $after_cursor = '', |
480 | 478 | string $before_cursor = '', |
@@ -737,10 +735,10 @@ public function remove_tag_from_subscriber_by_email(int $tag_id, string $email_a |
737 | 735 | public function get_tag_subscriptions( |
738 | 736 | int $tag_id, |
739 | 737 | string $subscriber_state = 'active', |
740 | | - \DateTime|null $created_after = null, |
741 | | - \DateTime|null $created_before = null, |
742 | | - \DateTime|null $tagged_after = null, |
743 | | - \DateTime|null $tagged_before = null, |
| 738 | + ?\DateTime $created_after = null, |
| 739 | + ?\DateTime $created_before = null, |
| 740 | + ?\DateTime $tagged_after = null, |
| 741 | + ?\DateTime $tagged_before = null, |
744 | 742 | bool $include_total_count = false, |
745 | 743 | string $after_cursor = '', |
746 | 744 | string $before_cursor = '', |
@@ -836,10 +834,10 @@ public function get_email_templates( |
836 | 834 | public function get_subscribers( |
837 | 835 | string $subscriber_state = 'active', |
838 | 836 | string $email_address = '', |
839 | | - \DateTime|null $created_after = null, |
840 | | - \DateTime|null $created_before = null, |
841 | | - \DateTime|null $updated_after = null, |
842 | | - \DateTime|null $updated_before = null, |
| 837 | + ?\DateTime $created_after = null, |
| 838 | + ?\DateTime $created_before = null, |
| 839 | + ?\DateTime $updated_after = null, |
| 840 | + ?\DateTime $updated_before = null, |
843 | 841 | string $sort_field = 'id', |
844 | 842 | string $sort_order = 'desc', |
845 | 843 | bool $include_total_count = false, |
@@ -1265,8 +1263,8 @@ public function create_broadcast( |
1265 | 1263 | string $content = '', |
1266 | 1264 | string $description = '', |
1267 | 1265 | bool $public = false, |
1268 | | - \DateTime|null $published_at = null, |
1269 | | - \DateTime|null $send_at = null, |
| 1266 | + ?\DateTime $published_at = null, |
| 1267 | + ?\DateTime $send_at = null, |
1270 | 1268 | string $email_address = '', |
1271 | 1269 | string $email_template_id = '', |
1272 | 1270 | string $thumbnail_alt = '', |
@@ -1362,9 +1360,11 @@ public function get_broadcast_link_clicks( |
1362 | 1360 | return $this->get( |
1363 | 1361 | sprintf('broadcasts/%s/clicks', $id), |
1364 | 1362 | $this->build_total_count_and_pagination_params( |
1365 | | - after_cursor: $after_cursor, |
1366 | | - before_cursor: $before_cursor, |
1367 | | - per_page: $per_page |
| 1363 | + [], |
| 1364 | + false, |
| 1365 | + $after_cursor, |
| 1366 | + $before_cursor, |
| 1367 | + $per_page |
1368 | 1368 | ) |
1369 | 1369 | ); |
1370 | 1370 | } |
@@ -1437,8 +1437,8 @@ public function update_broadcast( |
1437 | 1437 | string $content = '', |
1438 | 1438 | string $description = '', |
1439 | 1439 | bool $public = false, |
1440 | | - \DateTime|null $published_at = null, |
1441 | | - \DateTime|null $send_at = null, |
| 1440 | + ?\DateTime $published_at = null, |
| 1441 | + ?\DateTime $send_at = null, |
1442 | 1442 | string $email_address = '', |
1443 | 1443 | string $email_template_id = '', |
1444 | 1444 | string $thumbnail_alt = '', |
@@ -1841,14 +1841,14 @@ public function create_purchase( |
1841 | 1841 | string $transaction_id, |
1842 | 1842 | array $products, |
1843 | 1843 | string $currency = 'USD', |
1844 | | - string|null $first_name = null, |
1845 | | - string|null $status = null, |
| 1844 | + ?string $first_name = null, |
| 1845 | + ?string $status = null, |
1846 | 1846 | float $subtotal = 0, |
1847 | 1847 | float $tax = 0, |
1848 | 1848 | float $shipping = 0, |
1849 | 1849 | float $discount = 0, |
1850 | 1850 | float $total = 0, |
1851 | | - \DateTime|null $transaction_time = null |
| 1851 | + ?\DateTime $transaction_time = null |
1852 | 1852 | ) { |
1853 | 1853 | // Build parameters. |
1854 | 1854 | $options = [ |
|
0 commit comments