@@ -152,7 +152,7 @@ public function get_account()
152152
153153 /**
154154 * Gets all sequences
155- *
155+ *
156156 * @see https://developers.convertkit.com/#list-sequences
157157 *
158158 * @return false|mixed
@@ -175,13 +175,18 @@ public function get_sequences()
175175 * @param string $first_name First Name.
176176 * @param array<string, string> $fields Custom Fields.
177177 * @param array<string, int> $tag_ids Tag ID(s) to subscribe to.
178- *
178+ *
179179 * @see https://developers.convertkit.com/#add-subscriber-to-a-sequence
180180 *
181181 * @return false|mixed
182182 */
183- public function add_subscriber_to_sequence (int $ sequence_id , string $ email , string $ first_name = '' , array $ fields = [], array $ tag_ids = [])
184- {
183+ public function add_subscriber_to_sequence (
184+ int $ sequence_id ,
185+ string $ email ,
186+ string $ first_name = '' ,
187+ array $ fields = [],
188+ array $ tag_ids = []
189+ ) {
185190 // Build parameters.
186191 $ options = [
187192 'api_key ' => $ this ->api_key ,
@@ -194,7 +199,7 @@ public function add_subscriber_to_sequence(int $sequence_id, string $email, stri
194199 if (!empty ($ fields )) {
195200 $ options ['fields ' ] = $ fields ;
196201 }
197- if (!empty ($ tags )) {
202+ if (!empty ($ tag_ids )) {
198203 $ options ['tags ' ] = $ tag_ids ;
199204 }
200205
@@ -212,7 +217,7 @@ public function add_subscriber_to_sequence(int $sequence_id, string $email, stri
212217 * @param string $sort_order Sort Order (asc|desc).
213218 * @param string $subscriber_state Subscriber State (active,cancelled).
214219 * @param integer $page Page.
215- *
220+ *
216221 * @see https://developers.convertkit.com/#list-subscriptions-to-a-sequence
217222 *
218223 * @return false|mixed
@@ -222,14 +227,14 @@ public function get_sequence_subscriptions(
222227 string $ sort_order = 'asc ' ,
223228 string $ subscriber_state = 'active ' ,
224229 int $ page = 1
225- ){
230+ ) {
226231 return $ this ->get (
227232 sprintf ('sequences/%s/subscriptions ' , $ sequence_id ),
228233 [
229- 'api_secret ' => $ this ->api_secret ,
230- 'sort_order ' => $ sort_order ,
231- 'subscriber_state ' => $ subscriber_state ,
232- 'page ' => $ page ,
234+ 'api_secret ' => $ this ->api_secret ,
235+ 'sort_order ' => $ sort_order ,
236+ 'subscriber_state ' => $ subscriber_state ,
237+ 'page ' => $ page ,
233238 ]
234239 );
235240 }
@@ -720,8 +725,8 @@ private function strip_html_head_body_tags(string $markup)
720725 /**
721726 * Performs a GET request to the API.
722727 *
723- * @param string $endpoint API Endpoint.
724- * @param array<string, int|string> $args Request arguments.
728+ * @param string $endpoint API Endpoint.
729+ * @param array<string, int|string|array<string, int|string>|string > $args Request arguments.
725730 *
726731 * @throws \InvalidArgumentException If the provided arguments are not of the expected type.
727732 *
@@ -739,8 +744,8 @@ public function get(string $endpoint, array $args = [])
739744 /**
740745 * Performs a POST request to the API.
741746 *
742- * @param string $endpoint API Endpoint.
743- * @param array<string, int|string> $args Request arguments.
747+ * @param string $endpoint API Endpoint.
748+ * @param array<string, int|string|array<string, int|string>|string > $args Request arguments.
744749 *
745750 * @throws \InvalidArgumentException If the provided arguments are not of the expected type.
746751 *
@@ -758,8 +763,8 @@ public function post(string $endpoint, array $args = [])
758763 /**
759764 * Performs a PUT request to the API.
760765 *
761- * @param string $endpoint API Endpoint.
762- * @param array<string, int|string> $args Request arguments.
766+ * @param string $endpoint API Endpoint.
767+ * @param array<string, int|string|array<string, int|string>|string > $args Request arguments.
763768 *
764769 * @throws \InvalidArgumentException If the provided arguments are not of the expected type.
765770 *
@@ -777,8 +782,8 @@ public function put(string $endpoint, array $args = [])
777782 /**
778783 * Performs a DELETE request to the API.
779784 *
780- * @param string $endpoint API Endpoint.
781- * @param array<string, int|string> $args Request arguments.
785+ * @param string $endpoint API Endpoint.
786+ * @param array<string, int|string|array<string, int|string>|string > $args Request arguments.
782787 *
783788 * @throws \InvalidArgumentException If the provided arguments are not of the expected type.
784789 *
@@ -796,9 +801,9 @@ public function delete(string $endpoint, array $args = [])
796801 /**
797802 * Performs an API request using Guzzle.
798803 *
799- * @param string $endpoint API Endpoint.
800- * @param string $method Request method (POST, GET, PUT, PATCH, DELETE) .
801- * @param array<string, int|string> $args Request arguments.
804+ * @param string $endpoint API Endpoint.
805+ * @param string $method Request method .
806+ * @param array<string, int|string|array<string, int|string>|string > $args Request arguments.
802807 *
803808 * @throws \InvalidArgumentException If the provided arguments are not of the expected type.
804809 * @throws \Exception If JSON encoding arguments failed.
0 commit comments