@@ -130,14 +130,14 @@ public function get_email_stats()
130
130
/**
131
131
* Gets growth stats
132
132
*
133
- * @param \DateTime $starting Gets stats for time period beginning on this date. Defaults to 90 days ago.
134
- * @param \DateTime $ending Gets stats for time period ending on this date. Defaults to today.
133
+ * @param \DateTime|null $starting Gets stats for time period beginning on this date. Defaults to 90 days ago.
134
+ * @param \DateTime|null $ending Gets stats for time period ending on this date. Defaults to today.
135
135
*
136
136
* @see https://developers.convertkit.com/v4.html#get-growth-stats
137
137
*
138
138
* @return false|mixed
139
139
*/
140
- public function get_growth_stats (\DateTime $ starting = null , \DateTime $ ending = null )
140
+ public function get_growth_stats (\DateTime | null $ starting = null , \DateTime | null $ ending = null )
141
141
{
142
142
return $ this ->get (
143
143
'account/growth_stats ' ,
@@ -308,16 +308,16 @@ public function add_subscriber_to_form(int $form_id, int $subscriber_id, string
308
308
/**
309
309
* List subscribers for a form
310
310
*
311
- * @param integer $form_id Form ID.
312
- * @param string $subscriber_state Subscriber State (active|bounced|cancelled|complained|inactive).
313
- * @param \DateTime $created_after Filter subscribers who have been created after this date.
314
- * @param \DateTime $created_before Filter subscribers who have been created before this date.
315
- * @param \DateTime $added_after Filter subscribers who have been added to the form after this date.
316
- * @param \DateTime $added_before Filter subscribers who have been added to the form before this date.
317
- * @param boolean $include_total_count To include the total count of records in the response, use true.
318
- * @param string $after_cursor Return results after the given pagination cursor.
319
- * @param string $before_cursor Return results before the given pagination cursor.
320
- * @param integer $per_page Number of results to return.
311
+ * @param integer $form_id Form ID.
312
+ * @param string $subscriber_state Subscriber State (active|bounced|cancelled|complained|inactive).
313
+ * @param \DateTime|null $created_after Filter subscribers who have been created after this date.
314
+ * @param \DateTime|null $created_before Filter subscribers who have been created before this date.
315
+ * @param \DateTime|null $added_after Filter subscribers who have been added to the form after this date.
316
+ * @param \DateTime|null $added_before Filter subscribers who have been added to the form before this date.
317
+ * @param boolean $include_total_count To include the total count of records in the response, use true.
318
+ * @param string $after_cursor Return results after the given pagination cursor.
319
+ * @param string $before_cursor Return results before the given pagination cursor.
320
+ * @param integer $per_page Number of results to return.
321
321
*
322
322
* @see https://developers.convertkit.com/v4.html#list-subscribers-for-a-form
323
323
*
@@ -326,10 +326,10 @@ public function add_subscriber_to_form(int $form_id, int $subscriber_id, string
326
326
public function get_form_subscriptions (
327
327
int $ form_id ,
328
328
string $ subscriber_state = 'active ' ,
329
- \DateTime $ created_after = null ,
330
- \DateTime $ created_before = null ,
331
- \DateTime $ added_after = null ,
332
- \DateTime $ added_before = null ,
329
+ \DateTime | null $ created_after = null ,
330
+ \DateTime | null $ created_before = null ,
331
+ \DateTime | null $ added_after = null ,
332
+ \DateTime | null $ added_before = null ,
333
333
bool $ include_total_count = false ,
334
334
string $ after_cursor = '' ,
335
335
string $ before_cursor = '' ,
@@ -435,16 +435,16 @@ public function add_subscriber_to_sequence(int $sequence_id, int $subscriber_id)
435
435
/**
436
436
* List subscribers for a sequence
437
437
*
438
- * @param integer $sequence_id Sequence ID.
439
- * @param string $subscriber_state Subscriber State (active|bounced|cancelled|complained|inactive).
440
- * @param \DateTime $created_after Filter subscribers who have been created after this date.
441
- * @param \DateTime $created_before Filter subscribers who have been created before this date.
442
- * @param \DateTime $added_after Filter subscribers who have been added to the form after this date.
443
- * @param \DateTime $added_before Filter subscribers who have been added to the form before this date.
444
- * @param boolean $include_total_count To include the total count of records in the response, use true.
445
- * @param string $after_cursor Return results after the given pagination cursor.
446
- * @param string $before_cursor Return results before the given pagination cursor.
447
- * @param integer $per_page Number of results to return.
438
+ * @param integer $sequence_id Sequence ID.
439
+ * @param string $subscriber_state Subscriber State (active|bounced|cancelled|complained|inactive).
440
+ * @param \DateTime|null $created_after Filter subscribers who have been created after this date.
441
+ * @param \DateTime|null $created_before Filter subscribers who have been created before this date.
442
+ * @param \DateTime|null $added_after Filter subscribers who have been added to the form after this date.
443
+ * @param \DateTime|null $added_before Filter subscribers who have been added to the form before this date.
444
+ * @param boolean $include_total_count To include the total count of records in the response, use true.
445
+ * @param string $after_cursor Return results after the given pagination cursor.
446
+ * @param string $before_cursor Return results before the given pagination cursor.
447
+ * @param integer $per_page Number of results to return.
448
448
*
449
449
* @see https://developers.convertkit.com/v4.html#list-subscribers-for-a-sequence
450
450
*
@@ -453,10 +453,10 @@ public function add_subscriber_to_sequence(int $sequence_id, int $subscriber_id)
453
453
public function get_sequence_subscriptions (
454
454
int $ sequence_id ,
455
455
string $ subscriber_state = 'active ' ,
456
- \DateTime $ created_after = null ,
457
- \DateTime $ created_before = null ,
458
- \DateTime $ added_after = null ,
459
- \DateTime $ added_before = null ,
456
+ \DateTime | null $ created_after = null ,
457
+ \DateTime | null $ created_before = null ,
458
+ \DateTime | null $ added_after = null ,
459
+ \DateTime | null $ added_before = null ,
460
460
bool $ include_total_count = false ,
461
461
string $ after_cursor = '' ,
462
462
string $ before_cursor = '' ,
@@ -651,16 +651,16 @@ public function remove_tag_from_subscriber_by_email(int $tag_id, string $email_a
651
651
/**
652
652
* List subscribers for a tag
653
653
*
654
- * @param integer $tag_id Tag ID.
655
- * @param string $subscriber_state Subscriber State (active|bounced|cancelled|complained|inactive).
656
- * @param \DateTime $created_after Filter subscribers who have been created after this date.
657
- * @param \DateTime $created_before Filter subscribers who have been created before this date.
658
- * @param \DateTime $tagged_after Filter subscribers who have been tagged after this date.
659
- * @param \DateTime $tagged_before Filter subscribers who have been tagged before this date.
660
- * @param boolean $include_total_count To include the total count of records in the response, use true.
661
- * @param string $after_cursor Return results after the given pagination cursor.
662
- * @param string $before_cursor Return results before the given pagination cursor.
663
- * @param integer $per_page Number of results to return.
654
+ * @param integer $tag_id Tag ID.
655
+ * @param string $subscriber_state Subscriber State (active|bounced|cancelled|complained|inactive).
656
+ * @param \DateTime|null $created_after Filter subscribers who have been created after this date.
657
+ * @param \DateTime|null $created_before Filter subscribers who have been created before this date.
658
+ * @param \DateTime|null $tagged_after Filter subscribers who have been tagged after this date.
659
+ * @param \DateTime|null $tagged_before Filter subscribers who have been tagged before this date.
660
+ * @param boolean $include_total_count To include the total count of records in the response, use true.
661
+ * @param string $after_cursor Return results after the given pagination cursor.
662
+ * @param string $before_cursor Return results before the given pagination cursor.
663
+ * @param integer $per_page Number of results to return.
664
664
*
665
665
* @see https://developers.convertkit.com/v4.html#list-subscribers-for-a-tag
666
666
*
@@ -669,10 +669,10 @@ public function remove_tag_from_subscriber_by_email(int $tag_id, string $email_a
669
669
public function get_tag_subscriptions (
670
670
int $ tag_id ,
671
671
string $ subscriber_state = 'active ' ,
672
- \DateTime $ created_after = null ,
673
- \DateTime $ created_before = null ,
674
- \DateTime $ tagged_after = null ,
675
- \DateTime $ tagged_before = null ,
672
+ \DateTime | null $ created_after = null ,
673
+ \DateTime | null $ created_before = null ,
674
+ \DateTime | null $ tagged_after = null ,
675
+ \DateTime | null $ tagged_before = null ,
676
676
bool $ include_total_count = false ,
677
677
string $ after_cursor = '' ,
678
678
string $ before_cursor = '' ,
@@ -746,18 +746,18 @@ public function get_email_templates(
746
746
/**
747
747
* List subscribers.
748
748
*
749
- * @param string $subscriber_state Subscriber State (active|bounced|cancelled|complained|inactive).
750
- * @param string $email_address Search susbcribers by email address. This is an exact match search.
751
- * @param \DateTime $created_after Filter subscribers who have been created after this date.
752
- * @param \DateTime $created_before Filter subscribers who have been created before this date.
753
- * @param \DateTime $updated_after Filter subscribers who have been updated after this date.
754
- * @param \DateTime $updated_before Filter subscribers who have been updated before this date.
755
- * @param string $sort_field Sort Field (id|updated_at|cancelled_at).
756
- * @param string $sort_order Sort Order (asc|desc).
757
- * @param boolean $include_total_count To include the total count of records in the response, use true.
758
- * @param string $after_cursor Return results after the given pagination cursor.
759
- * @param string $before_cursor Return results before the given pagination cursor.
760
- * @param integer $per_page Number of results to return.
749
+ * @param string $subscriber_state Subscriber State (active|bounced|cancelled|complained|inactive).
750
+ * @param string $email_address Search susbcribers by email address. This is an exact match search.
751
+ * @param \DateTime|null $created_after Filter subscribers who have been created after this date.
752
+ * @param \DateTime|null $created_before Filter subscribers who have been created before this date.
753
+ * @param \DateTime|null $updated_after Filter subscribers who have been updated after this date.
754
+ * @param \DateTime|null $updated_before Filter subscribers who have been updated before this date.
755
+ * @param string $sort_field Sort Field (id|updated_at|cancelled_at).
756
+ * @param string $sort_order Sort Order (asc|desc).
757
+ * @param boolean $include_total_count To include the total count of records in the response, use true.
758
+ * @param string $after_cursor Return results after the given pagination cursor.
759
+ * @param string $before_cursor Return results before the given pagination cursor.
760
+ * @param integer $per_page Number of results to return.
761
761
*
762
762
* @since 2.0.0
763
763
*
@@ -768,10 +768,10 @@ public function get_email_templates(
768
768
public function get_subscribers (
769
769
string $ subscriber_state = 'active ' ,
770
770
string $ email_address = '' ,
771
- \DateTime $ created_after = null ,
772
- \DateTime $ created_before = null ,
773
- \DateTime $ updated_after = null ,
774
- \DateTime $ updated_before = null ,
771
+ \DateTime | null $ created_after = null ,
772
+ \DateTime | null $ created_before = null ,
773
+ \DateTime | null $ updated_after = null ,
774
+ \DateTime | null $ updated_before = null ,
775
775
string $ sort_field = 'id ' ,
776
776
string $ sort_order = 'desc ' ,
777
777
bool $ include_total_count = false ,
@@ -1090,9 +1090,9 @@ public function get_broadcasts(
1090
1090
* @param string $content The broadcast's email HTML content.
1091
1091
* @param string $description An internal description of this broadcast.
1092
1092
* @param boolean $public Specifies whether or not this is a public post.
1093
- * @param \DateTime $published_at Specifies the time that this post was published (applicable
1093
+ * @param \DateTime|null $published_at Specifies the time that this post was published (applicable
1094
1094
* only to public posts).
1095
- * @param \DateTime $send_at Time that this broadcast should be sent; leave blank to create
1095
+ * @param \DateTime|null $send_at Time that this broadcast should be sent; leave blank to create
1096
1096
* a draft broadcast. If set to a future time, this is the time that
1097
1097
* the broadcast will be scheduled to send.
1098
1098
* @param string $email_address Sending email address; leave blank to use your account's
@@ -1115,8 +1115,8 @@ public function create_broadcast(
1115
1115
string $ content = '' ,
1116
1116
string $ description = '' ,
1117
1117
bool $ public = false ,
1118
- \DateTime $ published_at = null ,
1119
- \DateTime $ send_at = null ,
1118
+ \DateTime | null $ published_at = null ,
1119
+ \DateTime | null $ send_at = null ,
1120
1120
string $ email_address = '' ,
1121
1121
string $ email_template_id = '' ,
1122
1122
string $ thumbnail_alt = '' ,
@@ -1197,9 +1197,9 @@ public function get_broadcast_stats(int $id)
1197
1197
* @param string $content The broadcast's email HTML content.
1198
1198
* @param string $description An internal description of this broadcast.
1199
1199
* @param boolean $public Specifies whether or not this is a public post.
1200
- * @param \DateTime $published_at Specifies the time that this post was published (applicable
1200
+ * @param \DateTime|null $published_at Specifies the time that this post was published (applicable
1201
1201
* only to public posts).
1202
- * @param \DateTime $send_at Time that this broadcast should be sent; leave blank to create
1202
+ * @param \DateTime|null $send_at Time that this broadcast should be sent; leave blank to create
1203
1203
* a draft broadcast. If set to a future time, this is the time that
1204
1204
* the broadcast will be scheduled to send.
1205
1205
* @param string $email_address Sending email address; leave blank to use your account's
@@ -1223,8 +1223,8 @@ public function update_broadcast(
1223
1223
string $ content = '' ,
1224
1224
string $ description = '' ,
1225
1225
bool $ public = false ,
1226
- \DateTime $ published_at = null ,
1227
- \DateTime $ send_at = null ,
1226
+ \DateTime | null $ published_at = null ,
1227
+ \DateTime | null $ send_at = null ,
1228
1228
string $ email_address = '' ,
1229
1229
string $ email_template_id = '' ,
1230
1230
string $ thumbnail_alt = '' ,
@@ -1588,14 +1588,14 @@ public function get_purchase(int $purchase_id)
1588
1588
* @param string $transaction_id Transaction ID.
1589
1589
* @param array<string,int|float|string> $products Products.
1590
1590
* @param string $currency ISO Currency Code.
1591
- * @param string $first_name First Name.
1592
- * @param string $status Order Status.
1591
+ * @param string|null $first_name First Name.
1592
+ * @param string|null $status Order Status.
1593
1593
* @param float $subtotal Subtotal.
1594
1594
* @param float $tax Tax.
1595
1595
* @param float $shipping Shipping.
1596
1596
* @param float $discount Discount.
1597
1597
* @param float $total Total.
1598
- * @param \DateTime $transaction_time Transaction date and time.
1598
+ * @param \DateTime|null $transaction_time Transaction date and time.
1599
1599
*
1600
1600
* @see https://developers.convertkit.com/v4.html#create-a-purchase
1601
1601
*
@@ -1606,14 +1606,14 @@ public function create_purchase(
1606
1606
string $ transaction_id ,
1607
1607
array $ products ,
1608
1608
string $ currency = 'USD ' ,
1609
- string $ first_name = null ,
1610
- string $ status = null ,
1609
+ string | null $ first_name = null ,
1610
+ string | null $ status = null ,
1611
1611
float $ subtotal = 0 ,
1612
1612
float $ tax = 0 ,
1613
1613
float $ shipping = 0 ,
1614
1614
float $ discount = 0 ,
1615
1615
float $ total = 0 ,
1616
- \DateTime $ transaction_time = null
1616
+ \DateTime | null $ transaction_time = null
1617
1617
) {
1618
1618
// Build parameters.
1619
1619
$ options = [
0 commit comments